Correct how Enrage armor reduction works.

Canceling the visible aura should not instantly restore your armor to normal, it's a separate aura with the same duration.
This commit is contained in:
ratkosrb
2022-10-13 07:23:52 +03:00
parent fe6cf84d39
commit 6135040f85
4 changed files with 30 additions and 30 deletions
-24
View File
@@ -138,30 +138,6 @@ void Player::UpdateArmor()
}
}
#if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_8_4
// Add dummy effects from spells (check class and other conditions first for optimization)
if (GetClass() == CLASS_DRUID)
{
ShapeshiftForm form = GetShapeshiftForm();
if ((form == FORM_DIREBEAR) || (form == FORM_BEAR))
{
Unit::AuraList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
for (const auto itr : mDummy)
{
// Enrage
if (itr->GetId() == 5229)
{
float enrageModifier = 0.0f;
enrageModifier = GetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE);
enrageModifier *= itr->GetModifier()->m_amount / 100.0f;
dynamic += enrageModifier;
break;
}
}
}
}
#endif
m_auraModifiersGroup[UNIT_MOD_ARMOR][TOTAL_VALUE] += dynamic;
int32 value = GetTotalResistanceValue(SPELL_SCHOOL_NORMAL);