diff options
author | Your Name <you@example.com> | 2021-04-29 14:17:08 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-04-29 14:17:08 -0400 |
commit | 5a813a75412ac9b8fadb90c9abd46dd95aee8e9b (patch) | |
tree | 75c5466d459c793430a6481cd276a624cd843794 /src/spellcasting.h | |
parent | cd57ad6e208728bafcbc8c7d7b85d88603706978 (diff) | |
download | dmtool-5a813a75412ac9b8fadb90c9abd46dd95aee8e9b.tar.gz dmtool-5a813a75412ac9b8fadb90c9abd46dd95aee8e9b.tar.bz2 dmtool-5a813a75412ac9b8fadb90c9abd46dd95aee8e9b.zip |
Removed data files from repo
Diffstat (limited to 'src/spellcasting.h')
-rw-r--r-- | src/spellcasting.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/spellcasting.h b/src/spellcasting.h index 654a386..3a55277 100644 --- a/src/spellcasting.h +++ b/src/spellcasting.h @@ -9,15 +9,19 @@ typedef nlohmann::json json; namespace entry { struct SlotLevel : public Jsonable { - SlotLevel(const json& data) : numSlots(data["slots"]), spells(jsonList2vec<spell::Spell>("spellcasting", data["spells"])) {} + SlotLevel(const json& data) : numSlots(data["slots"]), spells(jsonList2vec<Spell>("spellcasting", data["spells"])) {} virtual ~SlotLevel() {} const int numSlots; - const std::vector<spell::Spell> spells; + const std::vector<Spell> spells; json toJson(void) const { + std::vector<string> s; + for(auto spell : spells) { + s.push_back(spell.getName()); + } return json({ {"slots", numSlots}, - {"spells", spells} + {"spells", s} }); } }; |