mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
Merge branch 'elemental-damage-stacking-error-fix' into 'master'
Fixes Stacking of Elements' Double Values - Noticed during fix of Elements tag testing! See merge request phoenix-dvpmt/mmoitems!30
This commit is contained in:
commit
d1ed762288
@ -33,7 +33,8 @@ public class ElementListData implements Mergeable {
|
||||
public void merge(StatData data) {
|
||||
Validate.isTrue(data instanceof ElementListData, "Cannot merge two different stat data types");
|
||||
ElementListData extra = (ElementListData) data;
|
||||
extra.stats.forEach((key, value) -> stats.put(key, value));
|
||||
//Includes old values if any, fixes stacking of element double values I believe - Kilo
|
||||
extra.stats.forEach((key, value) -> stats.put(key, value + stats.getOrDefault(key,0.0)));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
Loading…
Reference in New Issue
Block a user