diff options
author | megamage <none@none> | 2009-02-04 10:06:16 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-04 10:06:16 -0600 |
commit | 18cbc94dd403e85da69068e61b5b90829fbb3a0a (patch) | |
tree | 098ab634a5bdfaa7f7aa01534ebb5635c218456a /src | |
parent | 36f7dd04b360a5bbd678a8352fbd73b60c6915b2 (diff) |
*Do not check power for triggered spells. This fix broken execute.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 55b6f93f8da..407e78dea7c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2100,8 +2100,9 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) { m_caster->SetCurrentCastedSpell( this ); m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]); - SendSpellStart(); } + + SendSpellStart(); } } @@ -2182,13 +2183,16 @@ void Spell::cast(bool skipCheck) if(m_caster->GetTypeId() != TYPEID_PLAYER && m_targets.getUnitTarget() && m_targets.getUnitTarget() != m_caster) m_caster->SetInFront(m_targets.getUnitTarget()); - castResult = CheckPower(); - if(castResult != 0) + if(!m_IsTriggeredSpell) { - SendCastResult(castResult); - finish(false); - SetExecutedCurrently(false); - return; + castResult = CheckPower(); + if(castResult != 0) + { + SendCastResult(castResult); + finish(false); + SetExecutedCurrently(false); + return; + } } // triggered cast called from Spell::prepare where it was already checked @@ -2224,7 +2228,7 @@ void Spell::cast(bool skipCheck) // CAST SPELL SendSpellCooldown(); - SendCastResult(castResult); + //SendCastResult(castResult); SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE) @@ -3646,16 +3650,14 @@ uint8 Spell::CanCast(bool strict) } }*/ - if(!m_skipCheck && !m_triggeredByAuraSpell) + if(!m_IsTriggeredSpell) + { if(uint8 castResult = CheckRange(strict)) return castResult; - if(!m_IsTriggeredSpell) - { if(uint8 castResult = CheckPower()) return castResult; - //if(!m_triggeredByAuraSpell) // triggered spell not affected by stun/etc if(uint8 castResult = CheckCasterAuras()) return castResult; } |