From 789e8ff7a6cf17faa2f2cb964fb73231da8eefbf Mon Sep 17 00:00:00 2001 From: Zrips Date: Fri, 23 Jun 2023 12:51:00 +0300 Subject: [PATCH] Bonus from dynamic should be in hundreds of percentages --- src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java | 4 ++-- src/main/java/com/gamingmesh/jobs/container/Job.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java index 2c805590..70f75052 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java +++ b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java @@ -289,11 +289,11 @@ public class JobsCommands implements CommandExecutor { } if (Jobs.getGCManager().useDynamicPayment) { - int bonus = (int) ((job.getBonus() * 100) / 100.0); + int bonus = (int) (job.getBonus() * 100); if (bonus != 0) { if (bonus < 0) - message.add(Jobs.getLanguage().getMessage("command.info.help.penalty", "[penalty]", (int) (job.getBonus() * 100) / 100.0 * -1)); + message.add(Jobs.getLanguage().getMessage("command.info.help.penalty", "[penalty]", bonus * -1)); else message.add(Jobs.getLanguage().getMessage("command.info.help.bonus", "[bonus]", bonus)); } diff --git a/src/main/java/com/gamingmesh/jobs/container/Job.java b/src/main/java/com/gamingmesh/jobs/container/Job.java index 0d213fdb..937ed75b 100644 --- a/src/main/java/com/gamingmesh/jobs/container/Job.java +++ b/src/main/java/com/gamingmesh/jobs/container/Job.java @@ -226,6 +226,7 @@ public class Job { eq.setVariable("jobstotalplayers", getTotalPlayers()); double now = eq.getValue(); + CMIDebug.d("Now",now); if (now > Jobs.getGCManager().DynamicPaymentMaxBonus) now = Jobs.getGCManager().DynamicPaymentMaxBonus;