*Restore correct drop of charges after EventAi cancast fix.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-28 14:53:08 +02:00
parent cf1bfd1640
commit 288fe6ef21
+4
View File
@@ -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 // Fill cost data (not use power for item casts
m_powerCost = m_CastItem ? 0 : CalculatePowerCost(m_spellInfo, m_caster, m_spellSchoolMask); 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); SpellCastResult result = CheckCast(true);
if(result != SPELL_CAST_OK && !IsAutoRepeat()) //always cast autorepeat dummy for triggering if(result != SPELL_CAST_OK && !IsAutoRepeat()) //always cast autorepeat dummy for triggering