From a2f9ccc9b9782005eb1eb2f97aad302219c9ca7a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 14 Mar 2026 05:39:00 -0700 Subject: [PATCH] fix(vendor): detect repair NPC flag correctly --- src/game/game_handler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index b6029be8..d56e6e52 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -19820,13 +19820,14 @@ void GameHandler::handleListInventory(network::Packet& packet) { bool savedCanRepair = currentVendorItems.canRepair; // preserve armorer flag set via gossip path if (!ListInventoryParser::parse(packet, currentVendorItems)) return; - // Check NPC_FLAG_REPAIR (0x40) on the vendor entity — this handles vendors that open + // Check NPC_FLAG_REPAIR (0x1000) on the vendor entity — this handles vendors that open // directly without going through the gossip armorer option. if (!savedCanRepair && currentVendorItems.vendorGuid != 0) { auto entity = entityManager.getEntity(currentVendorItems.vendorGuid); if (entity && entity->getType() == ObjectType::UNIT) { auto unit = std::static_pointer_cast(entity); - if (unit->getNpcFlags() & 0x40) { // NPC_FLAG_REPAIR + // MaNGOS/Trinity: UNIT_NPC_FLAG_REPAIR = 0x00001000. + if (unit->getNpcFlags() & 0x1000) { savedCanRepair = true; } }