From d404b5c694e9873c1f2bcb48966785ad5c9640d0 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Tue, 13 Sep 2022 00:28:25 +1000 Subject: Fixed dungeon profit not showing books when one sells for 0 (#274) --- .../github/moulberry/notenoughupdates/listener/RenderListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java index d4df7bfd..a8d69c87 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java @@ -787,8 +787,10 @@ public class RenderListener { if (bazaarPrice < 5000000 && internal.equals("RECOMBOBULATOR_3000")) bazaarPrice = 5000000; double worth = -1; - if (bazaarPrice > 0) { + boolean isOnBz = false; + if (bazaarPrice >= 0) { worth = bazaarPrice; + isOnBz = true; } else { switch (NotEnoughUpdates.INSTANCE.config.dungeons.profitType) { case 1: @@ -826,7 +828,7 @@ public class RenderListener { } } - if (worth > 0 && totalValue >= 0) { + if ((worth >= 0 || isOnBz) && totalValue >= 0) { totalValue += worth; String display = item.getDisplayName(); -- cgit