mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Spells: Fix bug with double haste rating for channeled spells
This commit is contained in:
@@ -830,9 +830,12 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create)
|
||||
{
|
||||
// Haste modifies periodic time of channeled spells
|
||||
if (IsChanneledSpell(m_spellProto))
|
||||
caster->ModSpellCastTime(m_spellProto, m_amplitude);
|
||||
{
|
||||
if (m_spellProto->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
caster->ModSpellCastTime(m_spellProto, m_amplitude);
|
||||
}
|
||||
// and periodic time of auras affected by SPELL_AURA_PERIODIC_HASTE
|
||||
if (caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellProto) || m_spellProto->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
else if (caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellProto) || m_spellProto->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
m_amplitude = int32(m_amplitude * caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1505,11 +1505,13 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive);
|
||||
|
||||
// Haste modifies duration of channeled spells
|
||||
if (IsChanneledSpell(m_spellInfo) && m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this);
|
||||
|
||||
if (IsChanneledSpell(m_spellInfo))
|
||||
{
|
||||
if (m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this);
|
||||
}
|
||||
// and duration of auras affected by SPELL_AURA_PERIODIC_HASTE
|
||||
if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
else if (m_originalCaster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, aurSpellInfo) || (m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
|
||||
duration = int32(duration * m_originalCaster->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
|
||||
if (duration != m_spellAura->GetMaxDuration())
|
||||
|
||||
Reference in New Issue
Block a user