Skip to content

Commit

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

// Hit Points
_currentHitPoints = gff.getSint("CurrentHitPoints", _maxHitPoints);
_maxHitPoints = gff.getSint("MaxHitPoints", _currentHitPoints);

_minOneHitPoint = gff.getBool("Min1HP", _minOneHitPoint);

// Class Levels
if (gff.hasField("ClassList")) {
Aurora::GFF3List classList = gff.getList("ClassList");
Expand Down

0 comments on commit ae0237e

Please sign in to comment.