Core/Auras: restrict target map update only to area auras as player requires to have auras registered on load

Closes #21472
This commit is contained in:
ariel-
2018-02-22 01:35:01 -03:00
committed by Aokromes
parent ca312ced05
commit 30e0c87ff9
2 changed files with 4 additions and 5 deletions

View File

@@ -1676,7 +1676,6 @@ void AuraEffect::HandleAuraGhost(AuraApplication const* aurApp, uint8 mode, bool
return;
Unit* target = aurApp->GetTarget();
if (target->GetTypeId() != TYPEID_PLAYER)
return;

View File

@@ -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<Unit*, uint8> targets;
@@ -2329,6 +2325,10 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint8>& 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))