aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-02-15 13:53:41 -0300
committerariel- <ariel-@users.noreply.github.com>2018-02-15 13:53:41 -0300
commita36be9ebdb5563d333fdaf2fc317da90b4f8c626 (patch)
tree036169c753b55dae87faaf3b9a26ce3e413198ee /src
parent42a11e97d5ef785bfe0e41f74469da3ec7aec697 (diff)
Core/Auras: skip target map update for one world tick if owner is not yet in world
Closes #21426
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 2b29206f9c7..786bc2c2e63 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -555,6 +555,10 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
m_updateTargetMapInterval = UPDATE_TARGET_MAP_INTERVAL;
+ // skip update if owner is not in world!
+ if (!GetOwner()->IsInWorld())
+ return;
+
// fill up to date target list
// target, effMask
std::unordered_map<Unit*, uint8> targets;