1 QuestHelper_File
["collect_item.lua"] = "Development Version"
2 QuestHelper_Loadtime
["collect_item.lua"] = GetTime()
4 local debug_output
= false
5 if QuestHelper_File
["collect_item.lua"] == "Development Version" then debug_output
= true end
11 -- We could probably snag data from other locations as well, but at the moment, we're not.
12 local function Tooltipy(self
)
13 if not self
.GetItem
then return end -- ughhhh, inventoryonpar
15 local _
, ilink
= self
:GetItem()
16 if not ilink
then return end
18 local id
= GetItemType(ilink
)
20 if not QHCI
[id
] then QHCI
[id
] = {} end
23 local name
, _
, quality
, ilvl
, min, itype
, isubtype
, _
, equiploc
, _
= GetItemInfo(id
)
27 item
.quality
= quality
30 item
.type = string.format("%s/%s", itype
, isubtype
)
32 local loc
= string.match(equiploc
, "INVTYPE_(.*)")
34 item
.equiplocation
= loc
36 item
.equiplocation
= nil
39 local lines
= GameTooltip
:NumLines()
40 local openable
= false
42 if _G
["GameTooltipTextLeft" .. tostring(i
)]:GetText() == ITEM_OPENABLE
then
47 openable
= "open_" .. (openable
and "yes" or "no")
48 item
[openable
] = (item
[openable
] or 0) + 1 -- so we're going to add a lot to this if the user keeps whipping their mouse over it. I'll live.
52 function QH_Collect_Item_Init(QHCData
, API
)
53 if not QHCData
.item
then QHCData
.item
= {} end
56 API
.Registrar_TooltipHook(Tooltipy
)
58 GetItemType
= API
.Utility_GetItemType
59 QuestHelper
: Assert(GetItemType
)