From 995e04b80dd1b4db5c5ca1b9f9c8d545fc812582 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 3 Sep 2019 16:03:03 -0400 Subject: [PATCH] Core/Auras: unregister AuraEffect from target list before changing amount, forces recalculation at stack change Port From (https://github.com/TrinityCore/TrinityCore/commit/f51a493dc87c4002aeea84b39679e7dbe379aca5) --- Source/Game/Spells/Auras/AuraEffect.cs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 65e1d6820..f4ab27e56 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -238,9 +238,14 @@ namespace Game.Spells List effectApplications = new List(); GetApplicationList(out effectApplications); - foreach (var appt in effectApplications) - if (appt.HasEffect(GetEffIndex())) - HandleEffect(appt, handleMask, false); + foreach (var aurApp in effectApplications) + { + if (aurApp.HasEffect(GetEffIndex())) + { + aurApp.GetTarget()._RegisterAuraEffect(this, false); + HandleEffect(aurApp, handleMask, false); + } + } if (Convert.ToBoolean(handleMask & AuraEffectHandleModes.ChangeAmount)) { @@ -251,9 +256,14 @@ namespace Game.Spells CalculateSpellMod(); } - foreach (var appt in effectApplications) - if (appt.HasEffect(GetEffIndex())) - HandleEffect(appt, handleMask, true); + foreach (var aurApp in effectApplications) + { + if (aurApp.HasEffect(GetEffIndex())) + { + aurApp.GetTarget()._RegisterAuraEffect(this, true); + HandleEffect(aurApp, handleMask, true); + } + } if (GetSpellInfo().HasAttribute(SpellAttr8.AuraSendAmount)) GetBase().SetNeedClientUpdateForTargets();