Fix Intervene and alikes (unlike spell magnets, intervene alikes are actualy just a single target auras so we need to get caster, not owner)

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-04-21 19:01:46 +02:00
parent 3ea6bc08db
commit 3d52a41e6b
+1 -1
View File
@@ -9483,7 +9483,7 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
{ {
AuraEffectList const& hitTriggerAuras = victim->GetAuraEffectsByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER); AuraEffectList const& hitTriggerAuras = victim->GetAuraEffectsByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER);
for (AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i) for (AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i)
if (Unit* magnet = (*i)->GetBase()->GetUnitOwner()) if (Unit* magnet = (*i)->GetBase()->GetCaster())
if (magnet->isAlive() && magnet->IsWithinLOSInMap(this)) if (magnet->isAlive() && magnet->IsWithinLOSInMap(this))
if (roll_chance_i((*i)->GetAmount())) if (roll_chance_i((*i)->GetAmount()))
{ {