Core/Auras: Implemented SPELL_AURA_PHASE_ALWAYS_VISIBLE

Port From (https://github.com/TrinityCore/TrinityCore/commit/c9344c145ad1f981492c35d4aad7ca7a60e9f8f2)
This commit is contained in:
hondacrx
2021-03-04 12:18:36 -05:00
parent 5b09d675dd
commit d7d4722d4b
4 changed files with 33 additions and 10 deletions
+19
View File
@@ -1273,6 +1273,25 @@ namespace Game.Spells
PhasingHandler.RemovePhaseGroup(target, (uint)GetMiscValueB(), true);
}
[AuraEffectHandler(AuraType.PhaseAlwaysVisible)]
void HandlePhaseAlwaysVisible(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.Real))
return;
Unit target = aurApp.GetTarget();
if (!apply)
PhasingHandler.SetAlwaysVisible(target, true, true);
else
{
if (target.HasAuraType(AuraType.PhaseAlwaysVisible) || (target.IsPlayer() && target.ToPlayer().IsGameMaster()))
return;
PhasingHandler.SetAlwaysVisible(target, false, true);
}
}
/**********************/
/*** UNIT MODEL ***/
/**********************/