From 6de450773172d52ed66727cb2728e2fe5360d2a9 Mon Sep 17 00:00:00 2001 From: isfir <194119109+isfir@users.noreply.github.com> Date: Thu, 16 Oct 2025 01:28:57 +0000 Subject: [PATCH] Fix deposit fee calculation --- tabs/post/core.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tabs/post/core.lua b/tabs/post/core.lua index 332cd8f..9f1980c 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -363,11 +363,11 @@ function update_item_configuration() stack_count_slider.editbox:SetNumber(stack_count_slider:GetValue()) do - local deposit_factor = UnitFactionGroup'npc' and .05 or .25 + local deposit_factor = 0.025 local duration_factor = UIDropDownMenu_GetSelectedValue(duration_dropdown) / 120 local stack_size, stack_count = selected_item.max_charges and 1 or stack_size_slider:GetValue(), stack_count_slider:GetValue() - local amount = floor(selected_item.unit_vendor_price * deposit_factor * stack_size) * stack_count * duration_factor - amount = floor(amount * 0.6) --according to nelethor this should be more accurate, would like to get accurate fee eventually + local max_stack = selected_item.max_stack + local amount = floor(selected_item.unit_vendor_price * stack_size * duration_factor * (1 + (max_stack - stack_size) * 0.05) * deposit_factor) * stack_count deposit:SetText('Deposit: ' .. money.to_string(amount, nil, nil, aux.color.text.enabled)) end