diff --git a/comm/const.go b/comm/const.go index d55930bc8..a89deefce 100644 --- a/comm/const.go +++ b/comm/const.go @@ -995,13 +995,6 @@ const ( RaceSy int32 = 5 // 闪耀 ) -// 共鸣属性 -const ( - ResonanceHpPro = "hppro" - ResonanceAtkPro = "atkpro" - ResonanceDefPro = "defpro" -) - const ( MailPeackReward = "PeackReward" ) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index e22cd8a24..759ffb06e 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -201,59 +201,12 @@ func (this *ModelHero) resetJuexingProperty(hero *pb.DBHero) { awakenData, err := this.module.configure.GetHeroAwakenConfig(hero.HeroID, int32(i)) if err == nil { for _, v := range awakenData.Phasebonus { - value := v.D - switch v.S { - case comm.Hp: - hero.JuexProperty[comm.Hp] += int32(value) - case comm.Def: - hero.JuexProperty[comm.Def] += int32(value) - case comm.Atk: - hero.JuexProperty[comm.Atk] += int32(value) - case comm.Speed: - hero.JuexProperty[comm.Speed] += int32(value) - case comm.Cri: - hero.JuexProperty[comm.Cri] += int32(value) - case comm.ResonanceHpPro: - hero.JuexProperty[comm.ResonanceHpPro] += int32(value) - //hero.JuexProperty[comm.Hp] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Hp]))) - case comm.ResonanceAtkPro: - hero.JuexProperty[comm.ResonanceAtkPro] += int32(value) - //hero.JuexProperty[comm.Atk] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Atk]))) - case comm.ResonanceDefPro: - hero.JuexProperty[comm.ResonanceDefPro] += int32(value) - //hero.JuexProperty[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def]))) - - default: - this.module.Errorf("unkonw Resonance property:%s", v.S) - } + hero.JuexProperty[v.S] += int32(v.D) } } } } -// 觉醒 -func (this *ModelHero) setJuexingProperty(hero *pb.DBHero, key string, value int32) { - switch key { - case comm.Hp: - hero.JuexProperty[comm.Hp] += value - case comm.Def: - hero.JuexProperty[comm.Def] += value - case comm.Atk: - hero.JuexProperty[comm.Atk] += value - case comm.Speed: - hero.JuexProperty[comm.Speed] += value - case comm.ResonanceHpPro: - hero.JuexProperty[comm.ResonanceHpPro] += value - //hero.JuexProperty[comm.Hp] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Hp]))) - case comm.ResonanceAtkPro: - hero.JuexProperty[comm.ResonanceAtkPro] += value - //hero.JuexProperty[comm.Atk] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Atk]))) - case comm.ResonanceDefPro: - hero.JuexProperty[comm.ResonanceDefPro] += value - //hero.JuexProperty[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def]))) - } -} - // 设置装备属性 func (this *ModelHero) setEquipProperty(hero *pb.DBHero, equip []*pb.DB_Equipment) { @@ -895,25 +848,6 @@ func (this *ModelHero) SetHeroFetterProperty(hero *pb.DBHero, attr []*cfg.Gameat } for _, key := range attr { hero.Fetters[key.A] += key.N - // value := key.N - // switch key.A { - // case comm.Hp: - // hero.Fetters[comm.Hp] += value - // case comm.Def: - // hero.Fetters[comm.Def] += value - // case comm.Atk: - // hero.Fetters[comm.Atk] += value - // case comm.Speed: - // hero.Fetters[comm.Speed] += value - // case comm.HpPro: - // hero.Fetters[comm.Hp] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Hp]))) - // case comm.AtkPro: - // hero.Fetters[comm.Atk] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Atk]))) - // case comm.DefPro: - // hero.Fetters[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def]))) - // default: - // this.module.Errorf("unkonw hero fetter property:%v", key) - // } } }