Core/Spells: Aura refresh improvements

Port From (https://github.com/TrinityCore/TrinityCore/commit/6cd16b0ca9ff43b025e286f336b6af03c49b37db)
This commit is contained in:
hondacrx
2022-05-24 13:02:26 -04:00
parent 1e80eb21f0
commit e775c710db
2 changed files with 12 additions and 6 deletions
+8 -4
View File
@@ -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