diff --git a/core.lua b/core.lua index 11cc85a..ccf8786 100644 --- a/core.lua +++ b/core.lua @@ -1,4 +1,4 @@ -AuxVersion = '2.2.12' +AuxVersion = '2.2.13' AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)' local lastRightClickAction = GetTime() diff --git a/filter_search_frame.lua b/filter_search_frame.lua index 7d68581..37729fc 100644 --- a/filter_search_frame.lua +++ b/filter_search_frame.lua @@ -136,8 +136,8 @@ public.views = { comparator = function(group1, group2) local market_price1 = Aux.history.get_market_value(group1[1].item_key) local market_price2 = Aux.history.get_market_value(group2[1].item_key) - local factor1 = market_price1 and group1[1].buyout_price_per_unit / market_price1 - local factor2 = market_price2 and group2[1].buyout_price_per_unit / market_price2 + local factor1 = market_price1 > 0 and group1[1].buyout_price_per_unit / market_price1 + local factor2 = market_price2 > 0 and group2[1].buyout_price_per_unit / market_price2 return Aux.util.compare(factor1, factor2, Aux.util.GT) end, cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'), @@ -489,8 +489,8 @@ public.views = { comparator = function(row1, row2) local market_price1 = Aux.history.get_market_value(row1.item_key) local market_price2 = Aux.history.get_market_value(row2.item_key) - local factor1 = market_price1 and row1.buyout_price_per_unit / market_price1 - local factor2 = market_price2 and row2.buyout_price_per_unit / market_price2 + local factor1 = market_price1 > 0 and row1.buyout_price_per_unit and row1.buyout_price_per_unit / market_price1 + local factor2 = market_price2 > 0 and row2.buyout_price_per_unit and row2.buyout_price_per_unit / market_price2 return Aux.util.compare(factor1, factor2, Aux.util.GT) end, cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'), diff --git a/item_search_frame.lua b/item_search_frame.lua index 88e6803..607c58b 100644 --- a/item_search_frame.lua +++ b/item_search_frame.lua @@ -149,8 +149,8 @@ public.views = { comparator = function(group1, group2) local market_price1 = Aux.history.get_market_value(group1[1].item_key) local market_price2 = Aux.history.get_market_value(group2[1].item_key) - local factor1 = market_price1 and group1[1].buyout_price_per_unit / market_price1 - local factor2 = market_price2 and group2[1].buyout_price_per_unit / market_price2 + local factor1 = market_price1 > 0 and group1[1].buyout_price_per_unit / market_price1 + local factor2 = market_price2 > 0 and group2[1].buyout_price_per_unit / market_price2 return Aux.util.compare(factor1, factor2, Aux.util.GT) end, cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'), @@ -428,8 +428,8 @@ public.views = { comparator = function(row1, row2) local market_price1 = Aux.history.get_market_value(row1.item_key) local market_price2 = Aux.history.get_market_value(row2.item_key) - local factor1 = market_price1 and row1.buyout_price_per_unit / market_price1 - local factor2 = market_price2 and row2.buyout_price_per_unit / market_price2 + local factor1 = market_price1 > 0 and row1.buyout_price_per_unit and row1.buyout_price_per_unit / market_price1 + local factor2 = market_price2 > 0 and row2.buyout_price_per_unit and row2.buyout_price_per_unit / market_price2 return Aux.util.compare(factor1, factor2, Aux.util.GT) end, cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),