1 QuestHelper_File
["collect_item.lua"] = "Development Version"
3 local debug_output
= false
4 if QuestHelper_File
["collect_item.lua"] == "Development Version" then debug_output
= true end
10 -- We could probably snag data from other locations as well, but at the moment, we're not.
11 local function Tooltipy(self
, ...)
12 local _
, ilink
= self
:GetItem()
13 if not ilink
then return end
15 local id
= GetItemType(ilink
)
17 if not QHCI
[id
] then QHCI
[id
] = {} end
20 local name
, _
, quality
, ilvl
, min, itype
, isubtype
, _
, equiploc
, _
= GetItemInfo(id
)
24 item
.quality
= quality
27 item
.type = string.format("%s/%s", itype
, isubtype
)
29 local loc
= string.match(equiploc
, "INVTYPE_(.*)")
31 item
.equiplocation
= loc
33 item
.equiplocation
= nil
36 local lines
= GameTooltip
:NumLines()
37 local openable
= false
39 if _G
["GameTooltipTextLeft" .. tostring(i
)]:GetText() == ITEM_OPENABLE
then
44 openable
= "open_" .. (openable
and "yes" or "no")
45 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.
49 function QH_Collect_Item_Init(QHCData
, API
)
50 if not QHCData
.item
then QHCData
.item
= {} end
53 API
.Registrar_TooltipHook(Tooltipy
)
55 GetItemType
= API
.Utility_GetItemType
56 QuestHelper
: Assert(GetItemType
)