From 0f67ae195a106defe59c5b443ba6c2d5ce93b43b Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 22 Jun 2026 14:31:20 -0500 Subject: [PATCH] nampower: pass slash arg to DisenchantAll, default to "greens" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bare DisenchantAll() errored — the DLL requires an arg. Forward the slash message through and default to "greens" when empty. Per nampower's player_scripts.cpp, quality is a STRING keyword ("greens", "blues", "purples", pipe-combined); numbers are interpreted as item IDs, not quality levels. tonumber() lets users pass numeric item IDs unquoted. --- modules/nampower.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/nampower.lua b/modules/nampower.lua index 9aec86cc..d8281d12 100644 --- a/modules/nampower.lua +++ b/modules/nampower.lua @@ -152,9 +152,15 @@ pfUI:RegisterModule("nampower", function () if DisenchantAll then _G.SLASH_PFDISENCHANTALL1 = "/disenchantall" _G.SLASH_PFDISENCHANTALL2 = "/dea" - SlashCmdList["PFDISENCHANTALL"] = function() - DisenchantAll() - DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Disenchanting all eligible items...") + SlashCmdList["PFDISENCHANTALL"] = function(msg) + -- DisenchantAll(itemIdOrName | quality, [includeSoulbound]). + -- Quality is a string keyword ("greens", "blues", "purples", or pipe- + -- combined). Numbers are interpreted as item IDs, not quality levels. + -- Default to "greens" — the typical disenchant-farming target. + local arg = (msg and msg ~= "") and msg or "greens" + local target = tonumber(arg) or arg + DisenchantAll(target) + DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: DisenchantAll(" .. tostring(target) .. ")") end end