aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
authordarkstalker <darkstalker@getmangos.com>2011-02-22 17:02:47 +0600
committerAzazel <azazel.kon@gmail.com>2011-02-22 17:02:47 +0600
commit1646f9d91c70263c9af3a154b59d3e43c9d3a5a8 (patch)
treec41632f6733fa584b95e624cb257691fa24ee6b4 /src/server/game/Server
parent401ec2180f06e3b7ad33345f256e19b80d1f5571 (diff)
Core/Spell Mechanics: introduce global cooldown manager for server-side checks for GCD (ported from mangos)
Diffstat (limited to 'src/server/game/Server')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/PetHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
index 9dd53dd14dc..e84817edb05 100755
--- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
@@ -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;