Core/Conditions: allow spellclick conditions to properly work for aura apply/remove

Port From (https://github.com/TrinityCore/TrinityCore/commit/edf12fd6a1b989d7785bc0619002eda1ccc87368)
This commit is contained in:
hondacrx
2021-12-27 15:23:22 -05:00
parent 08678c970e
commit 7a47eaeb24
5 changed files with 37 additions and 25 deletions
+10
View File
@@ -3601,6 +3601,11 @@ namespace Game.Entities
}
aura.HandleAuraSpecificMods(aurApp, caster, false, false);
Player player = ToPlayer();
if (player != null)
if (Global.ConditionMgr.IsSpellUsedInSpellClickConditions(aurApp.GetBase().GetId()))
player.UpdateVisibleGameobjectsOrSpellClicks();
}
public void _UnapplyAura(AuraApplication aurApp, AuraRemoveMode removeMode)
@@ -3810,6 +3815,11 @@ namespace Game.Entities
if (Convert.ToBoolean(effMask & 1 << i) && !(aurApp.HasRemoveMode()))
aurApp._HandleEffect(i, true);
}
Player player = ToPlayer();
if (player != null)
if (Global.ConditionMgr.IsSpellUsedInSpellClickConditions(aurApp.GetBase().GetId()))
player.UpdateVisibleGameobjectsOrSpellClicks();
}
public void _AddAura(UnitAura aura, Unit caster)