From 5ceba735049d63626f40dda9e8852c8f29fc0483 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 3 Sep 2022 11:10:53 +0200 Subject: [PATCH] Core/Spells: Corrected haste affecting GCDs to match 3.3.5 client logic --- src/server/game/Spells/Spell.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9d4a1da355..e82a4b52ea 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -8469,11 +8469,16 @@ void Spell::TriggerGlobalCooldown() if (!CanHaveGlobalCooldown(m_caster)) return; - int32 gcd = m_spellInfo->StartRecoveryTime; - if (!gcd || !m_spellInfo->StartRecoveryCategory) + if (!m_spellInfo->StartRecoveryCategory) return; + if (m_caster->GetTypeId() == TYPEID_PLAYER) + if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_COOLDOWN)) + return; + // Global cooldown can't leave range 1..1.5 secs + int32 gcd = m_spellInfo->StartRecoveryTime; + // gcd modifier auras are applied only to own spells and only players have such mods if (Player* modOwner = m_caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_GLOBAL_COOLDOWN, gcd, this);