Fix WotLK quest accept packet parsing and wolf display fallback

- Send CMSG_QUESTGIVER_ACCEPT_QUEST with trailing u8 flag on non-classic expansions to match AzerothCore parsing and prevent opcode 393 ByteBufferException.

- Keep classic/turtle on short accept packet format (guid + questId).

- Add displayId fallback for 31048/31049 to Creature\Wolf\Wolf.m2 so Diseased Young Wolf variants render instead of being dropped.
This commit is contained in:
Kelsi 2026-02-20 03:52:22 -08:00
parent eaba378b5b
commit 1f7c220fdb
2 changed files with 20 additions and 2 deletions

View file

@ -3155,6 +3155,18 @@ void Application::buildCreatureDisplayLookups() {
std::string Application::getModelPathForDisplayId(uint32_t displayId) const {
if (displayId == 30412) return "Creature\\Gryphon\\Gryphon.m2";
if (displayId == 30413) return "Creature\\Wyvern\\Wyvern.m2";
// WotLK servers can send display IDs that do not exist in older/local
// CreatureDisplayInfo datasets. Keep those creatures visible by falling
// back to a close base model instead of dropping spawn entirely.
switch (displayId) {
case 31048: // Diseased Young Wolf variants (AzerothCore WotLK)
case 31049: // Diseased Wolf variants (AzerothCore WotLK)
return "Creature\\Wolf\\Wolf.m2";
default:
break;
}
auto itData = displayDataMap_.find(displayId);
if (itData == displayDataMap_.end()) {
// Some sources (e.g., taxi nodes) may provide a modelId directly.

View file

@ -9736,8 +9736,14 @@ void GameHandler::handleQuestDetails(network::Packet& packet) {
void GameHandler::acceptQuest() {
if (!questDetailsOpen || state != WorldState::IN_WORLD || !socket) return;
uint64_t npcGuid = currentQuestDetails.npcGuid;
auto packet = QuestgiverAcceptQuestPacket::build(
npcGuid, currentQuestDetails.questId);
// WotLK/TBC expect an additional trailing flag on CMSG_QUESTGIVER_ACCEPT_QUEST.
// Classic/Turtle use the short form (guid + questId only).
network::Packet packet(wireOpcode(Opcode::CMSG_QUESTGIVER_ACCEPT_QUEST));
packet.writeUInt64(npcGuid);
packet.writeUInt32(currentQuestDetails.questId);
if (!isActiveExpansion("classic") && !isActiveExpansion("turtle")) {
packet.writeUInt8(1); // from-gossip / auto-accept continuation flag
}
socket->send(packet);
// Add to quest log