use of gmgen.plugin.InitHolder in project pcgen by PCGen.
the class ExperienceAdjusterModel method populateLists.
/**
* Populate lists
*/
void populateLists() {
if (combat != null) {
party.removeAllElements();
enemies.removeAllElements();
for (int i = 0; i < combat.size(); i++) {
InitHolder iH = combat.get(i);
if (iH instanceof Combatant) {
Combatant cbt = (Combatant) iH;
if (cbt.getCombatantType().equals("PC")) {
party.addElement(new ExperienceListItem(cbt));
} else if (cbt.getCombatantType().equals("Enemy")) {
if (cbt.getStatus() == State.Dead || cbt.getStatus() == State.Defeated) {
enemies.addElement(new ExperienceListItem(cbt));
}
}
}
}
}
}
Aggregations