diff --git a/buy.lua b/buy.lua index 3439cc8..bc8add7 100644 --- a/buy.lua +++ b/buy.lua @@ -179,13 +179,13 @@ function AuxBuyEntry_OnEnter() local entry = entries[entryIndex] local found, _, itemString = string.find(entry.itemLink, "^|%x+|H(.+)|h%[.+%]") - if(found) then - GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); - GameTooltip:SetHyperlink(itemString); - GameTooltip:Show(); + if found then + GameTooltip:SetOwner(this, "ANCHOR_RIGHT") + GameTooltip:SetHyperlink(itemString) + GameTooltip:Show() if(EnhTooltip ~= nil) then - EnhTooltip.TooltipCall(GameTooltip, entry.name, entry.itemLink, entry.quality, entry.stackSize); + EnhTooltip.TooltipCall(GameTooltip, entry.name, entry.itemLink, entry.quality, entry.stackSize) end end end diff --git a/scan.lua b/scan.lua index c30b69f..c4c8eed 100644 --- a/scan.lua +++ b/scan.lua @@ -31,6 +31,7 @@ end function Aux.scan.on_update() if page_state then + if page_state.index <= page_state.count and current_job.on_read_auction then current_job.on_read_auction(page_state.index) end @@ -45,7 +46,7 @@ function Aux.scan.on_update() end if page_state then - page_state.index = page_state.index + 1 + page_state.index = min(page_state.index + 1, page_state.count) end elseif current_job and GetTime() - last_query_request > 0.5 then