This commit is contained in:
wh_zcy 2022-11-21 20:04:36 +08:00
commit 1d7c5cd9b9

View File

@ -46,6 +46,7 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
for k := range _talent.Talent {
if conf := this.module.configure.GetHeroTalent(k); conf != nil {
talentPoint += conf.Point // 获取当前英雄的天赋点数
}
}
if t := this.module.configure.GetHeroTalentBoxItem(_talent.HeroId); t != "" {
@ -54,6 +55,7 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
T: t,
N: talentPoint,
}
this.module.Debugf("返还天赋的点数%d,itemID=%s", talentPoint, t)
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)
} // 返还升级的天赋点数