mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-28 13:47:49 +07:00
Fixed cache not clearing after consecutive calls
This commit is contained in:
@ -51,7 +51,7 @@ public class StatListLabeler {
|
||||
log.traceEntry("createLabel(stats: {}, opAttrs: {})", stats, opAttrs);
|
||||
// assert stats.parent().numLists() == 1 : "Parent StatList contains more than 1 list";
|
||||
|
||||
descCount = 0;
|
||||
clear();
|
||||
for (StatList.IndexIterator it = stats.indexIterator(); it.hasNext();) {
|
||||
final int index = it.next();
|
||||
final StatGetter stat = stats.get(index);
|
||||
@ -215,6 +215,13 @@ public class StatListLabeler {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void clear() {
|
||||
descCount = 0;
|
||||
for (int i = 0; i < Stat.NUM_GROUPS; i++) {
|
||||
Arrays.fill(dgrpCacheSize, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void add(int priority, String str) {
|
||||
final Tuple tuple = desc[descCount++];
|
||||
tuple.descPriotity = priority;
|
||||
|
Reference in New Issue
Block a user