aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShocker <none@none>2010-09-14 13:28:25 +0300
committerShocker <none@none>2010-09-14 13:28:25 +0300
commitcdd8f446fa9cd82eeea716934d7aa6d99151d1a8 (patch)
tree5434462753cbc65fcbb6f61903f9e008a15075fe /src
parent5e7bec02688a4e48f52df699e780e633c45ddff6 (diff)
Core/Spells: combo points requirement should be changed before CheckCast
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 0a9f905124f..10d6ec9f769 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2981,6 +2981,10 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const * triggere
if (m_caster->GetTypeId() == TYPEID_PLAYER)
m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
+ // Set combo point requirement
+ if (m_IsTriggeredSpell || m_CastItem || !m_caster->m_movedPlayer)
+ m_needComboPoints = false;
+
SpellCastResult result = CheckCast(true);
if (result != SPELL_CAST_OK && !IsAutoRepeat()) //always cast autorepeat dummy for triggering
{
@@ -2998,10 +3002,6 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const * triggere
// Prepare data for triggers
prepareDataForTriggerSystem(triggeredByAura);
- // Set combo point requirement
- if (m_IsTriggeredSpell || m_CastItem || !m_caster->m_movedPlayer)
- m_needComboPoints = false;
-
// calculate cast time (calculated after first CheckCast check to prevent charge counting for first CheckCast fail)
m_casttime = GetSpellCastTime(m_spellInfo, this);
//m_caster->ModSpellCastTime(m_spellInfo, m_casttime, this);
@@ -5744,7 +5744,7 @@ SpellCastResult Spell::CheckCast(bool strict)
}
// check if caster has at least 1 combo point for spells that require combo points
- if (m_needComboPoints && !m_IsTriggeredSpell)
+ if (m_needComboPoints)
if (Player* plrCaster = m_caster->ToPlayer())
if (!plrCaster->GetComboPoints())
return SPELL_FAILED_NO_COMBO_POINTS;