diff --git a/include/character_sheet.hpp b/include/character_sheet.hpp index f5fbe72..afc8042 100644 --- a/include/character_sheet.hpp +++ b/include/character_sheet.hpp @@ -55,6 +55,19 @@ namespace character { [[nodiscard]] std::uint32_t get_glory() const { return glory; } [[nodiscard]] std::uint32_t get_money() const { return money; } + + friend void from_json(const json &j, CharacterSheet &billy) { + j.at("caracters").get_to(billy.caractere); + j.at("adresse").get_to(billy.adresse); + j.at("endurance").get_to(billy.endurance); + j.at("chance").get_to(billy.chance); + j.at("habilete").get_to(billy.habilete); + j.at("health_point").get_to(billy.health_point); + j.at("armor").get_to(billy.armor); + j.at("damage").get_to(billy.damage); + j.at("glory").get_to(billy.glory); + j.at("money").get_to(billy.money); + } }; void to_json(json &j, const CharacterSheet &billy) {