diff options
Diffstat (limited to 'src/creature.cc')
-rw-r--r-- | src/creature.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/creature.cc b/src/creature.cc index 21943fe..dcd2324 100644 --- a/src/creature.cc +++ b/src/creature.cc @@ -25,7 +25,7 @@ namespace creature { } Creature::Creature(const json& data, const json& base) - : Entry(base), inventory(json2ptrvec<entry::Item>(data["inventory"])), stats(makeMap<rules::Ability>(data["stats"])), skills(makeMap<rules::Skill>(data["skills"])), proficiency(data["prof"]), size(data["size"]), alignment(data["alignment"]), hdCount(data["hit_die_count"]), hdSides(data["hit_die_sides"]), speed(data["speed"]), saves(json2vec<rules::Ability>(data["saves"])), langs(data["langs"]), cr(data["cr"]), natArmorName(data["natural_armor"]["name"]), natArmorBonus(data["natural_armor"]["bonus"]), dmgImmunities(json2vec<dmgType>(data["d_immunities"])), dmgResistances(json2vec<dmgType>(data["d_resistances"])), dmgVulnerabilities(json2vec<dmgType>(data["d_vulnerabilities"])), condImmunities(json2vec<dmgType>(data["c_immunities"])), features(json2ptrvec<entry::Feature>(data["features"])) + : Entry(base), inventory(utils::json2ptrvec<entry::Item>(data["inventory"])), stats(makeMap<rules::Ability>(data["stats"])), skills(makeMap<rules::Skill>(data["skills"])), proficiency(data["prof"]), size(data["size"]), alignment(data["alignment"]), hdCount(data["hit_die_count"]), hdSides(data["hit_die_sides"]), speed(data["speed"]), saves(utils::json2vec<rules::Ability>(data["saves"])), langs(data["langs"]), cr(data["cr"]), natArmorName(data["natural_armor"]["name"]), natArmorBonus(data["natural_armor"]["bonus"]), dmgImmunities(utils::json2vec<dmgType>(data["d_immunities"])), dmgResistances(utils::json2vec<dmgType>(data["d_resistances"])), dmgVulnerabilities(utils::json2vec<dmgType>(data["d_vulnerabilities"])), condImmunities(utils::json2vec<dmgType>(data["c_immunities"])), features(utils::json2ptrvec<entry::Feature>(data["features"])) { // Initialize names and hp if(((map<string, json>) data).contains("givenName")) { @@ -64,8 +64,8 @@ namespace creature { data["givenName"] = givenName; data["hpMax"] = hpMax; data["hp"] = hp; - data["inventory"] = ptrvec2json(inventory); - data["features"] = ptrvec2json(features); + data["inventory"] = utils::ptrvec2json(inventory); + data["features"] = utils::ptrvec2json(features); return data; } |