Skip to content

Commit

Permalink
KOTOR: Add class level initial loading for creatures
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius committed Jan 20, 2018
1 parent b1747fb commit 33635c4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/engines/kotor/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ void Creature::loadProperties(const Aurora::GFF3Struct &gff) {
_race = Race(gff.getSint("Race", _race));
_subRace = SubRace(gff.getSint("SubraceIndex", _subRace));

// Class Levels
if (gff.hasField("ClassList")) {
Aurora::GFF3List classList = gff.getList("ClassList");
for (Aurora::GFF3List::const_iterator iter = classList.begin(); iter != classList.end(); iter++) {
const Aurora::GFF3Struct &charClass = **iter;

ClassLevel classLevel;
classLevel.characterClass = Class(charClass.getSint("Class"));
classLevel.level = charClass.getSint("ClassLevel");

_levels.push_back(classLevel);
}
}

// Scripts
readScripts(gff);
}
Expand Down

0 comments on commit 33635c4

Please sign in to comment.