1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-29 04:18:07 +01:00

Bonus from dynamic should be in hundreds of percentages

This commit is contained in:
Zrips 2023-06-23 12:51:00 +03:00
parent d52633a447
commit 789e8ff7a6
2 changed files with 3 additions and 2 deletions

View File

@ -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));
}

View File

@ -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;