aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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())
{