diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index 586ea3ce0..1b1460d1a 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -2461,7 +2461,7 @@ namespace Game.Spells } return (effMask & availableEffectMask); } - public static Aura TryRefreshStackOrCreate(AuraCreateInfo createInfo) + public static Aura TryRefreshStackOrCreate(AuraCreateInfo createInfo, bool updateEffectMask = true) { Cypher.Assert(createInfo.Caster != null || !createInfo.CasterGUID.IsEmpty()); @@ -2491,9 +2491,13 @@ namespace Game.Spells Unit unit = createInfo.GetOwner().ToUnit(); // check effmask on owner application (if existing) - AuraApplication aurApp = foundAura.GetApplicationOfTarget(unit.GetGUID()); - if (aurApp != null) - aurApp.UpdateApplyEffectMask(effMask); + if (updateEffectMask) + { + AuraApplication aurApp = foundAura.GetApplicationOfTarget(unit.GetGUID()); + if (aurApp != null) + aurApp.UpdateApplyEffectMask(effMask); + } + return foundAura; } else diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index ba223e5e3..5612490e5 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -2133,7 +2133,7 @@ namespace Game.Spells createInfo.SetPeriodicReset(resetPeriodicTimer); createInfo.SetOwnerEffectMask(aura_effmask); - Aura aura = Aura.TryRefreshStackOrCreate(createInfo); + Aura aura = Aura.TryRefreshStackOrCreate(createInfo, false); if (aura != null) { hitInfo.HitAura = aura.ToUnitAura(); @@ -2147,7 +2147,6 @@ namespace Game.Spells hitInfo.HitAura.ModStackAmount(m_spellValue.AuraStackAmount); } - hitInfo.HitAura.SetDiminishGroup(hitInfo.DRGroup); if (!m_spellValue.Duration.HasValue) @@ -2189,6 +2188,9 @@ namespace Game.Spells hitInfo.HitAura.SetMaxDuration(hitInfo.AuraDuration); hitInfo.HitAura.SetDuration(hitInfo.AuraDuration); } + + if (createInfo.IsRefresh) + hitInfo.HitAura.AddStaticApplication(unit, aura_effmask); } } else