diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-03-12 02:59:57 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-09-06 20:06:21 +0200 |
commit | 071d112ed1f84c5be502f3121a3f362b913f33e2 (patch) | |
tree | 02cbc1ff440ef69259a6a76e5f2ef605b687fc9f | |
parent | ad2d904a75389c29c7613ce876368bf9563fcaaa (diff) |
Core/Auras: fix auras apply on player when loading. Fixes Ghost aura flags and player deathstate
Closes #21472
(cherry picked from commit 214fd579c0b53885d22ab49b90201060a794f039)
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index bead326338d..f17f44377e7 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -2387,8 +2387,14 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint32>& targets, Unit* c // 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 (SpellEffectInfo const& spellEffectInfo : GetSpellInfo()->GetEffects()) { |