From def0dd3dda241c2371600d2bf42ae2db241deecb Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Tue, 6 Sep 2016 08:27:13 +0200 Subject: [PATCH] refactoring --- util/info.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/util/info.lua b/util/info.lua index e92b641..11360ae 100644 --- a/util/info.lua +++ b/util/info.lua @@ -83,14 +83,14 @@ end function public.auction_sell_item() for name, texture, count, quality, usable, vendor_price in GetAuctionSellItemInfo do - return { - name = name, - texture = texture, - quality = quality, - count = count, - usable = usable, - vendor_price = vendor_price, -- it seems for charge items this is always the price for full charges - } + return T( + 'name', name, + 'texture', texture, + 'quality', quality, + 'count', count, + 'usable', usable, + 'vendor_price', vendor_price -- it seems for charge items this is always the price for full charges + ) end end @@ -120,8 +120,8 @@ function public.auction(index, query_type) 'link', link, 'itemstring', item_info.itemstring, 'item_key', item_id .. ':' .. suffix_id, - 'search_signature', join(temp-{item_id, suffix_id, enchant_id, start_price, buyout_price, bid_price, aux_quantity, duration, query_type == 'owner' and high_bidder or (high_bidder and 1 or 0), _G.aux_ignore_owner and (is_player(owner) and 0 or 1) or (owner or '?')}, ':'), - 'sniping_signature', join(temp-{item_id, suffix_id, enchant_id, start_price, buyout_price, aux_quantity, _G.aux_ignore_owner and (is_player(owner, true) and 0 or 1) or (owner or '?')}, ':'), + 'search_signature', join(temp-A(item_id, suffix_id, enchant_id, start_price, buyout_price, bid_price, aux_quantity, duration, query_type == 'owner' and high_bidder or (high_bidder and 1 or 0), _G.aux_ignore_owner and (is_player(owner) and 0 or 1) or (owner or '?')), ':'), + 'sniping_signature', join(temp-A(item_id, suffix_id, enchant_id, start_price, buyout_price, aux_quantity, _G.aux_ignore_owner and (is_player(owner, true) and 0 or 1) or (owner or '?')), ':'), 'name', name, 'texture', texture, @@ -165,7 +165,7 @@ function public.bid_update(auction_record) auction_record.unit_blizzard_bid = auction_record.blizzard_bid / auction_record.aux_quantity auction_record.unit_bid_price = auction_record.bid_price / auction_record.aux_quantity auction_record.high_bidder = 1 - auction_record.search_signature = join(temp-{auction_record.item_id, auction_record.suffix_id, auction_record.enchant_id, auction_record.start_price, auction_record.buyout_price, auction_record.bid_price, auction_record.aux_quantity, auction_record.duration, 1, _G.aux_ignore_owner and (is_player(auction_record.owner) and 0 or 1) or (auction_record.owner or '?')}, ':') + auction_record.search_signature = join(temp-A(auction_record.item_id, auction_record.suffix_id, auction_record.enchant_id, auction_record.start_price, auction_record.buyout_price, auction_record.bid_price, auction_record.aux_quantity, auction_record.duration, 1, _G.aux_ignore_owner and (is_player(auction_record.owner) and 0 or 1) or (auction_record.owner or '?')), ':') end function public.set_tooltip(itemstring, owner, anchor)