*Do not check power for triggered spells. This fix broken execute.
--HG-- branch : trunk
This commit is contained in:
+6382
File diff suppressed because it is too large
Load Diff
+14
-12
@@ -2100,8 +2100,9 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
|
|||||||
{
|
{
|
||||||
m_caster->SetCurrentCastedSpell( this );
|
m_caster->SetCurrentCastedSpell( this );
|
||||||
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
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)
|
if(m_caster->GetTypeId() != TYPEID_PLAYER && m_targets.getUnitTarget() && m_targets.getUnitTarget() != m_caster)
|
||||||
m_caster->SetInFront(m_targets.getUnitTarget());
|
m_caster->SetInFront(m_targets.getUnitTarget());
|
||||||
|
|
||||||
castResult = CheckPower();
|
if(!m_IsTriggeredSpell)
|
||||||
if(castResult != 0)
|
|
||||||
{
|
{
|
||||||
SendCastResult(castResult);
|
castResult = CheckPower();
|
||||||
finish(false);
|
if(castResult != 0)
|
||||||
SetExecutedCurrently(false);
|
{
|
||||||
return;
|
SendCastResult(castResult);
|
||||||
|
finish(false);
|
||||||
|
SetExecutedCurrently(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// triggered cast called from Spell::prepare where it was already checked
|
// triggered cast called from Spell::prepare where it was already checked
|
||||||
@@ -2224,7 +2228,7 @@ void Spell::cast(bool skipCheck)
|
|||||||
|
|
||||||
// CAST SPELL
|
// CAST SPELL
|
||||||
SendSpellCooldown();
|
SendSpellCooldown();
|
||||||
SendCastResult(castResult);
|
//SendCastResult(castResult);
|
||||||
SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...
|
SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...
|
||||||
|
|
||||||
if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE)
|
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))
|
if(uint8 castResult = CheckRange(strict))
|
||||||
return castResult;
|
return castResult;
|
||||||
|
|
||||||
if(!m_IsTriggeredSpell)
|
|
||||||
{
|
|
||||||
if(uint8 castResult = CheckPower())
|
if(uint8 castResult = CheckPower())
|
||||||
return castResult;
|
return castResult;
|
||||||
|
|
||||||
//if(!m_triggeredByAuraSpell) // triggered spell not affected by stun/etc
|
|
||||||
if(uint8 castResult = CheckCasterAuras())
|
if(uint8 castResult = CheckCasterAuras())
|
||||||
return castResult;
|
return castResult;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user