mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 303
This commit is contained in:
commit
50e538c32f
11 changed files with 284 additions and 81 deletions
|
|
@ -2548,7 +2548,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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue