Core/Auras: unregister AuraEffect from target list before changing amount, forces recalculation at stack change

Closes #19301
This commit is contained in:
ariel-
2017-03-15 13:46:56 -03:00
committed by Aokromes
parent 7802e88ace
commit 045307cd6e

View File

@@ -709,7 +709,10 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply)
GetApplicationList(effectApplications);
for (AuraApplication* aurApp : effectApplications)
{
aurApp->GetTarget()->_RegisterAuraEffect(this, false);
HandleEffect(aurApp, handleMask, false);
}
if (handleMask & AURA_EFFECT_HANDLE_CHANGE_AMOUNT)
{
@@ -721,7 +724,10 @@ void AuraEffect::ChangeAmount(int32 newAmount, bool mark, bool onStackOrReapply)
}
for (AuraApplication* aurApp : effectApplications)
{
aurApp->GetTarget()->_RegisterAuraEffect(this, true);
HandleEffect(aurApp, handleMask, true);
}
}
void AuraEffect::HandleEffect(AuraApplication * aurApp, uint8 mode, bool apply)