fix: pet opcodes shared unlearn handler despite incompatible formats

SMSG_PET_GUIDS, SMSG_PET_DISMISS_SOUND, and SMSG_PET_ACTION_SOUND were
registered with the same handler as SMSG_PET_UNLEARN_CONFIRM. Their
different formats (GUID lists, sound IDs with position) were misread as
unlearn cost, potentially triggering a bogus unlearn confirmation dialog.

Also extracts resetWardenState() from 13 lines duplicated verbatim
between connect() and disconnect().
This commit is contained in:
Kelsi 2026-03-29 18:39:38 -07:00
parent bed859d8db
commit 6f6571fc7a
2 changed files with 35 additions and 37 deletions

View file

@ -621,6 +621,7 @@ public:
void reportPlayer(uint64_t targetGuid, const std::string& reason);
void stopCasting();
void resetCastState(); // force-clear all cast/craft/queue state without sending packets
void resetWardenState(); // clear all warden module/crypto state for connect/disconnect
void clearUnitCaches(); // clear per-unit cast states and aura caches
// ---- Phase 1: Name queries (delegated to EntityController) ----