mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 12:40:02 +00:00
Route slash registration through pfUI.api.RegisterSlashCommand
The RegisterSlashCommand helper in api/api.lua was effectively unused (only macrotweak called it); every other command hand-rolled the SLASH_*/SlashCmdList pair. Convert the existing manual registrations to the helper with force=true, preserving the current always-bind behavior while centralizing the pattern behind one code path (and its _G. and conflict-check handling). Left as-is: pfUI.lua's /rl, /pfui, /gm (registered before api.lua defines the helper) and the vendored libs' debug commands.
This commit is contained in:
+2
-3
@@ -352,8 +352,7 @@ pfUI:RegisterModule("unitxp", function ()
|
||||
end
|
||||
|
||||
-- Debug command to test UnitXP indicators
|
||||
_G.SLASH_PFUNITXP1 = "/pfunitxp"
|
||||
SlashCmdList["PFUNITXP"] = function()
|
||||
pfUI.api.RegisterSlashCommand("PFUNITXP", { "/pfunitxp" }, function()
|
||||
local chat = DEFAULT_CHAT_FRAME
|
||||
chat:AddMessage("|cff33ffccpfUI|r: UnitXP Indicator Debug")
|
||||
|
||||
@@ -387,5 +386,5 @@ pfUI:RegisterModule("unitxp", function ()
|
||||
else
|
||||
chat:AddMessage(" Target frame: |cffff0000NOT found|r")
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
end)
|
||||
Reference in New Issue
Block a user