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

@@ -20,6 +20,7 @@
#include "MessageIdentifiers.h"
#include "dConfig.h"
#include "eTriggerEventType.h"
#include "eGameMasterLevel.h"
#include "eReplicaComponentType.h"
EntityManager* EntityManager::m_Address = nullptr;
@@ -370,7 +371,7 @@ void EntityManager::ConstructEntity(Entity* entity, const SystemAddress& sysAddr
// PacketUtils::SavePacket("[24]_"+std::to_string(entity->GetObjectID()) + "_" + std::to_string(m_SerializationCounter) + ".bin", (char*)stream.GetData(), stream.GetNumberOfBytesUsed());
if (entity->IsPlayer()) {
if (entity->GetGMLevel() > GAME_MASTER_LEVEL_CIVILIAN) {
if (entity->GetGMLevel() > eGameMasterLevel::CIVILIAN) {
GameMessages::SendToggleGMInvis(entity->GetObjectID(), true, sysAddr);
}
}