bag type fix, status bar change

This commit is contained in:
Manuel Simon Hirsig
2016-03-24 16:29:54 +01:00
parent d8c1e2fab7
commit f0997eaaf4
4 changed files with 23 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
Aux = { Aux = {
version = '2.9.17', version = '2.9.18',
blizzard_ui_shown = false, blizzard_ui_shown = false,
orig = {}, orig = {},
} }
+2 -2
View File
@@ -231,8 +231,8 @@ function private.submit_query(k)
private.wait_for_results(function() private.wait_for_results(function()
local _, total_count = GetNumAuctionItems(private.current_thread().params.type) local _, total_count = GetNumAuctionItems(private.current_thread().params.type)
private.current_thread().total_pages = math.ceil(total_count / PAGE_SIZE) private.current_thread().total_pages = math.ceil(total_count / PAGE_SIZE)
if private.current_thread().total_pages >= private.current_thread().page + 1 then if max(1, private.current_thread().total_pages) >= private.current_thread().page + 1 then
private.wait_for_callback(private.current_thread().params.on_page_loaded, private.current_thread().page, private.current_thread().total_pages, function() private.wait_for_callback(private.current_thread().params.on_page_loaded, private.current_thread().page, max(1, private.current_thread().total_pages), function()
return k() return k()
end) end)
else else
+2 -2
View File
@@ -37,8 +37,8 @@ function private.matching_item(slot, partial)
end end
function private.find_empty_slot() function private.find_empty_slot()
for slot in Aux.util.inventory() do for slot, type in Aux.util.inventory() do
if not GetContainerItemInfo(unpack(slot)) then if type == 1 and not GetContainerItemInfo(unpack(slot)) then
return slot return slot
end end
end end
+18 -1
View File
@@ -65,7 +65,24 @@ function public.inventory()
end end
if bag <= 4 then if bag <= 4 then
return { bag, slot } return { bag, slot }, public.bag_type(bag)
end
end
end
do
local bag_types = { GetAuctionItemSubClasses(3) }
function public.bag_type(bag)
if bag == 0 then
return 1
end
local link = GetInventoryItemLink('player', ContainerIDToInventoryID(bag))
if link then
local item_id = Aux.info.parse_hyperlink(GetInventoryItemLink('player', ContainerIDToInventoryID(bag)))
local item_info = Aux.info.item(item_id)
return Aux.item_subclass_index(3, item_info.subclass)
end end
end end
end end