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:
+1
-1
@@ -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()))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user