Core/Spells: fix conflicts between duration and cast time of channeled spells
This commit is contained in:
1 parent
5c449b50aa
commit
246e568bbd
4 files changed
+23
-9
No files matched your search
@@ -2624,7 +2624,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
|
||||
// Haste modifies duration of channeled spells
|
||||
if (m_spellInfo->IsChanneled())
|
||||
m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this);
|
||||
m_originalCaster->ModSpellDurationTime(aurSpellInfo, duration, this);
|
||||
// and duration of auras affected by SPELL_AURA_PERIODIC_HASTE
|
||||
else if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_HASTE_AFFECT_DURATION))
|
||||
duration = int32(duration * m_originalCaster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
@@ -3258,7 +3258,7 @@ void Spell::handle_immediate()
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
// Apply haste mods
|
||||
m_caster->ModSpellCastTime(m_spellInfo, duration, this);
|
||||
m_caster->ModSpellDurationTime(m_spellInfo, duration, this);
|
||||
|
||||
m_spellState = SPELL_STATE_CASTING;
|
||||
m_caster->AddInterruptMask(m_spellInfo->ChannelInterruptFlags);
|
||||
|
||||
Reference in new issue
Block a user