Core/Spells: Implemented SPELL_AURA_MOD_FIXATE

Port From (https://github.com/TrinityCore/TrinityCore/commit/8b9eaf0bdf9c6ae463c78d6a952330daaa1dcb63)
This commit is contained in:
hondacrx
2024-02-04 00:35:42 -05:00
parent 47355bfa52
commit 0abe183fc9
+18
View File
@@ -2432,6 +2432,24 @@ namespace Game.Spells
caster.GetThreatManager().TauntUpdate();
}
[AuraEffectHandler(AuraType.ModFixate)]
void HandleAuraModFixate(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.Real))
return;
Unit caster = GetCaster();
Unit target = aurApp.GetTarget();
if (caster == null || !caster.IsAlive() || !target.IsAlive() || !caster.CanHaveThreatList())
return;
if (apply)
caster.GetThreatManager().FixateTarget(target);
else
caster.GetThreatManager().ClearFixate();
}
/*****************************/
/*** CONTROL ***/
/*****************************/