Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
21fe779dfb
12 files changed
+91
-27
No files matched your search
@@ -3051,18 +3051,20 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
|
||||
// Prepare data for triggers
|
||||
prepareDataForTriggerSystem(triggeredByAura);
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
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);
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (Player* player = m_caster->ToPlayer())
|
||||
{
|
||||
m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
|
||||
|
||||
// Set casttime to 0 if .cheat casttime is enabled.
|
||||
if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_CASTTIME))
|
||||
m_casttime = 0;
|
||||
if (!m_caster->ToPlayer()->GetCommandStatus(CHEAT_CASTTIME))
|
||||
{
|
||||
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(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(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)
|
||||
|
||||
Reference in new issue
Block a user