From 90c88d7ecd3c8c47a0e08fb8143602e21d6d8116 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 13 Mar 2026 07:31:44 -0700 Subject: [PATCH] feat: show equipment set name in save confirmation SMSG_EQUIPMENT_SET_SAVED: parse the set index and GUID, look up the matching set name from equipmentSets_, and show "Equipment set \"\" saved." instead of the generic message. Falls back to "Equipment set saved." when the set is not yet in the local cache (e.g. first save before SMSG_EQUIPMENT_SET_LIST arrives). --- src/game/game_handler.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index e79f878c..2eb4fc56 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -3847,11 +3847,27 @@ void GameHandler::handlePacket(network::Packet& packet) { } break; } - case Opcode::SMSG_EQUIPMENT_SET_SAVED: + case Opcode::SMSG_EQUIPMENT_SET_SAVED: { // uint32 setIndex + uint64 guid — equipment set was successfully saved - addSystemChatMessage("Equipment set saved."); + std::string setName; + if (packet.getSize() - packet.getReadPos() >= 12) { + uint32_t setIndex = packet.readUInt32(); + uint64_t setGuid = packet.readUInt64(); + for (const auto& es : equipmentSets_) { + if (es.setGuid == setGuid || + (es.setGuid == 0 && es.setId == setIndex)) { + setName = es.name; + break; + } + } + (void)setIndex; + } + addSystemChatMessage(setName.empty() + ? std::string("Equipment set saved.") + : "Equipment set \"" + setName + "\" saved."); LOG_DEBUG("Equipment set saved"); break; + } case Opcode::SMSG_PERIODICAURALOG: { // WotLK: packed_guid victim + packed_guid caster + uint32 spellId + uint32 count + effects // TBC: full uint64 victim + uint64 caster + uint32 spellId + uint32 count + effects