aboutsummaryrefslogtreecommitdiff
path: root/src/creature.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-05-06 14:13:28 -0400
committerYour Name <you@example.com>2021-05-06 14:13:28 -0400
commit9f3802690f9dd9452e96d1d7a879291978d66e35 (patch)
tree6d6c17b39abdb9490119241bc4fc061744b46d7d /src/creature.cc
parent2a9f262e6db5906db445d465e500d7ba8c90fab3 (diff)
downloaddmtool-9f3802690f9dd9452e96d1d7a879291978d66e35.tar.gz
dmtool-9f3802690f9dd9452e96d1d7a879291978d66e35.tar.bz2
dmtool-9f3802690f9dd9452e96d1d7a879291978d66e35.zip
Refactoring
Diffstat (limited to 'src/creature.cc')
-rw-r--r--src/creature.cc6
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;
}