aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-27 10:00:36 -0600
committermegamage <none@none>2008-12-27 10:00:36 -0600
commit5d886fc46eecf75f4ccaddba32fc82251ecf6e11 (patch)
tree133bd85efbab02c2f467578f8609cd7c765e5d2c /src
parent5d842d667bdc59db3f626fa5175c12f8e2f88ea0 (diff)
*Fix the crash caused by aura triggered spells.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp6
1 files changed, 2 insertions, 4 deletions
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);
}