From a2cdabece8deb7e380c2405ab9ed52644332aba5 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 11 Nov 2022 15:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E8=BF=94=E8=BF=98=E5=B7=B2?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E7=9A=84=E5=A4=A9=E8=B5=8B=E7=82=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api_talentreset.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/hero/api_talentreset.go b/modules/hero/api_talentreset.go index 9e37aadd0..c95eff39b 100644 --- a/modules/hero/api_talentreset.go +++ b/modules/hero/api_talentreset.go @@ -47,15 +47,15 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe if conf := this.module.configure.GetHeroTalent(k); conf != nil { talentPoint += conf.Point // 获取当前英雄的天赋点数 } - res := &cfg.Gameatn{ - A: "item", - T: _talent.HeroId, - N: talentPoint, - } - if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success { - this.module.Errorf("DispenseRes err,uid:%s,item:%v", session.GetUserId(), res) - } // 返还升级的天赋点数 } + res := &cfg.Gameatn{ + A: "item", + T: _talent.HeroId, + N: talentPoint, + } + if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success { + this.module.Errorf("DispenseRes err,uid:%s,item:%v", session.GetUserId(), res) + } // 返还升级的天赋点数 if len(_talent.Talent) > 0 { update := make(map[string]interface{}, 0) szTalent := map[int32]int32{}