diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 4b038205..dd9397da 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -534,6 +534,7 @@ void Ability::RecalcAttrRuduce(int attr_id) } list_head* pos = nullptr; list_head* next = nullptr; + bool inited = false; float new_val = 0.0f; list_for_each_safe(pos, next, head) { AttrRuduce* e = list_entry(pos, @@ -547,7 +548,12 @@ void Ability::RecalcAttrRuduce(int attr_id) break; case kHVAT_Dmg: { - new_val *= 1.0f - e->value; + if (inited) { + new_val *= 1.0f - e->value; + } else { + new_val = 1.0f - e->value; + inited = true; + } } break; default: