From 485021f72fabe2c9da3a4a8e856cc80754d95257 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 10 Oct 2022 11:29:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E8=B0=83=E7=94=A8=E5=8A=A0?= =?UTF-8?q?=E7=BB=8F=E9=AA=8C=E6=8E=A5=E5=8F=A3=E4=B9=9F=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/model_hero.go | 2 ++ modules/hero/module.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 97d28b907..b36cdbff2 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -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) diff --git a/modules/hero/module.go b/modules/hero/module.go index d0f25d27f..8b5d0ffa6 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -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