diff --git a/core/src/com/riiablo/item/Attributes.java b/core/src/com/riiablo/item/Attributes.java index 3e242dca..602b499f 100644 --- a/core/src/com/riiablo/item/Attributes.java +++ b/core/src/com/riiablo/item/Attributes.java @@ -7,7 +7,7 @@ import com.riiablo.Riiablo; import com.riiablo.codec.excel.ItemStatCost; public class Attributes { - static final PropertyList scratch = new PropertyList(); + //static final PropertyList scratch = new PropertyList(); final PropertyList base = new PropertyList(); final PropertyList agg = new PropertyList(); final PropertyList rem = new PropertyList(); @@ -48,7 +48,7 @@ public class Attributes { public void update(CharData charData) { // aggregates all property lists (necessary because otherwise operations are multiplicative) - scratch.clear(); + /*scratch.clear(); for (PropertyList list : propertyLists) { if (list == null) continue; for (Stat stat : list) { @@ -58,17 +58,21 @@ public class Attributes { } update(charData, scratch); + */ + for (PropertyList list : propertyLists) { + if (list != null) update(charData, list); + } } private void update(CharData charData, PropertyList list) { for (Stat stat : list) { if (stat.entry.op > 0) { boolean empty = !op(charData, stat, stat.entry); - if (empty) rem.add(stat); //.copy() + if (empty) rem.add(stat.copy()); } else if (base.get(stat.hash) == null) { - rem.add(stat); //.copy() + rem.add(stat.copy()); } else { - agg.add(stat); //.copy() + agg.add(stat.copy()); mod.set(stat.stat); } }