消耗整合
This commit is contained in:
parent
01720f3128
commit
8d3acd80bd
@ -54,10 +54,15 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
||||
}
|
||||
}
|
||||
// 消耗获取
|
||||
for i := 0; i < int(lvUpCount); i++ {
|
||||
if atn := this.module.configure.GetHeroSkillCost(heroCfg.Star); len(atn) > 0 {
|
||||
cost = append(cost, atn...)
|
||||
|
||||
atn := this.module.configure.GetHeroSkillCost(heroCfg.Star)
|
||||
for _, v := range atn {
|
||||
res := &cfg.Gameatn{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N * lvUpCount,
|
||||
}
|
||||
cost = append(cost, res)
|
||||
}
|
||||
|
||||
// 检查消耗
|
||||
|
@ -256,8 +256,9 @@ func (this *configureComp) GetHeroSkillUpConfig(skillid int32) (data *cfg.GameHe
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
if conf, ok := v.(*cfg.GameHeroSkillLevel); ok {
|
||||
if v, err = this.GetConfigure(hero_skillup); err == nil {
|
||||
|
||||
if v, err = this.GetConfigure(hero_skillup); err == nil {
|
||||
if conf, ok := v.(*cfg.GameHeroSkillLevel); ok {
|
||||
if data = conf.Get(skillid); data == nil {
|
||||
err = comm.NewNotFoundConfErr("hero", hero_skillup, skillid)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user