1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-03-12 14:49:37 +01:00

Temporary remove boost timers

- Fix issue when the quest does not contains "," char will not added the correct values to the list
This commit is contained in:
montlikadani 2020-04-02 13:50:42 +02:00
parent 5177ee2213
commit 22d7b482b5
4 changed files with 12 additions and 21 deletions

View File

@ -262,8 +262,6 @@ public class ConfigManager {
cfg.addComment(pt + ".Break.gravel.income", "you can use minuses to take away money if the player break this block");
cfg.get(pt + ".Break.gravel.income", -1D);
cfg.save();
}
@ -1082,7 +1080,7 @@ public class ConfigManager {
try {
ActionType actionType = ActionType.getByName(split[0]);
String mats = split[1];
String[] co = mats.split(",");
String[] co = mats.contains(",") ? mats.split(",") : new String[0];
int amount = 1;
if (split.length == 3) {

View File

@ -45,12 +45,6 @@ public class Boost {
public double getFinalAmount(CurrencyType BT, double income) {
double f = income;
for (BoostOf one : BoostOf.values()) {
if (map.containsKey(one) && !map.get(one).isValid()) {
return f;
}
}
if (income > 0 || income < 0 && Jobs.getGCManager().applyToNegativeIncome)
f = income + ((income > 0D ? income : -income) * getFinal(BT, false, false));

View File

@ -1,7 +1,5 @@
package com.gamingmesh.jobs.container;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
public class BoostMultiplier {
@ -30,15 +28,8 @@ public class BoostMultiplier {
return this;
}
public BoostMultiplier add(CurrencyType type, double amount, int hour, int minute, int second) {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) + hour);
cal.set(Calendar.MINUTE, cal.get(Calendar.MINUTE) + minute);
cal.set(Calendar.SECOND, cal.get(Calendar.SECOND) + second);
time = cal.getTimeInMillis();
public BoostMultiplier add(CurrencyType type, double amount, long time) {
this.time = time;
return add(type, amount);
}

View File

@ -123,7 +123,15 @@ public class Job {
}
public void addBoost(CurrencyType type, double point, int hour, int minute, int second) {
boost.add(type, point - 1D, hour, minute, second);
final Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) + hour);
cal.set(Calendar.MINUTE, cal.get(Calendar.MINUTE) + minute);
cal.set(Calendar.SECOND, cal.get(Calendar.SECOND) + second);
long time = cal.getTimeInMillis();
boost.add(type, point - 1D, time);
}
public void setBoost(BoostMultiplier BM) {