mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 15:27:30 +07:00
Added method to validate flags for gem stat lists
This commit is contained in:
@ -22,6 +22,11 @@ public class AttributesUpdater {
|
||||
if (setItemListCount > 1) {
|
||||
log.warnf("listFlags(0x%x) contains more than 1 set list", listFlags);
|
||||
}
|
||||
} else {
|
||||
final int gemListCount = StatListFlags.countGemFlags(listFlags);
|
||||
if (gemListCount > 1) {
|
||||
log.warnf("listFlags(0x%x) contains more than 1 gem list", listFlags);
|
||||
}
|
||||
}
|
||||
|
||||
final StatList list = attrs.list();
|
||||
|
@ -95,5 +95,9 @@ public class StatListFlags {
|
||||
}
|
||||
}
|
||||
|
||||
static int countGemFlags(int flags) {
|
||||
return Integer.bitCount(flags);
|
||||
}
|
||||
|
||||
private StatListFlags() {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user