implement battle rules and character replacement

This commit is contained in:
Martin Michelsen
2023-10-18 11:55:31 -07:00
parent 13dacc013a
commit 8c2ce5210d
24 changed files with 699 additions and 305 deletions
+2 -1
View File
@@ -192,7 +192,8 @@ struct Client : public std::enable_shared_from_this<Client> {
void reschedule_ping_and_timeout_events();
inline uint8_t language() const {
return this->game_data.player()->inventory.language;
auto p = this->game_data.player(true, false);
return p ? p->inventory.language : 1; // English by default
}
inline GameVersion version() const {
return this->channel.version;