Core/Spell Mechanics: introduce global cooldown manager for server-side checks for GCD (ported from mangos)
This commit is contained in:
@@ -295,7 +295,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
|
||||
}
|
||||
|
||||
if (spellInfo->StartRecoveryCategory > 0)
|
||||
if (pet->ToCreature()->GetGlobalCooldown() > 0)
|
||||
if (pet->GetCharmInfo() && pet->GetCharmInfo()->GetGlobalCooldownMgr().HasGlobalCooldown(spellInfo))
|
||||
return;
|
||||
|
||||
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
@@ -753,7 +753,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
|
||||
}
|
||||
|
||||
if (spellInfo->StartRecoveryCategory > 0) // Check if spell is affected by GCD
|
||||
if (caster->GetTypeId() == TYPEID_UNIT && caster->ToCreature()->GetGlobalCooldown() > 0)
|
||||
if (caster->GetTypeId() == TYPEID_UNIT && caster->GetCharmInfo() && caster->GetCharmInfo()->GetGlobalCooldownMgr().HasGlobalCooldown(spellInfo))
|
||||
{
|
||||
caster->SendPetCastFail(spellId, SPELL_FAILED_NOT_READY);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user