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 local _
, ilink
= self
:GetItem()
14 if not ilink
then return end
16 local id
= GetItemType(ilink
)
18 if not QHCI
[id
] then QHCI
[id
] = {} end
21 local name
, _
, quality
, ilvl
, min, itype
, isubtype
, _
, equiploc
, _
= GetItemInfo(id
)
25 item
.quality
= quality
28 item
.type = string.format("%s/%s", itype
, isubtype
)
30 local loc
= string.match(equiploc
, "INVTYPE_(.*)")
32 item
.equiplocation
= loc
34 item
.equiplocation
= nil
37 local lines
= GameTooltip
:NumLines()
38 local openable
= false
40 if _G
["GameTooltipTextLeft" .. tostring(i
)]:GetText() == ITEM_OPENABLE
then
45 openable
= "open_" .. (openable
and "yes" or "no")
46 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.
50 function QH_Collect_Item_Init(QHCData
, API
)
51 if not QHCData
.item
then QHCData
.item
= {} end
54 API
.Registrar_TooltipHook(Tooltipy
)
56 GetItemType
= API
.Utility_GetItemType
57 QuestHelper
: Assert(GetItemType
)