From 5d886fc46eecf75f4ccaddba32fc82251ecf6e11 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 27 Dec 2008 10:00:36 -0600 Subject: *Fix the crash caused by aura triggered spells. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index bf295d03222..36e62831f61 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1140,10 +1140,6 @@ void Aura::TriggerSpell() uint64 originalCasterGUID = GetCasterGUID(); SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); - SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex); - if(!GetSpellMaxRange(srange)) - target = caster; //for druid dispel poison - SpellEntry const *auraSpellInfo = GetSpellProto(); uint32 auraId = auraSpellInfo->Id; @@ -1831,6 +1827,8 @@ void Aura::TriggerSpell() } } } + if(!GetSpellMaxRange(sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex))) + target = m_target; //for druid dispel poison m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, originalCasterGUID); } -- cgit v1.2.3