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:
parent
fcbc42e043
commit
b0566f9ded
@ -663,7 +663,7 @@ public class PlayerManager {
|
||||
continue main;
|
||||
}
|
||||
|
||||
return oneItem.getBoost();
|
||||
return oneItem.getBoost().clone();
|
||||
}
|
||||
|
||||
return bonus;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user