diff options
author | megamage <none@none> | 2009-09-01 00:17:39 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-09-01 00:17:39 -0500 |
commit | 33a0155281ca0ffb01cf47cddd690249c134ad89 (patch) | |
tree | bb016d3c03b5aa07a5e212e7e6590685559dc1c6 /src/game/Spell.cpp | |
parent | 83ea85f9e46bbda023fb5d540c08faa10fc980ed (diff) |
*Allow pet to have combo points.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index a7fd33405c6..2f0b3a33a9f 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2675,7 +2675,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura prepareDataForTriggerSystem(triggeredByAura); // Set combo point requirement - if (m_IsTriggeredSpell || m_CastItem || m_caster->GetTypeId()!=TYPEID_PLAYER) + 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) @@ -3173,13 +3173,16 @@ void Spell::_handle_immediate_phase() void Spell::_handle_finish_phase() { - // Take for real after all targets are processed - if (m_needComboPoints) - ((Player*)m_caster)->ClearComboPoints(); + if(m_caster->m_movedPlayer) + { + // Take for real after all targets are processed + if (m_needComboPoints) + m_caster->m_movedPlayer->ClearComboPoints(); - // Real add combo points from effects - if (m_caster->GetTypeId()==TYPEID_PLAYER) - ((Player*)m_caster)->GainSpellComboPoints(m_comboPointGain); + // Real add combo points from effects + if (m_comboPointGain) + m_caster->m_movedPlayer->GainSpellComboPoints(m_comboPointGain); + } // spell log if(m_needSpellLog) |