use of delta.games.lotro.character.events.CharacterEventType in project lotro-companion by dmorcellet.
the class CharacterDataWindowController method eventOccurred.
/**
* Handle character events.
* @param event Source event.
*/
@Override
public void eventOccurred(CharacterEvent event) {
CharacterEventType type = event.getType();
if (type == CharacterEventType.CHARACTER_DATA_UPDATED) {
CharacterData data = event.getToonData();
if (data == _data) {
// Compute new stats
CharacterStatsComputer computer = new CharacterStatsComputer();
BasicStatsSet stats = computer.getStats(data);
BasicStatsSet toonStats = _data.getStats();
toonStats.clear();
toonStats.setStats(stats);
// Update stats display
_statsController.update();
// Update buffs display
_buffsController.update();
}
}
if (type == CharacterEventType.CHARACTER_SUMMARY_UPDATED) {
CharacterFile toonFile = event.getToonFile();
if (toonFile == _toonFile) {
// Update sex
_attrsController.updateSexDisplay();
}
}
}
Aggregations