From c5f5e4f736749cc1911927d60651eddebe7843f8 Mon Sep 17 00:00:00 2001 From: avitasia Date: Mon, 15 Dec 2025 12:06:08 -0800 Subject: [PATCH] new helper functions --- helper.lua | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/helper.lua b/helper.lua index fff32ca..8939100 100644 --- a/helper.lua +++ b/helper.lua @@ -108,3 +108,40 @@ function PrintSpellData(spellId) print("No spell data available") end end + +if not Nampower:HasMinimumVersion(2, 16, 0) then + return +end + +function PrintItemLocation(itemNameOrId) + local bagIndex, slot = FindPlayerItemSlot(itemNameOrId) + print(tostring(bagIndex) .. " " .. tostring(slot)) +end + +function PrintEquippedItems() + local target = "player" + if UnitExists("target") then + target = "target" + end + local data = GetEquippedItems(target) + PrintTable(data) +end + +function LogEquippedItems() + local target = "player" + if UnitExists("target") then + target = "target" + end + local data = GetEquippedItems(target) + PrintTableToCombatLog(data) +end + +function PrintBagItems() + local data = GetBagItems() + PrintTable(data) +end + +function LogBagItems() + local data = GetBagItems() + PrintTableToCombatLog(data) +end