From 27227952a66562f0895745860b7efe43202b6995 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 24 Jul 2023 15:01:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E7=BD=B2=E8=A7=89=E9=86=92=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/model_hero.go | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 34110531b..9d5dc9db0 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -209,24 +209,8 @@ func (this *ModelHero) resetJuexingProperty(hero *pb.DBHero) { continue } value, _ := strconv.Atoi(awakenData.Phasebonus[1]) - switch key { - 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.ResonanceHpPro: - hero.JuexProperty[comm.Hp] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Hp]))) - case comm.ResonanceAtkPro: - hero.JuexProperty[comm.Atk] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Atk]))) - case comm.ResonanceDefPro: - hero.JuexProperty[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def]))) - default: - this.module.Errorf("unkonw Resonance property:%s", key) - } + hero.JuexProperty[key] += int32(value) + } }