diff options
author | megamage <none@none> | 2009-03-16 17:21:56 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-16 17:21:56 -0600 |
commit | d41910ec2999cfa45779edc073f15bcdc709e257 (patch) | |
tree | 0094e06d7ae7e7b36cf76497ef7f4c020040568d /src | |
parent | 950afd25443615c4cb309278dcc78479642d240e (diff) |
*Fix a crash in aura::triggerspell.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 7 |
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()); } |