aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 6b1516d0848..ef31316b0ac 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1884,11 +1884,12 @@ void Aura::TriggerSpell()
}
}
- if(!caster->GetSpellMaxRangeForTarget(m_target,sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex)))
- target = m_target; //for druid dispel poison
-
if(triggeredSpellInfo)
+ {
+ if(!caster->GetSpellMaxRangeForTarget(m_target,sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex)))
+ target = m_target; //for druid dispel poison
m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, GetCasterGUID());
+ }
else if(target->GetTypeId()!=TYPEID_UNIT || !Script->EffectDummyCreature(caster, GetId(), GetEffIndex(), (Creature*)target))
sLog.outError("Aura::TriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",GetId(),GetEffIndex());
}