changed the way the daily value is displayed in the tooltip
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
## Interface: 11200
|
||||
## Title: Aux
|
||||
## SavedVariablesPerCharacter: aux_recent_searches, aux_favorite_searches, aux_price_per_unit, aux_scale, aux_tooltip_market
|
||||
## SavedVariablesPerCharacter: aux_recent_searches, aux_favorite_searches, aux_price_per_unit, aux_scale, aux_tooltip_daily
|
||||
## SavedVariables: aux_database, aux_auctionable_items
|
||||
|
||||
slash.lua
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ local TIME_LEFT_STRINGS = {
|
||||
'|cff2992ff24h|r', -- Very Long
|
||||
}
|
||||
|
||||
function public.percentage_market(pct, based_on_bid)
|
||||
function public.percentage_historical(pct, based_on_bid)
|
||||
local pctColor = '|cffffffff'
|
||||
|
||||
if based_on_bid then
|
||||
@@ -441,7 +441,7 @@ local methods = {
|
||||
row.cells[7]:SetText(bid > 0 and Aux.money.to_string(bid, true, false, nil, colorBid) or '---')
|
||||
row.cells[8]:SetText(buyout > 0 and Aux.money.to_string(buyout, true, false, nil, colorBuyout) or '---')
|
||||
local pct, bidPct = self:GetRecordPercent(record)
|
||||
row.cells[9]:SetText((pct or bidPct) and public.percentage_market(pct or bidPct, not pct) or '---')
|
||||
row.cells[9]:SetText((pct or bidPct) and public.percentage_historical(pct or bidPct, not pct) or '---')
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ function private.update_listing()
|
||||
{ value=auction_record.high_bid > 0 and Aux.money.to_string(auction_record.high_bid, true, false) or RED_FONT_COLOR_CODE..'No Bids'..FONT_COLOR_CODE_CLOSE },
|
||||
{ value=Aux.money.to_string(auction_record.start_price, true, false) },
|
||||
{ value=auction_record.buyout_price > 0 and Aux.money.to_string(auction_record.buyout_price, true, false) or '---' },
|
||||
-- { value=Aux.auction_listing.percentage_market(market_value and Aux.round(auction_record.unit_buyout_price/market_value * 100) or '---') },
|
||||
-- { value=Aux.auction_listing.percentage_historical(market_value and Aux.round(auction_record.unit_buyout_price/market_value * 100) or '---') },
|
||||
},
|
||||
record = auction_record,
|
||||
})
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ function private.update_listing()
|
||||
{ value=auction_record.high_bidder and Aux.money.to_string(auction_record.high_bid, true, false) or '---' },
|
||||
{ value=Aux.money.to_string(auction_record.bid_price, true, false) },
|
||||
{ value=auction_record.buyout_price > 0 and Aux.money.to_string(auction_record.buyout_price, true, false) or '---' },
|
||||
-- { value=Aux.auction_listing.percentage_market(market_value and Aux.round(auction_record.unit_buyout_price/market_value * 100) or '---') },
|
||||
-- { value=Aux.auction_listing.percentage_historical(market_value and Aux.round(auction_record.unit_buyout_price/market_value * 100) or '---') },
|
||||
},
|
||||
record = auction_record,
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Aux = {
|
||||
version = '2.5.2',
|
||||
version = '2.5.3',
|
||||
blizzard_ui_shown = false,
|
||||
orig = {},
|
||||
}
|
||||
@@ -20,19 +20,9 @@ function Aux.on_load()
|
||||
|
||||
local item_key = (item_id or 0)..':'..(suffix_id or 0)
|
||||
|
||||
if aux_tooltip_market then
|
||||
local market_value = Aux.history.market_value(item_key)
|
||||
|
||||
local market_value_line = 'Mkt. Value: '
|
||||
market_value_line = market_value_line..(market_value and EnhTooltip.GetTextGSC(market_value) or '---')
|
||||
|
||||
EnhTooltip.AddLine(market_value_line, nil, true)
|
||||
EnhTooltip.LineColor(0.1, 0.8, 0.5)
|
||||
end
|
||||
|
||||
local value = Aux.history.value(item_key)
|
||||
|
||||
local value_line = aux_tooltip_market and 'Hist. Value: ' or 'Value: '
|
||||
local value_line = 'Value: '
|
||||
|
||||
value_line = value_line..(value and EnhTooltip.GetTextGSC(value) or '---')
|
||||
|
||||
@@ -43,6 +33,16 @@ function Aux.on_load()
|
||||
|
||||
EnhTooltip.AddLine(value_line, nil, true)
|
||||
EnhTooltip.LineColor(0.1, 0.8, 0.5)
|
||||
|
||||
if aux_tooltip_daily then
|
||||
local market_value = Aux.history.market_value(item_key)
|
||||
|
||||
local market_value_line = 'Today: '
|
||||
market_value_line = market_value_line..(market_value and Aux.auction_listing.percentage_historical(Aux.round(market_value / value * 100))..' ('..EnhTooltip.GetTextGSC(market_value)..')' or '---')
|
||||
|
||||
EnhTooltip.AddLine(market_value_line, nil, true)
|
||||
EnhTooltip.LineColor(0.1, 0.8, 0.5)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ function private.update_auction_listing()
|
||||
{ value=Aux.auction_listing.time_left(auction_record.duration) },
|
||||
{ value=stack_size },
|
||||
{ value=Aux.money.to_string(auction_record.unit_buyout_price, true, nil, 3) },
|
||||
{ value=market_value and Aux.auction_listing.percentage_market(Aux.round(auction_record.unit_buyout_price / market_value * 100)) or '---' },
|
||||
{ value=market_value and Aux.auction_listing.percentage_historical(Aux.round(auction_record.unit_buyout_price / market_value * 100)) or '---' },
|
||||
},
|
||||
record = auction_record,
|
||||
})
|
||||
|
||||
@@ -11,8 +11,8 @@ function SlashCmdList.AUX(parameter)
|
||||
elseif parameter == 'delete item cache' then
|
||||
aux_auctionable_items = nil
|
||||
Aux.log('Item cache deleted; falling back to the default.')
|
||||
elseif parameter == 'tooltip market' then
|
||||
aux_tooltip_market = not aux_tooltip_market
|
||||
Aux.log('Market value in tooltip '..(aux_tooltip_market and 'enabled' or 'disabled')..'.')
|
||||
elseif parameter == 'tooltip daily' then
|
||||
aux_tooltip_daily = not aux_tooltip_daily
|
||||
Aux.log('Market value in tooltip '..(aux_tooltip_daily and 'enabled' or 'disabled')..'.')
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user