aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-21 23:52:30 -0600
committermegamage <none@none>2009-03-21 23:52:30 -0600
commit0dfa86cefdc28f5b043ed415aac1eae2bb83ee92 (patch)
treeaf853adefb4bb8cfbc5f22938a7171812deb9f82 /src/game/Spell.cpp
parentf3d8806ec342acc6329100c1c6e9890bc0eeeec0 (diff)
*Fix a bug of spells that use combo points.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp10
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);