aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-08 09:43:50 -0600
committermegamage <none@none>2009-01-08 09:43:50 -0600
commite86712bb6d613d16e9e681309295dccf5ea8dd05 (patch)
treeb4bc16b5c899ca6a543e191fdf86bccc4e9c67f1 /src/game/Spell.cpp
parent3df72ce46112e0cc99d25b7f44794c009c224f24 (diff)
*Fix a crash caused by using item.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9513149be89..539a5480aeb 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2090,7 +2090,8 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
// set timer base at cast time
ReSetTimer();
- if(m_IsTriggeredSpell || !m_casttime && !m_spellInfo->StartRecoveryTime && GetCurrentContainer() == CURRENT_GENERIC_SPELL)
+ //item: first cast may destroy item and second cast causes crash
+ if(m_IsTriggeredSpell || !m_casttime && !m_spellInfo->StartRecoveryTime && !m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL)
cast(true);
else
{