Core/Spells: Fixed cast time calculation in many places

This commit is contained in:
Shauren committed 2013-08-15 19:04:09 +02:00
1 parent 2849526137
commit 7aff234ada
5 files changed
+13 -11

No files matched your search

+2 -2
View File
@@ -3057,14 +3057,14 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
{
m_caster->ToPlayer()->SetSpellModTakingSpell(this, true);
// calculate cast time (calculated after first CheckCast check to prevent charge counting for first CheckCast fail)
m_casttime = m_spellInfo->CalcCastTime(m_caster, this);
m_casttime = m_spellInfo->CalcCastTime(m_caster->getLevel(), this);
m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
}
else
m_casttime = 0; // Set cast time to 0 if .cheat casttime is enabled.
}
else
m_casttime = m_spellInfo->CalcCastTime(m_caster, this);
m_casttime = m_spellInfo->CalcCastTime(m_caster->getLevel(), this);
// don't allow channeled spells / spells with cast time to be casted while moving
// (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in)