From 0af3bcb843309356906842f32a09a3fa2d77852e Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Wed, 22 Dec 2021 21:00:58 +0100 Subject: [PATCH] Fixed items below $4 getting an invalid point calculation --- src/main/java/com/alttd/GUI/windows/SellGUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/alttd/GUI/windows/SellGUI.java b/src/main/java/com/alttd/GUI/windows/SellGUI.java index 1fa8fc5..e85db4f 100644 --- a/src/main/java/com/alttd/GUI/windows/SellGUI.java +++ b/src/main/java/com/alttd/GUI/windows/SellGUI.java @@ -55,7 +55,7 @@ public class SellGUI extends GUIMerchant { Economy econ = VillagerUI.getInstance().getEconomy(); EconUser econUser = EconUser.getUser(player.getUniqueId()); int oldPoints = Objects.requireNonNullElse(econUser.getPointsMap().get(villagerType.getName()), 0); - int trans_pts = (int) (Math.floor(price.getPrice(amount)/ WorthConfig.POINT_MOD) * amount); + int trans_pts = (int) ((Math.floor(price.getPrice(amount) / WorthConfig.POINT_MOD) + 1) * amount); double cost = price.calculatePriceThing(oldPoints, trans_pts); econ.depositPlayer(player, cost);