From 5a813a75412ac9b8fadb90c9abd46dd95aee8e9b Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 29 Apr 2021 14:17:08 -0400 Subject: Removed data files from repo --- src/spellcasting.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/spellcasting.h') 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("spellcasting", data["spells"])) {} + SlotLevel(const json& data) : numSlots(data["slots"]), spells(jsonList2vec("spellcasting", data["spells"])) {} virtual ~SlotLevel() {} const int numSlots; - const std::vector spells; + const std::vector spells; json toJson(void) const { + std::vector s; + for(auto spell : spells) { + s.push_back(spell.getName()); + } return json({ {"slots", numSlots}, - {"spells", spells} + {"spells", s} }); } }; -- cgit v1.2.3