推送取消练功状态
This commit is contained in:
parent
e047f4a883
commit
0f35317220
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user