* Fix reset combopoints on miss/parry/immune and etc.

This commit is contained in:
DiSlord 2008-11-09 01:53:03 +03:00
parent 4476d483d4
commit 540a05322f

View file

@ -2528,7 +2528,18 @@ void Spell::finish(bool ok)
// Clear combo at finish state
if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo))
((Player*)m_caster)->ClearComboPoints();
{
// Not drop combopoints if any miss exist
bool needDrop = true;
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
if (ihit->missCondition != SPELL_MISS_NONE)
{
needDrop = false;
break;
}
if (needDrop)
((Player*)m_caster)->ClearComboPoints();
}
// call triggered spell only at successful cast (after clear combo points -> for add some if need)
if(!m_TriggerSpells.empty())