mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-09 07:18:03 +07:00
Created StatList#add(int,StatGetter) to add stats
This commit is contained in:
@ -263,6 +263,11 @@ public final class StatList {
|
||||
// max
|
||||
}
|
||||
|
||||
public int add(int list, StatGetter stat) {
|
||||
final int index = indexOf(list, stat.id(), stat.param());
|
||||
return add(index, stat.value());
|
||||
}
|
||||
|
||||
public void addAll(int list, StatList src, int srcList) {
|
||||
assertMutable();
|
||||
final int srcStartOffset = src.startingOffset(srcList);
|
||||
|
@ -71,6 +71,10 @@ public final class StatListGetter implements Iterable<StatGetter> {
|
||||
return tuple.set(stats, index);
|
||||
}
|
||||
|
||||
public void add(StatGetter stat) {
|
||||
stats.add(list, stat);
|
||||
}
|
||||
|
||||
public void addAll(StatListGetter src) {
|
||||
stats.addAll(list, src.stats, src.list);
|
||||
}
|
||||
|
Reference in New Issue
Block a user