mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 15:27:30 +07:00
Changed GemAttributes to be a subclass of AggregatedAttributes
Gems require item_levelreq stat in their base and are more complex than originally thought
This commit is contained in:
@ -1,12 +1,26 @@
|
||||
package com.riiablo.attributes;
|
||||
|
||||
public class GemAttributes extends Attributes {
|
||||
GemAttributes() {
|
||||
super(StatList.obtain(StatListFlags.NUM_GEM_LISTS));
|
||||
import com.riiablo.logger.LogManager;
|
||||
import com.riiablo.logger.Logger;
|
||||
|
||||
public class GemAttributes extends AggregateAttributes {
|
||||
private static final Logger log = LogManager.getLogger(GemAttributes.class);
|
||||
|
||||
int selected = -1;
|
||||
|
||||
public int selectedList() {
|
||||
return selected;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Attributes reset() {
|
||||
throw new UnsupportedOperationException();
|
||||
public void select(int selected) {
|
||||
if (this.selected >= 0 && selected != this.selected) {
|
||||
log.warn("this.selected(" + this.selected + ") already set");
|
||||
}
|
||||
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
public StatListGetter selected() {
|
||||
return list(selected);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user