From b9ecc26f50987d155bfe0ef15cdbe3969c16f7fa Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 29 Mar 2026 17:52:43 -0700 Subject: [PATCH] fix: misplaced brace included book handlers inside LOOT_CLEAR_MONEY loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The for-loop over {SMSG_LOOT_CLEAR_MONEY} was missing its closing brace, so SMSG_READ_ITEM_OK and SMSG_READ_ITEM_FAILED registrations were inside the loop body. Works by accident (single iteration) but fragile and misleading — future additions to the loop would re-register book handlers. --- src/game/inventory_handler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/inventory_handler.cpp b/src/game/inventory_handler.cpp index b0ff75ca..bcba01e8 100644 --- a/src/game/inventory_handler.cpp +++ b/src/game/inventory_handler.cpp @@ -86,6 +86,7 @@ void InventoryHandler::registerOpcodes(DispatchTable& table) { }; for (auto op : { Opcode::SMSG_LOOT_CLEAR_MONEY }) { table[op] = [](network::Packet& /*packet*/) {}; + } // ---- Read item (books) (moved from GameHandler) ---- table[Opcode::SMSG_READ_ITEM_OK] = [this](network::Packet& packet) { @@ -97,7 +98,6 @@ void InventoryHandler::registerOpcodes(DispatchTable& table) { owner_.addSystemChatMessage("You cannot read this item."); packet.skipAll(); }; - } // ---- Loot roll start / notifications ---- table[Opcode::SMSG_LOOT_START_ROLL] = [this](network::Packet& packet) {