mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Merge branch '1097_fix_element_cloning' into 'master'
1097_fix_element_when_revid_is_updated_or_stat_data_is_cloned Closes #1097 See merge request phoenix-dvpmt/mmoitems!73
This commit is contained in:
commit
03a49d0589
@ -41,7 +41,13 @@ public class ElementListData implements Mergeable {
|
||||
@Override
|
||||
public StatData cloneData() {
|
||||
ElementListData ret = new ElementListData();
|
||||
stats.forEach((key, value) -> ret.stats.put(key, value));
|
||||
for (Map.Entry<Pair<Element, ElementStatType>, Double> entry : stats.entrySet()) {
|
||||
Pair<Element, ElementStatType> key = entry.getKey();
|
||||
Double value = entry.getValue();
|
||||
if (value != 0) {
|
||||
ret.stats.put(key, value);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user