Core/Spells: Grounding Totem should respect line of sight

This commit is contained in:
Sarjuuk
2011-07-24 00:44:29 +07:00
committed by tobmaps
parent bfb5032937
commit f526b61e1a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -10206,7 +10206,7 @@ Unit* Unit::SelectMagnetTarget(Unit* victim, SpellEntry const* spellInfo)
Unit::AuraEffectList const& magnetAuras = victim->GetAuraEffectsByType(SPELL_AURA_SPELL_MAGNET);
for (Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
if (Unit* magnet = (*itr)->GetBase()->GetUnitOwner())
if (magnet->isAlive())
if (magnet->isAlive() && IsWithinLOSInMap(magnet))
{
(*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
return magnet;