Skip to content

Commit d553cbf

Browse files
committed
Added slash command for tracking items.
1 parent f3b5ab7 commit d553cbf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

VGT-SlashCommand.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ function VGT.PrintHelp()
99
VGT.LogSystem("/vgt raidstart - shows raid start import code for loot masters")
1010
VGT.LogSystem("/vgt loot or /vgt drops - toggles the drop tracker window")
1111
VGT.LogSystem("/vgt ml or /vgt masterlooter - toggles the master loot tracker window")
12+
VGT.LogSystem("/vgt track [Item] - Tracks an item in the master looter window. Item can be an item's id or its link.")
1213
VGT.LogSystem("/vgt users [by version] - shows how many people online in the guild are using the addon, and optionally lists their addon versions.")
1314
end
1415

@@ -33,6 +34,17 @@ SlashCmdList["VGT"] = function(message)
3334
VGT:GetModule("dropTracker")--[[@as DropTrackerModule]]:Toggle()
3435
elseif (command == "ml" or command == "masterlooter") then
3536
VGT:GetModule("lootTracker")--[[@as LootTrackerModule]]:Toggle()
37+
elseif (command == "track") then
38+
if arg1 then
39+
local itemId = GetItemInfoInstant(arg1)
40+
if itemId and itemId > 0 then
41+
VGT:GetModule("lootTracker")--[[@as LootTrackerModule]]:TrackUnknown(itemId)
42+
else
43+
VGT.LogError("Invalid item link or id")
44+
end
45+
else
46+
VGT.LogError("No item link provided.")
47+
end
3648
else
3749
VGT.LogError("invalid command - type `/vgt help` for a list of commands")
3850
end

0 commit comments

Comments
 (0)