Altered merchant collector to put data into a table format.
Cette révision appartient à :
Parent
70e1877be0
révision
8e2a97167a
|
@ -40,9 +40,16 @@ local function MerchantShow()
|
|||
QuestHelper: Assert(itemid)
|
||||
itemid = GetItemType(itemid)
|
||||
local _, _, price, quant, avail, _, _ = GetMerchantItemInfo(i)
|
||||
local dstr = string.format("%d@@%d@@%d@@%d", itemid, quant, avail, price)
|
||||
local dstr = {}
|
||||
dstr.quant = quant
|
||||
dstr.avail = avail
|
||||
dstr.price = price
|
||||
--if debug_output then QuestHelper:TextOut(dstr) end
|
||||
targ["shop_" .. dstr] = (targ["shop_" .. dstr] or 0) + 1
|
||||
if not targ["shop"][itemid] then
|
||||
targ["shop"][itemid] = dstr
|
||||
end
|
||||
|
||||
targ["shop"][itemid].count = (targ["shop"][itemid].count or 0) + 1
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Référencer dans un nouveau ticket