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)
This commit is contained in:
hondacrx
2021-09-09 13:38:15 -04:00
parent b027dd4da8
commit b9c8c54b28
+4 -1
View File
@@ -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);
}