From 58d8b88721f5bdfc7da18eae5039738103da803b Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 14 Feb 2026 15:23:32 -0800 Subject: [PATCH] Fix inspect spam and emote text lookup for other players Two bugs fixed: 1. SMSG_INSPECT_RESULTS (0x115) was falling through to the inspect handler, but this opcode is not the real inspect response. Removed the case so only SMSG_INSPECT_TALENT (0x3F4) triggers the handler. 2. EmotesText DBC layout was missing "ID" field in all 4 expansion JSON files, causing operator[] to return 0xFFFFFFFF instead of 0. This broke the dbcId reverse lookup, so other players' emotes always fell back to generic "performs an emote" text. Added ID and OthersTargetTextID/OthersNoTargetTextID to all layouts. --- Data/expansions/classic/dbc_layouts.json | 5 +++-- Data/expansions/tbc/dbc_layouts.json | 5 +++-- Data/expansions/turtle/dbc_layouts.json | 5 +++-- Data/expansions/wotlk/dbc_layouts.json | 5 +++-- src/game/game_handler.cpp | 1 - src/pipeline/dbc_layout.cpp | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Data/expansions/classic/dbc_layouts.json b/Data/expansions/classic/dbc_layouts.json index be0cd13e..b795f652 100644 --- a/Data/expansions/classic/dbc_layouts.json +++ b/Data/expansions/classic/dbc_layouts.json @@ -68,8 +68,9 @@ "GameObjectDisplayInfo": { "ID": 0, "ModelName": 1 }, "Emotes": { "ID": 0, "AnimID": 2 }, "EmotesText": { - "Command": 1, "EmoteRef": 2, - "SenderTargetTextID": 5, "SenderNoTargetTextID": 9 + "ID": 0, "Command": 1, "EmoteRef": 2, + "OthersTargetTextID": 3, "SenderTargetTextID": 5, + "OthersNoTargetTextID": 7, "SenderNoTargetTextID": 9 }, "EmotesTextData": { "ID": 0, "Text": 1 }, "Light": { diff --git a/Data/expansions/tbc/dbc_layouts.json b/Data/expansions/tbc/dbc_layouts.json index e7712f13..cc6be8fe 100644 --- a/Data/expansions/tbc/dbc_layouts.json +++ b/Data/expansions/tbc/dbc_layouts.json @@ -69,8 +69,9 @@ "GameObjectDisplayInfo": { "ID": 0, "ModelName": 1 }, "Emotes": { "ID": 0, "AnimID": 2 }, "EmotesText": { - "Command": 1, "EmoteRef": 2, - "SenderTargetTextID": 5, "SenderNoTargetTextID": 9 + "ID": 0, "Command": 1, "EmoteRef": 2, + "OthersTargetTextID": 3, "SenderTargetTextID": 5, + "OthersNoTargetTextID": 7, "SenderNoTargetTextID": 9 }, "EmotesTextData": { "ID": 0, "Text": 1 }, "Light": { diff --git a/Data/expansions/turtle/dbc_layouts.json b/Data/expansions/turtle/dbc_layouts.json index be0cd13e..b795f652 100644 --- a/Data/expansions/turtle/dbc_layouts.json +++ b/Data/expansions/turtle/dbc_layouts.json @@ -68,8 +68,9 @@ "GameObjectDisplayInfo": { "ID": 0, "ModelName": 1 }, "Emotes": { "ID": 0, "AnimID": 2 }, "EmotesText": { - "Command": 1, "EmoteRef": 2, - "SenderTargetTextID": 5, "SenderNoTargetTextID": 9 + "ID": 0, "Command": 1, "EmoteRef": 2, + "OthersTargetTextID": 3, "SenderTargetTextID": 5, + "OthersNoTargetTextID": 7, "SenderNoTargetTextID": 9 }, "EmotesTextData": { "ID": 0, "Text": 1 }, "Light": { diff --git a/Data/expansions/wotlk/dbc_layouts.json b/Data/expansions/wotlk/dbc_layouts.json index b8bedd19..90dd98a6 100644 --- a/Data/expansions/wotlk/dbc_layouts.json +++ b/Data/expansions/wotlk/dbc_layouts.json @@ -69,8 +69,9 @@ "GameObjectDisplayInfo": { "ID": 0, "ModelName": 1 }, "Emotes": { "ID": 0, "AnimID": 2 }, "EmotesText": { - "Command": 1, "EmoteRef": 2, - "SenderTargetTextID": 5, "SenderNoTargetTextID": 9 + "ID": 0, "Command": 1, "EmoteRef": 2, + "OthersTargetTextID": 3, "SenderTargetTextID": 5, + "OthersNoTargetTextID": 7, "SenderNoTargetTextID": 9 }, "EmotesTextData": { "ID": 0, "Text": 1 }, "Light": { diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index d2cea8ca..be03b1b5 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -801,7 +801,6 @@ void GameHandler::handlePacket(network::Packet& packet) { handleItemQueryResponse(packet); break; - case Opcode::SMSG_INSPECT_RESULTS: case Opcode::SMSG_INSPECT_TALENT: handleInspectResults(packet); break; diff --git a/src/pipeline/dbc_layout.cpp b/src/pipeline/dbc_layout.cpp index 750062b0..26d37014 100644 --- a/src/pipeline/dbc_layout.cpp +++ b/src/pipeline/dbc_layout.cpp @@ -107,7 +107,7 @@ void DBCLayout::loadWotlkDefaults() { // EmotesText.dbc // Fields 3-18 are 16 EmotesTextData refs: [others+target, target+target, sender+target, ?, // others+notarget, ?, sender+notarget, ?, female variants...] - layouts_["EmotesText"] = {{{ "Command", 1 }, { "EmoteRef", 2 }, + layouts_["EmotesText"] = {{{ "ID", 0 }, { "Command", 1 }, { "EmoteRef", 2 }, { "OthersTargetTextID", 3 }, { "SenderTargetTextID", 5 }, { "OthersNoTargetTextID", 7 }, { "SenderNoTargetTextID", 9 }}};