added neutral ah deposit support
This commit is contained in:
@@ -193,6 +193,9 @@ function Aux.AuctionFrameAuctions_OnEvent()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Aux.on_auction_house_show()
|
function Aux.on_auction_house_show()
|
||||||
|
if not UnitFactionGroup('target') then
|
||||||
|
Aux.neutral = true
|
||||||
|
end
|
||||||
AuxFrame:Show()
|
AuxFrame:Show()
|
||||||
Aux.tab_group:set_tab(1)
|
Aux.tab_group:set_tab(1)
|
||||||
end
|
end
|
||||||
|
|||||||
+3
-3
@@ -551,7 +551,7 @@ function private.update_recommendation()
|
|||||||
private.stack_count_slider.editbox:SetNumber(private.stack_count_slider:GetValue())
|
private.stack_count_slider.editbox:SetNumber(private.stack_count_slider:GetValue())
|
||||||
|
|
||||||
do
|
do
|
||||||
-- TODO neutral AH deposit formula
|
local deposit_factor = Aux.neutral and 0.25 or 0.05
|
||||||
local stack_size = private.stack_size_slider:GetValue()
|
local stack_size = private.stack_size_slider:GetValue()
|
||||||
local stack_count
|
local stack_count
|
||||||
if private.post_all_checkbox:GetChecked() and not selected_item.charges then
|
if private.post_all_checkbox:GetChecked() and not selected_item.charges then
|
||||||
@@ -559,10 +559,10 @@ function private.update_recommendation()
|
|||||||
else
|
else
|
||||||
stack_count = private.stack_count_slider:GetValue()
|
stack_count = private.stack_count_slider:GetValue()
|
||||||
end
|
end
|
||||||
local deposit = floor(selected_item.unit_vendor_price * 0.05 * (selected_item.charges and 1 or stack_size)) * stack_count * UIDropDownMenu_GetSelectedValue(private.duration_dropdown) / 120
|
local deposit = floor(selected_item.unit_vendor_price * deposit_factor * (selected_item.charges and 1 or stack_size)) * stack_count * UIDropDownMenu_GetSelectedValue(private.duration_dropdown) / 120
|
||||||
if private.post_all_checkbox:GetChecked() and not selected_item.charges then
|
if private.post_all_checkbox:GetChecked() and not selected_item.charges then
|
||||||
local partial_stack = mod(selected_item.aux_quantity, stack_size)
|
local partial_stack = mod(selected_item.aux_quantity, stack_size)
|
||||||
deposit = deposit + floor(selected_item.unit_vendor_price * 0.05 * partial_stack) * UIDropDownMenu_GetSelectedValue(private.duration_dropdown) / 120
|
deposit = deposit + floor(selected_item.unit_vendor_price * deposit_factor * partial_stack) * UIDropDownMenu_GetSelectedValue(private.duration_dropdown) / 120
|
||||||
end
|
end
|
||||||
|
|
||||||
private.deposit:SetText('Deposit: '..Aux.money.to_string(deposit))
|
private.deposit:SetText('Deposit: '..Aux.money.to_string(deposit))
|
||||||
|
|||||||
Reference in New Issue
Block a user