From 0a2667aa05fff9ffaf9c8fdced61d1eb401e9786 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 22 Mar 2026 23:32:20 -0700 Subject: [PATCH] feat: add RepairAllItems for vendor auto-repair addons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RepairAllItems(useGuildBank) sends CMSG_REPAIR_ITEM to repair all equipped items at the current vendor. Checks CanMerchantRepair before sending. Optional useGuildBank flag for guild bank repairs. One of the most commonly needed addon functions — enables auto-repair addons to fix all gear in a single call when visiting a repair vendor. --- src/addons/lua_engine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/addons/lua_engine.cpp b/src/addons/lua_engine.cpp index 6921ab31..b201067b 100644 --- a/src/addons/lua_engine.cpp +++ b/src/addons/lua_engine.cpp @@ -5062,6 +5062,15 @@ void LuaEngine::registerCoreAPI() { lua_pushboolean(L, 1); // isCastable return 4; }}, + // --- Repair --- + {"RepairAllItems", [](lua_State* L) -> int { + auto* gh = getGameHandler(L); + if (gh && gh->getVendorItems().canRepair) { + bool useGuildBank = lua_toboolean(L, 1) != 0; + gh->repairAll(gh->getVendorGuid(), useGuildBank); + } + return 0; + }}, // --- Trade API --- {"AcceptTrade", [](lua_State* L) -> int { auto* gh = getGameHandler(L);