mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-30 21:07:48 +01:00
Fixing Dynamic payments bonus not being calculated properly
This commit is contained in:
parent
7e2ac97578
commit
84be2eba79
@ -620,7 +620,10 @@ public class GeneralConfigManager {
|
||||
}
|
||||
|
||||
DynamicPaymentMaxPenalty = c.get("Economy.DynamicPayment.MaxPenalty", 50.0);
|
||||
DynamicPaymentMaxPenalty /= -100D;
|
||||
DynamicPaymentMaxBonus = c.get("Economy.DynamicPayment.MaxBonus", 300.0);
|
||||
DynamicPaymentMaxBonus /= 100D;
|
||||
|
||||
c.addComment("Economy.MaxPayment.curve.use", "Enabling this feature will mean players will still earn once they reach cap but " +
|
||||
"will loose a percentage the higher over cap they go. Controlled by a factor. math is ```100/((1/factor*percentOver^2)+1)```");
|
||||
useMaxPaymentCurve = c.get("Economy.MaxPayment.curve.use", false);
|
||||
@ -893,8 +896,8 @@ public class GeneralConfigManager {
|
||||
c.addComment("BossBar.Timer", "How long in sec to show BossBar for player",
|
||||
"If you have disabled ShowOnEachAction, then keep this number higher than payment interval for better experience");
|
||||
BossBarTimer = c.get("BossBar.Timer", economyBatchDelay + 1);
|
||||
c.addComment("BossBar.Async", "If enabled, bossbar creation and management will be asynchronous.", "This avoids TPS drops when the ShowOnEachAction option is activated.");
|
||||
bossBarAsync = c.get("BossBar.Async", false);
|
||||
c.addComment("BossBar.Async", "If enabled, bossbar creation and management will be asynchronous.", "This avoids TPS drops when the ShowOnEachAction option is activated.");
|
||||
bossBarAsync = c.get("BossBar.Async", false);
|
||||
}
|
||||
|
||||
c.addComment("ShowActionBars", "You can enable/disable message shown for players in action bar");
|
||||
@ -1167,7 +1170,7 @@ public class GeneralConfigManager {
|
||||
return InformDuplicates;
|
||||
}
|
||||
|
||||
public boolean isBossBarAsync() {
|
||||
return bossBarAsync;
|
||||
}
|
||||
public boolean isBossBarAsync() {
|
||||
return bossBarAsync;
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ import com.gamingmesh.jobs.actions.PotionItemActionInfo;
|
||||
import net.Zrips.CMILib.Colors.CMIChatColor;
|
||||
import net.Zrips.CMILib.Equations.Parser;
|
||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||
|
||||
public class Job {
|
||||
|
||||
@ -228,11 +229,10 @@ public class Job {
|
||||
if (now > Jobs.getGCManager().DynamicPaymentMaxBonus)
|
||||
now = Jobs.getGCManager().DynamicPaymentMaxBonus;
|
||||
|
||||
double maxPenalty = Jobs.getGCManager().DynamicPaymentMaxPenalty * -1;
|
||||
if (now < maxPenalty)
|
||||
now = maxPenalty;
|
||||
if (now < Jobs.getGCManager().DynamicPaymentMaxPenalty)
|
||||
now = Jobs.getGCManager().DynamicPaymentMaxPenalty;
|
||||
|
||||
this.bonus = (now / 100D);
|
||||
this.bonus = now;
|
||||
}
|
||||
|
||||
public double getBonus() {
|
||||
|
@ -200,7 +200,6 @@ public class Quest {
|
||||
Map<String, QuestObjective> old = objectives.get(objective.getAction());
|
||||
if (old == null) {
|
||||
old = new HashMap<>();
|
||||
old.put(objective.getTargetName(), objective);
|
||||
objectives.put(objective.getAction(), old);
|
||||
}
|
||||
old.put(objective.getTargetName(), objective);
|
||||
|
Loading…
Reference in New Issue
Block a user