breakout gmlevel into a scoped enum (#996)

* breakout gmlevel enum and make it a class
tested that things still work
slash command,
chat restrictions,
packets and serializations

* fix GM level for some slash commands

* fix new use of this enum
This commit is contained in:
Aaron Kimbrell
2023-03-24 18:16:45 -05:00
committed by GitHub
parent b967cc57d1
commit 72ca0f13ff
24 changed files with 184 additions and 159 deletions

View File

@@ -15,6 +15,7 @@ class User;
struct Packet;
class Entity;
enum class ePermissionMap : uint64_t;
enum class eGameMasterLevel : uint8_t;
/**
* Meta information about a character, like their name and style
@@ -308,13 +309,13 @@ public:
* Gets the GM level of the character
* @return the GM level
*/
int32_t GetGMLevel() const { return m_GMLevel; }
eGameMasterLevel GetGMLevel() const { return m_GMLevel; }
/**
* Sets the GM level of the character
* @param value the GM level to set
*/
void SetGMLevel(uint8_t value) { m_GMLevel = value; }
void SetGMLevel(eGameMasterLevel value) { m_GMLevel = value; }
/**
* Gets the current amount of coins of the character
@@ -481,7 +482,7 @@ private:
*
* @see eGameMasterLevel
*/
int32_t m_GMLevel;
eGameMasterLevel m_GMLevel;
/**
* Bitmap of permission attributes this character has.