From b9c8c54b28c9b986f5482f751323cd0a2e6cfb5e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 9 Sep 2021 13:38:15 -0400 Subject: [PATCH] Core/Auras: fix auras apply on player when loading. Fixes Ghost aura flags and player deathstate Port From (https://github.com/TrinityCore/TrinityCore/commit/071d112ed1f84c5be502f3121a3f362b913f33e2) --- Source/Game/Spells/Auras/Aura.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index 309ffaa87..db7cf83f1 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -2634,7 +2634,10 @@ namespace Game.Spells foreach (var targetPair in _staticApplications) { Unit target = Global.ObjAccessor.GetUnit(GetUnitOwner(), targetPair.Key); - if (target != null) + if (target == null && targetPair.Key == GetUnitOwner().GetGUID()) + target = GetUnitOwner(); + + if (target) targets.Add(target, targetPair.Value); }