From 288fe6ef218d90c5c9f7161335e5feaa60268b83 Mon Sep 17 00:00:00 2001 From: QAston Date: Tue, 28 Jul 2009 14:53:08 +0200 Subject: *Restore correct drop of charges after EventAi cancast fix. --HG-- branch : trunk --- src/game/Spell.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f69c5124cc6..e6af34e9429 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2622,8 +2622,12 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura } } + if (m_caster->GetTypeId()==TYPEID_PLAYER) + ((Player*)m_caster)->SetSpellModTakingSpell(this, true); // Fill cost data (not use power for item casts m_powerCost = m_CastItem ? 0 : CalculatePowerCost(m_spellInfo, m_caster, m_spellSchoolMask); + if (m_caster->GetTypeId()==TYPEID_PLAYER) + ((Player*)m_caster)->SetSpellModTakingSpell(this, false); SpellCastResult result = CheckCast(true); if(result != SPELL_CAST_OK && !IsAutoRepeat()) //always cast autorepeat dummy for triggering -- cgit v1.2.3