Core/Auras: fix auras apply on player when loading. Fixes Ghost aura flags and player deathstate

This commit is contained in:
ariel- authored and Ovahlord committed 2022-09-12 09:15:17 +02:00
1 parent 55577ad85b
commit ee99e76fa9
1 file changed
+7 -1
+7 -1
View File
@@ -2446,8 +2446,14 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint8>& targets, Unit* ca
// add non area aura targets
// static applications go through spell system first, so we assume they meet conditions
for (auto const& targetPair : _staticApplications)
if (Unit* target = ObjectAccessor::GetUnit(*GetUnitOwner(), targetPair.first))
{
Unit* target = ObjectAccessor::GetUnit(*GetUnitOwner(), targetPair.first);
if (!target && targetPair.first == GetUnitOwner()->GetGUID())
target = GetUnitOwner();
if (target)
targets.emplace(target, targetPair.second);
}
for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
{