diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 8c19863a5db..6150dbb4228 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -7954,8 +7954,7 @@ void Spell::TriggerGlobalCooldown() if (!CanHaveGlobalCooldown(m_caster)) return; - int32 gcd = m_spellInfo->StartRecoveryTime; - if (!gcd) + if (!m_spellInfo->StartRecoveryCategory) return; if (m_caster->GetTypeId() == TYPEID_PLAYER) @@ -7963,20 +7962,23 @@ void Spell::TriggerGlobalCooldown() return; // Global cooldown can't leave range 1..1.5 secs - // There are some spells (mostly not cast directly by player) that have < 1 sec and > 1.5 sec global cooldowns - // but as tests show are not affected by any spell mods. - if (m_spellInfo->StartRecoveryTime >= MIN_GCD && m_spellInfo->StartRecoveryTime <= MAX_GCD) - { - // 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); + int32 gcd = m_spellInfo->StartRecoveryTime; - // Apply haste rating + // 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); + + // Apply haste rating + 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_REQ_AMMO) && !m_spellInfo->HasAttribute(SPELL_ATTR0_ABILITY)) + { gcd = int32(float(gcd) * m_caster->GetFloatValue(UNIT_MOD_CAST_SPEED)); RoundToInterval<int32>(gcd, MIN_GCD, MAX_GCD); } - m_caster->ToUnit()->GetSpellHistory()->AddGlobalCooldown(m_spellInfo, gcd); + if (gcd) + m_caster->ToUnit()->GetSpellHistory()->AddGlobalCooldown(m_spellInfo, gcd); } void Spell::CancelGlobalCooldown() |