1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 05:55:27 +01:00

We need to clone boost object

This commit is contained in:
Zrips 2017-01-10 15:32:20 +02:00
parent fcbc42e043
commit b0566f9ded
2 changed files with 10 additions and 1 deletions

View File

@ -663,7 +663,7 @@ public class PlayerManager {
continue main;
}
return oneItem.getBoost();
return oneItem.getBoost().clone();
}
return bonus;

View File

@ -6,6 +6,15 @@ public class BoostMultiplier {
HashMap<CurrencyType, Double> map = new HashMap<CurrencyType, Double>();
@Override
public BoostMultiplier clone() {
BoostMultiplier boost = new BoostMultiplier();
for (CurrencyType type : CurrencyType.values()) {
boost.add(type, map.get(type));
}
return boost;
}
public BoostMultiplier() {
for (CurrencyType one : CurrencyType.values()) {
map.put(one, 0D);