重置返还已学习的天赋点数
This commit is contained in:
parent
3e16c1ceed
commit
a2cdabece8
@ -47,15 +47,15 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
|
|||||||
if conf := this.module.configure.GetHeroTalent(k); conf != nil {
|
if conf := this.module.configure.GetHeroTalent(k); conf != nil {
|
||||||
talentPoint += conf.Point // 获取当前英雄的天赋点数
|
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 {
|
if len(_talent.Talent) > 0 {
|
||||||
update := make(map[string]interface{}, 0)
|
update := make(map[string]interface{}, 0)
|
||||||
szTalent := map[int32]int32{}
|
szTalent := map[int32]int32{}
|
||||||
|
Loading…
Reference in New Issue
Block a user