Allow pet cast spells unaffected by global cooldown, while global cooldown is active

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-01-13 10:03:09 +01:00
parent d8d346ef1f
commit ac4bab5451

View File

@@ -224,8 +224,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
case ACT_ENABLED: // 0xC1 spell
{
Unit* unit_target = NULL;
if (((Creature*)pet)->GetGlobalCooldown() > 0)
return;
if(guid2)
unit_target = ObjectAccessor::GetUnit(*_player,guid2);
@@ -238,6 +236,10 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
return;
}
if (spellInfo->StartRecoveryCategory > 0)
if (((Creature*)pet)->GetGlobalCooldown() > 0)
return;
for (uint32 i = 0; i < 3; ++i)
{
if(spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_AREA_ENEMY_SRC || spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_AREA_ENEMY_DST || spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_DYNOBJ_ENEMY)