Skip to content

Commit bdc574d

Browse files
committed
slash commands are localized now
1 parent 85e3f3c commit bdc574d

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

AddOns/!!!ClassicAPI/Util/SlashCommandsRegistry.lua

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ function RegisterNewSlashCommand(callback, command, commandAlias)
66
SlashCmdList[name] = callback;
77
end
88

9-
-- /focus [unit] — mirrors 4.3.4's SecureCmdList["FOCUS"]. The engine's
10-
-- FocusUnit polyfill (src/unit/Focus.cpp) resolves any unit token —
11-
-- "target", "party1", a GUID string, etc. — and defaults to "target"
12-
-- when called with no argument. We can't honor macro conditionals
13-
-- (no SecureCmdOptionParse on 1.12) but plain unit-token + no-arg
14-
-- usage is identical to modern.
15-
RegisterNewSlashCommand(function(msg)
9+
SlashCmdList["FOCUS"] = function(msg)
1610
if msg == "" then
1711
FocusUnit();
1812
else
1913
FocusUnit(msg);
2014
end
21-
end, "focus", "focus");
15+
end
16+
17+
SlashCmdList["CLEARFOCUS"] = function(msg)
18+
ClearFocus()
19+
end
2220

23-
RegisterNewSlashCommand(ClearFocus, "clearfocus", "clearfocus");
21+
SlashCmdList["EQUIP_SET"] = function(msg)
22+
if msg ~= "" then
23+
C_EquipmentSet.UseEquipmentSet(C_EquipmentSet.GetEquipmentSetID(msg))
24+
end
25+
end

AddOns/!!!ClassicAPI/locales/enUS.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ ITEMS_IN_INVENTORY = "%d |4item:items; in inventory";
88
ITEM_SLOTS_IGNORED = "%d |4slot:slots; ignored";
99
ITEM_MISSING = "%s missing";
1010
ITEMS_NOT_IN_INVENTORY = "%d |4item:items; missing";
11+
SLASH_CLEARFOCUS1 = "/clearfocus";
12+
SLASH_CLEARFOCUS2 = "/clearfocus";
13+
SLASH_EQUIP_SET1 = "/equipset";
14+
SLASH_EQUIP_SET2 = "/equipset";
15+
SLASH_FOCUS1 = "/focus";
16+
SLASH_FOCUS2 = "/focus";
1117
TARGETFOCUS = "Target Focus";

0 commit comments

Comments
 (0)