mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-04 23:37:49 +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 = c.get("Economy.DynamicPayment.MaxPenalty", 50.0);
|
||||||
|
DynamicPaymentMaxPenalty /= -100D;
|
||||||
DynamicPaymentMaxBonus = c.get("Economy.DynamicPayment.MaxBonus", 300.0);
|
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 " +
|
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)```");
|
"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);
|
useMaxPaymentCurve = c.get("Economy.MaxPayment.curve.use", false);
|
||||||
|
@ -43,6 +43,7 @@ import com.gamingmesh.jobs.actions.PotionItemActionInfo;
|
|||||||
import net.Zrips.CMILib.Colors.CMIChatColor;
|
import net.Zrips.CMILib.Colors.CMIChatColor;
|
||||||
import net.Zrips.CMILib.Equations.Parser;
|
import net.Zrips.CMILib.Equations.Parser;
|
||||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||||
|
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||||
|
|
||||||
public class Job {
|
public class Job {
|
||||||
|
|
||||||
@ -228,11 +229,10 @@ public class Job {
|
|||||||
if (now > Jobs.getGCManager().DynamicPaymentMaxBonus)
|
if (now > Jobs.getGCManager().DynamicPaymentMaxBonus)
|
||||||
now = Jobs.getGCManager().DynamicPaymentMaxBonus;
|
now = Jobs.getGCManager().DynamicPaymentMaxBonus;
|
||||||
|
|
||||||
double maxPenalty = Jobs.getGCManager().DynamicPaymentMaxPenalty * -1;
|
if (now < Jobs.getGCManager().DynamicPaymentMaxPenalty)
|
||||||
if (now < maxPenalty)
|
now = Jobs.getGCManager().DynamicPaymentMaxPenalty;
|
||||||
now = maxPenalty;
|
|
||||||
|
|
||||||
this.bonus = (now / 100D);
|
this.bonus = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getBonus() {
|
public double getBonus() {
|
||||||
|
@ -200,7 +200,6 @@ public class Quest {
|
|||||||
Map<String, QuestObjective> old = objectives.get(objective.getAction());
|
Map<String, QuestObjective> old = objectives.get(objective.getAction());
|
||||||
if (old == null) {
|
if (old == null) {
|
||||||
old = new HashMap<>();
|
old = new HashMap<>();
|
||||||
old.put(objective.getTargetName(), objective);
|
|
||||||
objectives.put(objective.getAction(), old);
|
objectives.put(objective.getAction(), old);
|
||||||
}
|
}
|
||||||
old.put(objective.getTargetName(), objective);
|
old.put(objective.getTargetName(), objective);
|
||||||
|
Loading…
Reference in New Issue
Block a user