diff options
author | megamage <none@none> | 2009-03-21 23:52:30 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-21 23:52:30 -0600 |
commit | 0dfa86cefdc28f5b043ed415aac1eae2bb83ee92 (patch) | |
tree | af853adefb4bb8cfbc5f22938a7171812deb9f82 | |
parent | f3d8806ec342acc6329100c1c6e9890bc0eeeec0 (diff) |
*Fix a bug of spells that use combo points.
--HG--
branch : trunk
-rw-r--r-- | src/game/Spell.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1788240fddf..82302dcd640 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2269,7 +2269,8 @@ void Spell::cast(bool skipCheck) ((Player*)m_caster)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, m_spellInfo->Id); } - //are there any spells need to be triggered after hit? + // this is related to combo points so must be done before takepower + // are there any spells need to be triggered after hit? // handle SPELL_AURA_ADD_TARGET_TRIGGER auras Unit::AuraList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER); for(Unit::AuraList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i) @@ -2286,6 +2287,10 @@ void Spell::cast(bool skipCheck) } } + // this is related to combo points so must be done before takepower + if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE) + CalculateDamageDoneForAllTargets(); + if(!m_IsTriggeredSpell) { TakePower(); @@ -2297,9 +2302,6 @@ void Spell::cast(bool skipCheck) //SendCastResult(castResult); SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... - if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE) - CalculateDamageDoneForAllTargets(); - if(m_customAttr & SPELL_ATTR_CU_CHARGE) EffectCharge(0); |