上传天赋处理
This commit is contained in:
parent
f8aa29d103
commit
dd0e4ed581
@ -75,8 +75,13 @@ func (this *apiComp) AddExp(session comm.IUserSession, req *pb.ExclusiveAddExpRe
|
|||||||
info.Exp = lvconf.Needexp
|
info.Exp = lvconf.Needexp
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if lvconf.Needexp < info.Exp {
|
if lvconf.Needexp <= info.Exp {
|
||||||
info.Lv++
|
info.Lv++
|
||||||
|
info.Exp -= lvconf.Needexp
|
||||||
|
info.Property = make(map[int32]int32)
|
||||||
|
for _, v := range lvconf.Attribute {
|
||||||
|
info.Property[v.A] = v.N
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
|||||||
res = append(res, talentConf.Thing...)
|
res = append(res, talentConf.Thing...)
|
||||||
// 消耗指定的天赋点数
|
// 消耗指定的天赋点数
|
||||||
t, err := this.module.configure.GetHeroTalentBoxItem(talent.HeroId)
|
t, err := this.module.configure.GetHeroTalentBoxItem(talent.HeroId)
|
||||||
if err != nil && talentConf.Point > 0 {
|
if err == nil {
|
||||||
curItemCount := int32(this.module.ModuleItems.QueryItemAmount(session.GetUserId(), t))
|
curItemCount := int32(this.module.ModuleItems.QueryItemAmount(session.GetUserId(), t))
|
||||||
if curItemCount < talentConf.Point { // 如果数量不够 则取找其他物品替代
|
if curItemCount < talentConf.Point { // 如果数量不够 则取找其他物品替代
|
||||||
leftCount := talentConf.Point - curItemCount // 需要其他物品的数量
|
leftCount := talentConf.Point - curItemCount // 需要其他物品的数量
|
||||||
|
Loading…
Reference in New Issue
Block a user