推送取消练功状态

This commit is contained in:
meixiongfeng 2022-08-19 10:21:54 +08:00
parent e047f4a883
commit 0f35317220

View File

@ -258,7 +258,7 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf
if code != pb.ErrorCode_Success {
return
}
if bKongfu && _hero.Status != pb.HeroType_HeroTypeKongFu {
if bKongfu && _hero.Status == pb.HeroType_HeroTypeKongFu {
code = pb.ErrorCode_HeroAlreadyKongFuStatus // 已经是练功状态
return
}
@ -272,6 +272,9 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf
code = pb.ErrorCode_DBError
return
}
_hero.Status = pb.HeroType_HeroTypeNil
_changeHero = append(_changeHero, _hero)
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: _changeHero})
return
}
if _hero.SameCount > 1 {