fix(Core/Pet): prevent LoadPetFromDB to trigger a fake summon spell cast in most cases (#19277)

* add CategoryRecoveryTime check

* add RecoveryTime check
This commit is contained in:
Jelle Meeus
2024-07-04 19:20:24 +02:00
committed by GitHub
parent f84a4f1408
commit cf1185551d

View File

@@ -394,7 +394,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
// Send fake summon spell cast - this is needed for correct cooldown application for spells
// Example: 46584 - without this cooldown (which should be set always when pet is loaded) isn't set clientside
/// @todo pets should be summoned from real cast instead of just faking it?
if (petInfo->CreatedBySpellId)
if (petInfo->CreatedBySpellId && spellInfo && (spellInfo->CategoryRecoveryTime > 0 || spellInfo->RecoveryTime > 0))
{
WorldPacket data(SMSG_SPELL_GO, (8 + 8 + 4 + 4 + 2));
data << owner->GetPackGUID();