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

@@ -31,6 +31,7 @@ class Item;
class Character;
class EntityCallbackTimer;
enum class eTriggerEventType;
enum class eGameMasterLevel : uint8_t;
enum class eReplicaComponentType : uint32_t;
namespace CppScripts {
@@ -60,7 +61,7 @@ public:
Character* GetCharacter() const { return m_Character; }
uint8_t GetGMLevel() const { return m_GMLevel; }
eGameMasterLevel GetGMLevel() const { return m_GMLevel; }
uint8_t GetCollectibleID() const { return uint8_t(m_CollectibleID); }
@@ -108,7 +109,7 @@ public:
void SetCharacter(Character* value) { m_Character = value; }
void SetGMLevel(uint8_t value);
void SetGMLevel(eGameMasterLevel value);
void SetOwnerOverride(LWOOBJID value);
@@ -308,7 +309,7 @@ protected:
Entity* m_ParentEntity; //For spawners and the like
std::vector<Entity*> m_ChildEntities;
uint8_t m_GMLevel;
eGameMasterLevel m_GMLevel;
uint16_t m_CollectibleID;
std::vector<std::string> m_Groups;
uint16_t m_NetworkID;