deposit calculation as total for all stacks implemented
This commit is contained in:
@@ -26,17 +26,19 @@ function Aux.info.container_item(bag, slot)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Aux.info.auction_sell_item()
|
function Aux.info.auction_sell_item()
|
||||||
local name, texture, count, quality, usable, vendor_price, vendor_price_per_unit, max_stack, total_count = GetAuctionSellItemInfo()
|
local name, texture, stack_size, quality, usable, vendor_price, vendor_price_per_unit, max_stack, total_count = GetAuctionSellItemInfo()
|
||||||
auction_sell_item = {
|
local base_deposit = CalculateAuctionDeposit(120) / stack_size
|
||||||
|
auction_sell_item = name and {
|
||||||
name = name,
|
name = name,
|
||||||
texture = texture,
|
texture = texture,
|
||||||
count = count,
|
stack_size = stack_size,
|
||||||
quality = quality,
|
quality = quality,
|
||||||
usable = usable,
|
usable = usable,
|
||||||
vendor_price = vendor_price,
|
vendor_price = vendor_price,
|
||||||
vendor_price_per_unit = vendor_price_per_unit,
|
vendor_price_per_unit = vendor_price_per_unit,
|
||||||
max_stack = max_stack,
|
max_stack = max_stack,
|
||||||
total_count = total_count,
|
total_count = total_count,
|
||||||
|
base_deposit = base_deposit,
|
||||||
}
|
}
|
||||||
|
|
||||||
auction_sell_item.tooltip = Aux.info.tooltip(function(tt) tt:SetAuctionSellItem() end)
|
auction_sell_item.tooltip = Aux.info.tooltip(function(tt) tt:SetAuctionSellItem() end)
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ function Aux_Sell_AuctionsRadioButton_OnClick(index)
|
|||||||
AUX_AUCTION_DURATION = 'long'
|
AUX_AUCTION_DURATION = 'long'
|
||||||
end
|
end
|
||||||
|
|
||||||
return Aux.orig.AuctionsRadioButton_OnClick(index)
|
Aux.orig.AuctionsRadioButton_OnClick(index)
|
||||||
|
update_recommendation()
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@@ -177,6 +178,8 @@ function update_recommendation()
|
|||||||
Aux_Sell_SetStackSize(current_auction.stackSize)
|
Aux_Sell_SetStackSize(current_auction.stackSize)
|
||||||
Aux_Sell_SetStackCount(current_auction.stackCount)
|
Aux_Sell_SetStackCount(current_auction.stackCount)
|
||||||
|
|
||||||
|
MoneyFrame_Update("AuctionsDepositMoneyFrame", current_auction.base_deposit * current_auction.stackCount * (current_auction.has_charges and 1 or current_auction.stackSize) * AuctionFrameAuctions.duration / 120)
|
||||||
|
|
||||||
if auxSellEntries[current_auction.name] and auxSellEntries[current_auction.name].selected then
|
if auxSellEntries[current_auction.name] and auxSellEntries[current_auction.name].selected then
|
||||||
if not auxSellEntries[current_auction.name].created or GetTime() - auxSellEntries[current_auction.name].created > 1800 then
|
if not auxSellEntries[current_auction.name].created or GetTime() - auxSellEntries[current_auction.name].created > 1800 then
|
||||||
AuxRecommendStaleText:SetText("STALE DATA") -- data older than half an hour marked as stale
|
AuxRecommendStaleText:SetText("STALE DATA") -- data older than half an hour marked as stale
|
||||||
@@ -281,8 +284,6 @@ function Aux.sell.set_auction(bag, slot)
|
|||||||
local container_item = Aux.info.container_item(bag, slot)
|
local container_item = Aux.info.container_item(bag, slot)
|
||||||
|
|
||||||
if container_item then
|
if container_item then
|
||||||
|
|
||||||
Aux.scan.abort()
|
|
||||||
|
|
||||||
ClearCursor()
|
ClearCursor()
|
||||||
PickupContainerItem(bag,slot)
|
PickupContainerItem(bag,slot)
|
||||||
@@ -291,21 +292,28 @@ function Aux.sell.set_auction(bag, slot)
|
|||||||
ClickAuctionSellItemButton()
|
ClickAuctionSellItemButton()
|
||||||
ClearCursor()
|
ClearCursor()
|
||||||
|
|
||||||
current_auction = container_item and {
|
if auction_sell_item then
|
||||||
name = container_item.name,
|
|
||||||
texture = container_item.texture,
|
|
||||||
stackSize = container_item.charges or container_item.count,
|
|
||||||
stackCount = 1,
|
|
||||||
class = container_item.type,
|
|
||||||
subclass = container_item.subtype,
|
|
||||||
}
|
|
||||||
|
|
||||||
if current_auction and not auxSellEntries[current_auction.name] then
|
Aux.scan.abort()
|
||||||
refresh_entries()
|
|
||||||
end
|
current_auction = {
|
||||||
|
name = container_item.name,
|
||||||
|
texture = container_item.texture,
|
||||||
|
stackSize = container_item.charges or container_item.count,
|
||||||
|
stackCount = 1,
|
||||||
|
class = container_item.type,
|
||||||
|
subclass = container_item.subtype,
|
||||||
|
base_deposit = auction_sell_item.base_deposit,
|
||||||
|
has_charges = container_item.charges ~= nil,
|
||||||
|
}
|
||||||
|
|
||||||
select_entry()
|
if current_auction and not auxSellEntries[current_auction.name] then
|
||||||
update_recommendation()
|
refresh_entries()
|
||||||
|
end
|
||||||
|
|
||||||
|
select_entry()
|
||||||
|
update_recommendation()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user