some changes to static item db generation

This commit is contained in:
Manuel Simon Hirsig
2015-11-01 02:17:51 +01:00
parent c7d6096891
commit 6523c4a06a
5 changed files with 37 additions and 7051 deletions
+3 -1
View File
@@ -3,6 +3,7 @@
## Notes: A lightweight addon designed to help manage auctions
## SavedVariablesPerCharacter: AUX_SELL_SHORTCUT, AUX_BUY_SHORTCUT, AUX_OPEN_SELL, AUX_OPEN_BUY, AUX_INSTANT_BUYOUT, AUX_AUCTION_DURATION
## SavedVariables: aux_database, aux_auctionable_items
core.xml
control.xml
persistence.lua
@@ -24,5 +25,6 @@ scan_frame.xml
options.xml
about.xml
auctionable_items.lua
static.xml
static.lua
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -23,9 +23,12 @@ function Aux_OnLoad()
Aux.log('Aux v'..AuxVersion..' loaded.')
Aux.loaded = true
aux_auctionable_items = {}
Aux.auctionable_items.find_auctionable_items(1)
Aux.localized_auctionable_items = {}
for _, item_id in Aux.auctionable_items do
for _, item_id in Aux.auctionable_items.items do
local name = GetItemInfo(item_id)
tinsert(Aux.localized_auctionable_items, { name=name, id=item_id })
end
+1
View File
@@ -183,6 +183,7 @@ end
function Aux.sell.on_open()
MoneyFrame_Update('AuxSellParametersDepositMoneyFrame', 0)
AuxSellAuctions:SetWidth(AuxSellAuctionsListing:GetWidth() + 40)
AuxFrame:SetWidth(AuxSellInventory:GetWidth() + AuxSellParameters:GetWidth() + AuxSellAuctions:GetWidth() + 15)
-- UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, LIVE)
+29
View File
@@ -0,0 +1,29 @@
private, public = {}, {}
aux_auctionable_items = public
aux_auctionable_items = {}
function public.find_auctionable_items(i)
for j=i, i+1 do
local name = GetItemInfo('item:'..j)
if name then
local tooltip = Aux.info.tooltip(function(tt) tt:SetHyperlink('item:'..j) end)
Aux.log(name)
if not Aux.info.tooltip_match({'binds when picked up'}, tooltip) and not Aux.info.tooltip_match({'quest item'}, tooltip) then
Aux.log(j)
tinsert(aux_auctionable_items, j)
end
end
end
if i+1000 > 30000 then
Aux.log(getn(aux_auctionable_items))
else
local t0 = time()
Aux.control.as_soon_as(function() return time() - t0 > 1 end, function()
return find_auctionable_items(i+1000)
end)
end
end
public.items = {
}