mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
* Fix reset combopoints on miss/parry/immune and etc.
This commit is contained in:
parent
4476d483d4
commit
540a05322f
1 changed files with 12 additions and 1 deletions
|
|
@ -2528,7 +2528,18 @@ void Spell::finish(bool ok)
|
||||||
|
|
||||||
// Clear combo at finish state
|
// Clear combo at finish state
|
||||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo))
|
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)
|
// call triggered spell only at successful cast (after clear combo points -> for add some if need)
|
||||||
if(!m_TriggerSpells.empty())
|
if(!m_TriggerSpells.empty())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue