Core/Spells: Implemented SPELL_AURA_MOD_FIXATE
Port From (https://github.com/TrinityCore/TrinityCore/commit/8b9eaf0bdf9c6ae463c78d6a952330daaa1dcb63)
This commit is contained in:
@@ -2432,6 +2432,24 @@ namespace Game.Spells
|
|||||||
caster.GetThreatManager().TauntUpdate();
|
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 ***/
|
/*** CONTROL ***/
|
||||||
/*****************************/
|
/*****************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user