Serializer.
This commit is contained in:
parent
3691042b6e
commit
4f1075dc28
@ -56,6 +56,19 @@ namespace character {
|
||||
|
||||
[[nodiscard]] std::uint32_t get_money() const { return money; }
|
||||
};
|
||||
|
||||
void to_json(json &j, const CharacterSheet &billy) {
|
||||
j["caractere"] = billy.get_caractere();
|
||||
j["adresse"] = billy.get_adresse();
|
||||
j["endurance"] = billy.get_endurance();
|
||||
j["chance"] = billy.get_chance();
|
||||
j["habilete"] = billy.get_habilete();
|
||||
j["health_point"] = billy.get_health_point();
|
||||
j["armor"] = billy.get_armor();
|
||||
j["damage"] = billy.get_damage();
|
||||
j["glory"] = billy.get_glory();
|
||||
j["money"] = billy.get_money();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user