diff options
| author | QAston <none@none> | 2009-03-22 10:20:15 +0100 |
|---|---|---|
| committer | QAston <none@none> | 2009-03-22 10:20:15 +0100 |
| commit | 328ecda864b60f5ecef0f9273dc761a52763c505 (patch) | |
| tree | a62255c6540b5d4c2082fff3c6f03b3a5fe74ea0 /src | |
| parent | 0a58b73d7d11cb9a2717648d4f80f93a76205777 (diff) | |
*Take ComboPoints after doing spell effects.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Spell.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 82302dcd640..4ae1e693a55 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1021,6 +1021,15 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo); } + // Take combo points after effects handling (combo points are used in effect handling) + if(!m_IsTriggeredSpell && !m_CastItem + && NeedsComboPoints(m_spellInfo) + && m_caster->GetTypeId()==TYPEID_PLAYER + && target->targetGUID==m_targets.getUnitTargetGUID() + && missInfo!= SPELL_MISS_NONE + && missInfo != SPELL_MISS_MISS) + ((Player*)m_caster)->ClearComboPoints(); + // Call scripted function for AI if this spell is casted upon a creature (except pets) if(IS_CREATURE_GUID(target->targetGUID)) { @@ -2293,6 +2302,7 @@ void Spell::cast(bool skipCheck) if(!m_IsTriggeredSpell) { + // Powers have to be taken before SendSpellGo TakePower(); TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot } @@ -3251,8 +3261,6 @@ void Spell::TakePower() } break; } - if(hit && NeedsComboPoints(m_spellInfo)) - ((Player*)m_caster)->ClearComboPoints(); } Powers powerType = Powers(m_spellInfo->powerType); |
