diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-09-13 00:28:25 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 16:28:25 +0200 |
commit | d404b5c694e9873c1f2bcb48966785ad5c9640d0 (patch) | |
tree | 4de6b01128a1b3efc553a81a2008aea072825946 /src/main | |
parent | 7fb629f0fc0d6e2455418f85c36a11667f888d42 (diff) | |
download | NotEnoughUpdates-d404b5c694e9873c1f2bcb48966785ad5c9640d0.tar.gz NotEnoughUpdates-d404b5c694e9873c1f2bcb48966785ad5c9640d0.tar.bz2 NotEnoughUpdates-d404b5c694e9873c1f2bcb48966785ad5c9640d0.zip |
Fixed dungeon profit not showing books when one sells for 0 (#274)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java | 6 |
1 files changed, 4 insertions, 2 deletions
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(); |