英雄调用加经验接口也推送属性变化

This commit is contained in:
meixiongfeng 2022-10-10 11:29:38 +08:00
parent 5b624437d3
commit 485021f72f
2 changed files with 3 additions and 1 deletions

View File

@ -573,6 +573,8 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
code = pb.ErrorCode_DBError
}
if curLv-preLv > 0 { // 升级了 统计任务
this.ChangeHeroProperty(session, hero) // 重新计算属性值
// 推送
this.moduleHero.ModuleRtask.SendToRtask(session, comm.Rtype4, utils.ToInt32(hero.HeroID), hero.Lv)
this.moduleHero.ModuleRtask.SendToRtask(session, comm.Rtype23, 1, hero.Star, hero.Lv)
this.moduleHero.ModuleRtask.SendToRtask(session, comm.Rtype24, 1)

View File

@ -313,7 +313,7 @@ func (this *Hero) AddHeroExp(session comm.IUserSession, heroObjID string, exp in
if code != pb.ErrorCode_Success {
return
}
//this.Debug("AddHeroExp", log.Field{Key: "hero", Value: _hero})
newhero, code = this.modelHero.AddCardExp(session, _hero, exp)
if code != pb.ErrorCode_Success {
return