refactoring
This commit is contained in:
+2
-2
@@ -12,13 +12,13 @@ util\color.lua
|
|||||||
gui\core.lua
|
gui\core.lua
|
||||||
frame.lua
|
frame.lua
|
||||||
|
|
||||||
util\completion.lua
|
|
||||||
util\persistence.lua
|
util\persistence.lua
|
||||||
util\sort.lua
|
util\sort.lua
|
||||||
util\money.lua
|
util\money.lua
|
||||||
util\info.lua
|
util\info.lua
|
||||||
util\filter.lua
|
|
||||||
util\scan.lua
|
util\scan.lua
|
||||||
|
util\filter.lua
|
||||||
|
util\completion.lua
|
||||||
|
|
||||||
core\cache.lua
|
core\cache.lua
|
||||||
core\disenchant.lua
|
core\disenchant.lua
|
||||||
|
|||||||
+5
-5
@@ -26,8 +26,8 @@ function LOAD()
|
|||||||
|
|
||||||
event_listener('NEW_AUCTION_UPDATE', function()
|
event_listener('NEW_AUCTION_UPDATE', function()
|
||||||
for info in present(info.auction_sell_item()) do
|
for info in present(info.auction_sell_item()) do
|
||||||
for item_id in present(cache.item_id(info.name)) do
|
for item_id in present(item_id(info.name)) do
|
||||||
_g.aux_merchant_sell[cache.item_id(info.name)] = info.vendor_price / (info.max_item_charges(item_id) or info.count)
|
_g.aux_merchant_sell[_m.item_id(info.name)] = info.vendor_price / (_m.info.max_item_charges(item_id) or info.count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -148,8 +148,8 @@ function merchant_buy_scan()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function merchant_sell_scan()
|
function merchant_sell_scan()
|
||||||
for slot in info.inventory do
|
for slot in info.inventory do temp=slot
|
||||||
local item_info = info.container_item(unpack(slot))
|
local item_info = temp-info.container_item(unpack(slot))
|
||||||
if item_info then
|
if item_info then
|
||||||
_g.aux_merchant_sell[item_info.item_id] = item_info.tooltip_money / item_info.aux_quantity
|
_g.aux_merchant_sell[item_info.item_id] = item_info.tooltip_money / item_info.aux_quantity
|
||||||
end
|
end
|
||||||
@@ -196,7 +196,7 @@ function public.populate_wdb(item_id)
|
|||||||
item_id = item_id or MIN_ITEM_ID
|
item_id = item_id or MIN_ITEM_ID
|
||||||
|
|
||||||
if item_id > MAX_ITEM_ID then
|
if item_id > MAX_ITEM_ID then
|
||||||
log('Cache populated.')
|
log 'Cache populated.'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module 'auction_listing' import 'gui' 'sorting' 'history' 'money'
|
module 'auction_listing' import 'gui' 'sorting' 'history' 'money' 'info'
|
||||||
|
|
||||||
_g.aux_price_per_unit = false
|
_g.aux_price_per_unit = false
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function public.create(parent, on_click, selected)
|
|||||||
_g[scrollBar:GetName()..'ScrollUpButton']:Hide()
|
_g[scrollBar:GetName()..'ScrollUpButton']:Hide()
|
||||||
_g[scrollBar:GetName()..'ScrollDownButton']:Hide()
|
_g[scrollBar:GetName()..'ScrollDownButton']:Hide()
|
||||||
|
|
||||||
local rows = {}
|
local rows = t
|
||||||
local row_index = 1
|
local row_index = 1
|
||||||
local max_height = content:GetHeight()
|
local max_height = content:GetHeight()
|
||||||
local total_height = 0
|
local total_height = 0
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
module 'post_tab' import 'scan' 'post' 'info'
|
module 'post_tab' import 'scan' 'scan_util' 'post' 'history' 'info' 'persistence' 'item_listing'
|
||||||
|
|
||||||
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
|
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
|
||||||
local settings_schema = {'record', '#', {stack_size='number'}, {duration='number'}, {start_price='number'}, {buyout_price='number'}, {hidden='boolean'}}
|
local settings_schema = {'record', '#', {stack_size='number'}, {duration='number'}, {start_price='number'}, {buyout_price='number'}, {hidden='boolean'}}
|
||||||
@@ -88,7 +88,7 @@ end
|
|||||||
|
|
||||||
function update_inventory_listing()
|
function update_inventory_listing()
|
||||||
if not ACTIVE then return end
|
if not ACTIVE then return end
|
||||||
inventory_listing.populate(inventory_listing, values(filter(inventory_records, function(record)
|
item_listing.populate(inventory_listing, values(filter(inventory_records, function(record)
|
||||||
local settings = read_settings(record.key)
|
local settings = read_settings(record.key)
|
||||||
return record.aux_quantity > 0 and (not settings.hidden or show_hidden_checkbox:GetChecked())
|
return record.aux_quantity > 0 and (not settings.hidden or show_hidden_checkbox:GetChecked())
|
||||||
end)))
|
end)))
|
||||||
|
|||||||
+3
-3
@@ -11,17 +11,17 @@ function create_frames()
|
|||||||
frame.content:SetPoint('BOTTOMLEFT', aux_frame.content, 'BOTTOMLEFT', 0, 0)
|
frame.content:SetPoint('BOTTOMLEFT', aux_frame.content, 'BOTTOMLEFT', 0, 0)
|
||||||
frame.content:SetPoint('BOTTOMRIGHT', aux_frame.content, 'BOTTOMRIGHT', 0, 0)
|
frame.content:SetPoint('BOTTOMRIGHT', aux_frame.content, 'BOTTOMRIGHT', 0, 0)
|
||||||
|
|
||||||
frame.inventory = gui.panel(aux_frame.content)
|
frame.inventory = gui.panel(frame.content)
|
||||||
frame.inventory:SetWidth(212)
|
frame.inventory:SetWidth(212)
|
||||||
frame.inventory:SetPoint('TOPLEFT', 0, 0)
|
frame.inventory:SetPoint('TOPLEFT', 0, 0)
|
||||||
frame.inventory:SetPoint('BOTTOMLEFT', 0, 0)
|
frame.inventory:SetPoint('BOTTOMLEFT', 0, 0)
|
||||||
|
|
||||||
frame.parameters = gui.panel(aux_frame.content)
|
frame.parameters = gui.panel(frame.content)
|
||||||
frame.parameters:SetHeight(173)
|
frame.parameters:SetHeight(173)
|
||||||
frame.parameters:SetPoint('TOPLEFT', frame.inventory, 'TOPRIGHT', 2.5, 0)
|
frame.parameters:SetPoint('TOPLEFT', frame.inventory, 'TOPRIGHT', 2.5, 0)
|
||||||
frame.parameters:SetPoint('TOPRIGHT', 0, 0)
|
frame.parameters:SetPoint('TOPRIGHT', 0, 0)
|
||||||
|
|
||||||
frame.auctions = gui.panel(aux_frame.content)
|
frame.auctions = gui.panel(frame.content)
|
||||||
frame.auctions:SetHeight(228)
|
frame.auctions:SetHeight(228)
|
||||||
frame.auctions:SetPoint('BOTTOMLEFT', frame.inventory, 'BOTTOMRIGHT', 2.5, 0)
|
frame.auctions:SetPoint('BOTTOMLEFT', frame.inventory, 'BOTTOMRIGHT', 2.5, 0)
|
||||||
frame.auctions:SetPoint('BOTTOMRIGHT', 0, 0)
|
frame.auctions:SetPoint('BOTTOMRIGHT', 0, 0)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module 'search_tab'
|
module 'search_tab' import 'info'
|
||||||
|
|
||||||
_g.aux_auto_buy_filter = ''
|
_g.aux_auto_buy_filter = ''
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
module 'completion'
|
module 'completion' import 'filter_util'
|
||||||
|
|
||||||
function public:complete_filter()
|
function public:complete_filter()
|
||||||
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
|
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
|
||||||
|
|||||||
+1
-1
@@ -244,7 +244,7 @@ function public.load_tooltip(frame, tooltip)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function public.display_name(item_id, no_brackets, no_color)
|
function public.display_name(item_id, no_brackets, no_color)
|
||||||
for item_info in present(info.item(item_id)) do
|
for item_info in present(item(item_id)) do
|
||||||
local name = item_info.name
|
local name = item_info.name
|
||||||
if not no_brackets then
|
if not no_brackets then
|
||||||
name = '['..name..']'
|
name = '['..name..']'
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
module 'scan_util' import 'info'
|
module 'scan_util' import 'info'
|
||||||
|
|
||||||
|
function LOAD()
|
||||||
|
import 'filter_util' 'scan'
|
||||||
|
end
|
||||||
|
|
||||||
function public.find(auction_record, status_bar, on_abort, on_failure, on_success)
|
function public.find(auction_record, status_bar, on_abort, on_failure, on_success)
|
||||||
|
|
||||||
local function test(index)
|
local function test(index)
|
||||||
|
|||||||
Reference in New Issue
Block a user