Add quest opcodes, fix gossip select packet, and NPC combat animations

Fix CMSG_GOSSIP_SELECT_OPTION missing menuId field (was causing
ByteBufferException). Add 12 quest opcodes and clickable quest items in
gossip dialog. NPC attack/death animation callbacks now work for both
single-player and server-spawned creatures, and SMSG_ATTACKERSTATEUPDATE
triggers NPC swing animations.
This commit is contained in:
Kelsi 2026-02-06 11:45:35 -08:00
parent a20dc947e2
commit 8b98888dd2
7 changed files with 84 additions and 8 deletions

View file

@ -1161,7 +1161,7 @@ public:
/** CMSG_GOSSIP_SELECT_OPTION packet builder */
class GossipSelectOptionPacket {
public:
static network::Packet build(uint64_t npcGuid, uint32_t optionId, const std::string& code = "");
static network::Packet build(uint64_t npcGuid, uint32_t menuId, uint32_t optionId, const std::string& code = "");
};
/** SMSG_GOSSIP_MESSAGE parser */
@ -1170,6 +1170,18 @@ public:
static bool parse(network::Packet& packet, GossipMessageData& data);
};
/** CMSG_QUESTGIVER_QUERY_QUEST packet builder */
class QuestgiverQueryQuestPacket {
public:
static network::Packet build(uint64_t npcGuid, uint32_t questId);
};
/** CMSG_QUESTGIVER_ACCEPT_QUEST packet builder */
class QuestgiverAcceptQuestPacket {
public:
static network::Packet build(uint64_t npcGuid, uint32_t questId);
};
// ============================================================
// Phase 5: Vendor
// ============================================================