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

This commit is contained in:
ariel-
2022-09-03 09:41:48 +02:00
committed by Ovahlord
parent 55577ad85b
commit ee99e76fa9

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)
{