消耗整合

This commit is contained in:
meixiongfeng 2023-06-01 15:41:18 +08:00
parent 01720f3128
commit 8d3acd80bd
2 changed files with 11 additions and 5 deletions

View File

@ -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)
}
// 检查消耗

View File

@ -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)
}