some renaming

This commit is contained in:
Manuel Simon Hirsig
2016-02-27 11:33:35 +01:00
parent d4c19e7a68
commit 6b8846b70d
5 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -197,12 +197,12 @@ local methods = {
GetRecordPercent = function(self, record)
if not record then return end
-- cache the market value on the record
record.market_value = record.market_value or Aux.history.value(record.item_key) or 0
if record.market_value > 0 then
record.historical_value = record.market_value or Aux.history.value(record.item_key) or 0
if record.historical_value > 0 then
if record.unit_buyout_price > 0 then
return Aux.round(100 * record.unit_buyout_price / record.market_value, 1)
return Aux.round(100 * record.unit_buyout_price / record.historical_value, 1)
end
return nil, Aux.round(100 * record.unit_bid_price / record.market_value, 1)
return nil, Aux.round(100 * record.unit_bid_price / record.historical_value, 1)
end
end,
+1 -1
View File
@@ -61,7 +61,7 @@ function private.update_listing()
local auction_rows = {}
for i, auction_record in auction_records or {} do
local market_value = Aux.history.value(auction_record.item_key)
local historical_value = Aux.history.value(auction_record.item_key)
tinsert(auction_rows, {
cols = {
{ value='|c'..Aux.quality_color(auction_record.quality)..'['..auction_record.name..']'..'|r' },
+1 -1
View File
@@ -79,7 +79,7 @@ function private.update_listing()
else
status = RED_FONT_COLOR_CODE..'Outbid'..FONT_COLOR_CODE_CLOSE
end
local market_value = Aux.history.value(auction_record.item_key)
local historical_value = Aux.history.value(auction_record.item_key)
tinsert(auction_rows, {
cols = {
{ value='|c'..Aux.quality_color(auction_record.quality)..'['..auction_record.name..']'..'|r' },
+1 -1
View File
@@ -1,5 +1,5 @@
Aux = {
version = '2.5.3',
version = '2.5.4',
blizzard_ui_shown = false,
orig = {},
}
+6 -6
View File
@@ -45,7 +45,7 @@ function private.update_auction_listing()
if selected_item then
for i, auction_record in ipairs(existing_auctions[selected_item.key] or {}) do
local stack_size = auction_record.stack_size == private.stack_size_slider:GetValue() and GREEN_FONT_COLOR_CODE..auction_record.stack_size..FONT_COLOR_CODE_CLOSE or auction_record.stack_size
local market_value = Aux.history.value(auction_record.item_key)
local historical_value = Aux.history.value(auction_record.item_key)
tinsert(auction_rows, {
cols = {
{ value=auction_record.count },
@@ -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_historical(Aux.round(auction_record.unit_buyout_price / market_value * 100)) or '---' },
{ value=historical_value and Aux.auction_listing.percentage_historical(Aux.round(auction_record.unit_buyout_price / historical_value * 100)) or '---' },
},
record = auction_record,
})
@@ -583,13 +583,13 @@ function private.update_recommendation()
if settings.pricing_model == FIXED then
start_price, buyout_price = settings.start_price, settings.buyout_price
elseif settings.pricing_model == MARKET then
start_price, buyout_price = private.market_value_suggestion()
start_price, buyout_price = private.historical_value_suggestion()
elseif settings.pricing_model == UNDERCUT then
start_price, buyout_price = private.undercutting_suggestion()
elseif settings.pricing_model == AUTO then
start_price, buyout_price = private.undercutting_suggestion()
if existing_auctions[selected_item.key] and not existing_auctions[selected_item.key].selected then
start_price, buyout_price = private.market_value_suggestion()
start_price, buyout_price = private.historical_value_suggestion()
end
end
@@ -617,7 +617,7 @@ function private.undercutting_suggestion()
return 0, 0
end
function private.market_value_suggestion()
function private.historical_value_suggestion()
local price_suggestion = Aux.history.value(selected_item.key) and 1.2 * Aux.history.value(selected_item.key)
if not price_suggestion then
return 0, 0
@@ -894,7 +894,7 @@ function private.initialize_pricing_model_dropdown()
}
UIDropDownMenu_AddButton{
text = 'Market Price',
text = 'Historical Price',
value = MARKET,
func = on_click,
}