refactoring, change of pickup/use behavior

This commit is contained in:
Manuel Simon Hirsig
2016-08-07 23:06:31 +02:00
parent c3447aedd2
commit abc163d7f3
10 changed files with 108 additions and 143 deletions
+11 -3
View File
@@ -17,7 +17,7 @@ function m.LOAD()
m.create_frames(m, public, private)
end
function public.OPEN()
function m.OPEN()
m.frame:Show()
m.deposit:SetText('Deposit: '..aux.money.to_string(0, nil, nil, nil, aux.gui.inline_color.text.enabled))
@@ -30,11 +30,19 @@ function public.OPEN()
m.refresh = true
end
function public.CLOSE()
function m.CLOSE()
m.selected_item = nil
m.frame:Hide()
end
function m.PICKUP_ITEM(item_info)
m.select_item(item_info.item_key)
end
function m.USE_ITEM(item_info)
m.select_item(item_info.item_key)
end
function private.default_settings()
return {
duration = DURATION_8,
@@ -358,7 +366,7 @@ function private.unit_vendor_price(item_key)
if aux.info.auctionable(item_info.tooltip, nil, item_info.lootable) then
ClearCursor()
PickupContainerItem(unpack(slot))
aux.orig.PickupContainerItem(unpack(slot))
ClickAuctionSellItemButton()
local auction_sell_item = aux.info.auction_sell_item()
ClearCursor()