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

@@ -32,6 +32,7 @@
#include "CharacterComponent.h"
#include "Database.h"
#include "dMessageIdentifiers.h"
#include "eGameMasterLevel.h"
#include "eReplicaComponentType.h"
void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* packet) {
@@ -66,7 +67,7 @@ void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* pack
}
std::string playerName = user->GetLastUsedChar()->GetName();
bool isMythran = user->GetLastUsedChar()->GetGMLevel() > 0;
bool isMythran = user->GetLastUsedChar()->GetGMLevel() > eGameMasterLevel::CIVILIAN;
if (!user->GetLastChatMessageApproved() && !isMythran) return;