feat(character): the editor level is the account's GM level, and the client is told it

A character's editor level is its account's GM level for accounts at editor_gm_level
or above, and 0 for everyone else (it was 1 or 0). It is written as the save's edit
attribute, sent with the character after the GM level (the editor flag, then the
level) and given in answer to the GetEditorLevel game message.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 19:11:29 -06:00
parent ca7d166c0b
commit dbe0722095
9 changed files with 139 additions and 35 deletions

View File

@@ -193,6 +193,18 @@ namespace GameMessages {
bool bShow{ true };
};
// Client -> server, and the server's answer to that client: whether the client's level editor is on for the
// player and at which level (the character's editor level, 0 for none). What a client sends is not used.
struct GetEditorLevel : public NetGameMsg {
GetEditorLevel() : NetGameMsg(MessageType::Game::GET_EDITOR_LEVEL) {}
void Serialize(RakNet::BitStream& bitStream) const override;
bool Deserialize(RakNet::BitStream& bitStream) override;
void Handle(Entity& entity, const SystemAddress& sysAddr) override;
bool editorEnabled{ false };
int32_t editorLevel{ 0 };
};
}
#endif // PLAYERMESSAGES_H