fix(Core/Spells): Melee spells are not affected by cast haste modifiers. Source: TrinityCore. (#9501)

Fixes #5136
This commit is contained in:
UltraNix
2021-12-10 05:21:49 +01:00
committed by GitHub
parent 52d8e1b68a
commit e5cbba1c4c

View File

@@ -8344,7 +8344,12 @@ void Spell::TriggerGlobalCooldown()
m_caster->ToPlayer()->ApplySpellMod(m_spellInfo->Id, SPELLMOD_GLOBAL_COOLDOWN, gcd, this); m_caster->ToPlayer()->ApplySpellMod(m_spellInfo->Id, SPELLMOD_GLOBAL_COOLDOWN, gcd, this);
// Apply haste rating // Apply haste rating
gcd = int32(float(gcd) * m_caster->GetFloatValue(UNIT_MOD_CAST_SPEED)); if (m_spellInfo->StartRecoveryCategory == 133 && m_spellInfo->StartRecoveryTime == 1500 && m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE &&
m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_RANGED && !m_spellInfo->HasAttribute(SPELL_ATTR0_USES_RANGED_SLOT) && !m_spellInfo->HasAttribute(SPELL_ATTR0_IS_ABILITY))
{
gcd = int32(float(gcd) * m_caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
}
if (gcd < MIN_GCD) if (gcd < MIN_GCD)
gcd = MIN_GCD; gcd = MIN_GCD;
else if (gcd > MAX_GCD) else if (gcd > MAX_GCD)