From 30e0c87ff9e0e118e8747d2a6a044b4e2752d9eb Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 22 Feb 2018 01:35:01 -0300 Subject: [PATCH] Core/Auras: restrict target map update only to area auras as player requires to have auras registered on load Closes #21472 --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 1 - src/server/game/Spells/Auras/SpellAuras.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 1757ee95a26..fc4f8f0ff2f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1676,7 +1676,6 @@ void AuraEffect::HandleAuraGhost(AuraApplication const* aurApp, uint8 mode, bool return; Unit* target = aurApp->GetTarget(); - if (target->GetTypeId() != TYPEID_PLAYER) return; diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 19989c2cd3e..077d51eef90 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -496,10 +496,6 @@ 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 targets; @@ -2329,6 +2325,10 @@ void UnitAura::FillTargetMap(std::unordered_map& targets, Unit* ca units.push_back(GetUnitOwner()); else { + // skip area update if owner is not in world! + if (!GetUnitOwner()->IsInWorld()) + continue; + float radius = GetSpellInfo()->Effects[effIndex].CalcRadius(caster); if (!GetUnitOwner()->HasUnitState(UNIT_STATE_ISOLATED))