use of pcgen.cdom.facet.BonusChangeFacet in project pcgen by PCGen.
the class CharacterLevelsFacadeImpl method initForCharacter.
/**
* Initialise the instance for the current character.
*/
private void initForCharacter() {
classLevels = new ArrayList<>();
charLevels = new ArrayList<>();
refreshClassList();
charID = theCharacter.getCharID();
SkillFacet skillFacet = FacetLibrary.getFacet(SkillFacet.class);
skillFacet.addDataFacetChangeListener(this);
BonusChangeFacet bcf = FacetLibrary.getFacet(BonusChangeFacet.class);
for (SkillFacade skillFacade : dataSetFacade.getSkills()) {
bcf.addBonusChangeListener(this, "SKILLRANK", skillFacade.getKeyName().toUpperCase());
}
}
use of pcgen.cdom.facet.BonusChangeFacet in project pcgen by PCGen.
the class CharacterLevelsFacadeImpl method closeCharacter.
/**
* Tidy up character listeners when closing the character.
*/
protected void closeCharacter() {
SkillFacet skillFacet = FacetLibrary.getFacet(SkillFacet.class);
skillFacet.removeDataFacetChangeListener(this);
BonusChangeFacet bcf = FacetLibrary.getFacet(BonusChangeFacet.class);
for (SkillFacade skillFacade : dataSetFacade.getSkills()) {
bcf.removeBonusChangeListener(this, "SKILLRANK", skillFacade.getKeyName().toUpperCase());
}
theCharacter = null;
charDisplay = null;
charID = null;
}
Aggregations