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

Closes #19301
This commit is contained in:
ariel- authored and Aokromes committed 2017-03-15 23:37:08 +01:00
1 parent 7802e88ace
commit 045307cd6e
1 file changed
+6
@@ -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)