mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-27 09:43:22 +01:00
We need to clone boost object
This commit is contained in:
parent
fcbc42e043
commit
b0566f9ded
@ -663,7 +663,7 @@ public class PlayerManager {
|
|||||||
continue main;
|
continue main;
|
||||||
}
|
}
|
||||||
|
|
||||||
return oneItem.getBoost();
|
return oneItem.getBoost().clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
return bonus;
|
return bonus;
|
||||||
|
@ -6,6 +6,15 @@ public class BoostMultiplier {
|
|||||||
|
|
||||||
HashMap<CurrencyType, Double> map = new HashMap<CurrencyType, Double>();
|
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() {
|
public BoostMultiplier() {
|
||||||
for (CurrencyType one : CurrencyType.values()) {
|
for (CurrencyType one : CurrencyType.values()) {
|
||||||
map.put(one, 0D);
|
map.put(one, 0D);
|
||||||
|
Loading…
Reference in New Issue
Block a user