aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-03-12 02:59:57 -0300
committerariel- <ariel-@users.noreply.github.com>2018-03-12 02:59:57 -0300
commit214fd579c0b53885d22ab49b90201060a794f039 (patch)
treeaf1e7a34771ccba8e528ca681dd318edba9d8162 /src
parent8a8c7793c435c0fd98278d9b5f960db4e5c091be (diff)
Core/Auras: fix auras apply on player when loading. Fixes Ghost aura flags and player deathstate
Closes #21472
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp8
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 91f6cdeae49..7234e7cce06 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -2603,8 +2603,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)
{