mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
fix(Core/Spells): several improvements to cooldowns (#7559)
- Reworked spell category cooldowns. - Implemented category cooldowns for pets. - Properly shows pet spell cooldowns in player's UI. - Corrected pet spell cooldowns with infinity duration. - Do not add/remove infinity spell cooldown on aura apply/remove if casted by item. - Closes #5263
This commit is contained in:
@@ -733,7 +733,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
|
||||
if (result == SPELL_CAST_OK)
|
||||
{
|
||||
pet->ToCreature()->AddSpellCooldown(spellid, 0, 0);
|
||||
pet->ToCreature()->AddSpellCooldown(spellid, 0, spellInfo->IsCooldownStartedOnEvent() ? infinityCooldownDelay : 0);
|
||||
|
||||
unit_target = spell->m_targets.GetUnitTarget();
|
||||
|
||||
|
||||
@@ -547,7 +547,15 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
|
||||
|
||||
pet->RemoveOwnedAura(spellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL);
|
||||
|
||||
pet->AddSpellCooldown(spellId, 0, 0);
|
||||
if (spellInfo->IsCooldownStartedOnEvent())
|
||||
{
|
||||
pet->AddSpellCooldown(spellId, 0, 0);
|
||||
|
||||
WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);
|
||||
data << uint32(spellInfo->Id);
|
||||
data << pet->GetGUID();
|
||||
_player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCancelGrowthAuraOpcode(WorldPacket& /*recvPacket*/)
|
||||
|
||||
Reference in New Issue
Block a user