consolidate the messagetype enums into a single namespace (#1647)

This commit is contained in:
jadebenn 2024-11-17 18:39:44 -06:00 committed by GitHub
parent adc9cd2876
commit 84d7c65717
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
56 changed files with 2800 additions and 2813 deletions

View File

@ -21,8 +21,8 @@
//Auth includes:
#include "AuthPackets.h"
#include "eConnectionType.h"
#include "eServerMessageType.h"
#include "eAuthMessageType.h"
#include "MessageType/Server.h"
#include "MessageType/Auth.h"
#include "Game.h"
#include "Server.h"
@ -102,7 +102,7 @@ int main(int argc, char** argv) {
uint32_t framesSinceLastSQLPing = 0;
AuthPackets::LoadClaimCodes();
Game::logger->Flush(); // once immediately before main loop
while (!Game::ShouldShutdown()) {
//Check if we're still connected to master:
@ -166,11 +166,11 @@ void HandlePacket(Packet* packet) {
if (packet->data[0] == ID_USER_PACKET_ENUM) {
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::SERVER) {
if (static_cast<eServerMessageType>(packet->data[3]) == eServerMessageType::VERSION_CONFIRM) {
if (static_cast<MessageType::Server>(packet->data[3]) == MessageType::Server::VERSION_CONFIRM) {
AuthPackets::HandleHandshake(Game::server, packet);
}
} else if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::AUTH) {
if (static_cast<eAuthMessageType>(packet->data[3]) == eAuthMessageType::LOGIN_REQUEST) {
if (static_cast<MessageType::Auth>(packet->data[3]) == MessageType::Auth::LOGIN_REQUEST) {
AuthPackets::HandleLoginRequest(Game::server, packet);
}
}

View File

@ -1,6 +1,6 @@
#include "ChatIgnoreList.h"
#include "PlayerContainer.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
#include "BitStreamUtils.h"
#include "Game.h"
#include "Logger.h"
@ -13,7 +13,7 @@
// The only thing not auto-handled is instance activities force joining the team on the server.
void WriteOutgoingReplyHeader(RakNet::BitStream& bitStream, const LWOOBJID& receivingPlayer, const ChatIgnoreList::Response type) {
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receivingPlayer);
//portion that will get routed:

View File

@ -13,9 +13,9 @@
#include "dConfig.h"
#include "eObjectBits.h"
#include "eConnectionType.h"
#include "eChatMessageType.h"
#include "eClientMessageType.h"
#include "eGameMessageType.h"
#include "MessageType/Chat.h"
#include "MessageType/Client.h"
#include "MessageType/Game.h"
#include "StringifiedEnum.h"
#include "eGameMasterLevel.h"
#include "ChatPackets.h"
@ -60,11 +60,11 @@ void ChatPacketHandler::HandleFriendlistRequest(Packet* packet) {
//Now, we need to send the friendlist to the server they came from:
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(playerID);
//portion that will get routed:
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::GET_FRIENDS_LIST_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::GET_FRIENDS_LIST_RESPONSE);
bitStream.Write<uint8_t>(0);
bitStream.Write<uint16_t>(1); //Length of packet -- just writing one as it doesn't matter, client skips it.
bitStream.Write<uint16_t>(player.friends.size());
@ -368,10 +368,10 @@ void ChatPacketHandler::HandleWho(Packet* packet) {
bool online = player;
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(request.requestor);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::WHO_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::WHO_RESPONSE);
bitStream.Write<uint8_t>(online);
bitStream.Write(player.zoneID.GetMapID());
bitStream.Write(player.zoneID.GetInstanceID());
@ -391,10 +391,10 @@ void ChatPacketHandler::HandleShowAll(Packet* packet) {
if (!sender) return;
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(request.requestor);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::SHOW_ALL_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::SHOW_ALL_RESPONSE);
bitStream.Write<uint8_t>(!request.displayZoneData && !request.displayIndividualPlayers);
bitStream.Write(Game::playerContainer.GetPlayerCount());
bitStream.Write(Game::playerContainer.GetSimCount());
@ -416,7 +416,7 @@ void ChatPacketHandler::HandleShowAll(Packet* packet) {
SEND_PACKET;
}
// the structure the client uses to send this packet is shared in many chat messages
// the structure the client uses to send this packet is shared in many chat messages
// that are sent to the server. Because of this, there are large gaps of unused data in chat messages
void ChatPacketHandler::HandleChatMessage(Packet* packet) {
CINSTREAM_SKIP_HEADER;
@ -428,7 +428,7 @@ void ChatPacketHandler::HandleChatMessage(Packet* packet) {
eChatChannel channel;
uint32_t size;
inStream.IgnoreBytes(4);
inStream.Read(channel);
inStream.Read(size);
@ -436,7 +436,7 @@ void ChatPacketHandler::HandleChatMessage(Packet* packet) {
LUWString message(size);
inStream.Read(message);
LOG("Got a message from (%s) via [%s]: %s", sender.playerName.c_str(), StringifiedEnum::ToString(channel).data(), message.GetAsString().c_str());
switch (channel) {
@ -457,7 +457,7 @@ void ChatPacketHandler::HandleChatMessage(Packet* packet) {
}
}
// the structure the client uses to send this packet is shared in many chat messages
// the structure the client uses to send this packet is shared in many chat messages
// that are sent to the server. Because of this, there are large gaps of unused data in chat messages
void ChatPacketHandler::HandlePrivateChatMessage(Packet* packet) {
CINSTREAM_SKIP_HEADER;
@ -484,7 +484,7 @@ void ChatPacketHandler::HandlePrivateChatMessage(Packet* packet) {
LUWString message(size);
inStream.Read(message);
LOG("Got a message from (%s) via [%s]: %s to %s", sender.playerName.c_str(), StringifiedEnum::ToString(channel).data(), message.GetAsString().c_str(), receiverName.c_str());
const auto& receiver = Game::playerContainer.GetPlayerData(receiverName);
@ -515,10 +515,10 @@ void ChatPacketHandler::HandlePrivateChatMessage(Packet* packet) {
void ChatPacketHandler::SendPrivateChatMessage(const PlayerData& sender, const PlayerData& receiver, const PlayerData& routeTo, const LUWString& message, const eChatChannel channel, const eChatMessageResponseCode responseCode) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(routeTo.playerID);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::PRIVATE_CHAT_MESSAGE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::PRIVATE_CHAT_MESSAGE);
bitStream.Write(sender.playerID);
bitStream.Write(channel);
bitStream.Write<uint32_t>(0); // not used
@ -757,11 +757,11 @@ void ChatPacketHandler::HandleTeamStatusRequest(Packet* packet) {
void ChatPacketHandler::SendTeamInvite(const PlayerData& receiver, const PlayerData& sender) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::TEAM_INVITE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::TEAM_INVITE);
bitStream.Write(LUWString(sender.playerName.c_str()));
bitStream.Write(sender.playerID);
@ -772,14 +772,14 @@ void ChatPacketHandler::SendTeamInvite(const PlayerData& receiver, const PlayerD
void ChatPacketHandler::SendTeamInviteConfirm(const PlayerData& receiver, bool bLeaderIsFreeTrial, LWOOBJID i64LeaderID, LWOZONEID i64LeaderZoneID, uint8_t ucLootFlag, uint8_t ucNumOfOtherPlayers, uint8_t ucResponseCode, std::u16string wsLeaderName) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
CMSGHEADER;
bitStream.Write(receiver.playerID);
bitStream.Write(eGameMessageType::TEAM_INVITE_CONFIRM);
bitStream.Write(MessageType::Game::TEAM_INVITE_CONFIRM);
bitStream.Write(bLeaderIsFreeTrial);
bitStream.Write(i64LeaderID);
@ -799,14 +799,14 @@ void ChatPacketHandler::SendTeamInviteConfirm(const PlayerData& receiver, bool b
void ChatPacketHandler::SendTeamStatus(const PlayerData& receiver, LWOOBJID i64LeaderID, LWOZONEID i64LeaderZoneID, uint8_t ucLootFlag, uint8_t ucNumOfOtherPlayers, std::u16string wsLeaderName) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
CMSGHEADER;
bitStream.Write(receiver.playerID);
bitStream.Write(eGameMessageType::TEAM_GET_STATUS_RESPONSE);
bitStream.Write(MessageType::Game::TEAM_GET_STATUS_RESPONSE);
bitStream.Write(i64LeaderID);
bitStream.Write(i64LeaderZoneID);
@ -824,14 +824,14 @@ void ChatPacketHandler::SendTeamStatus(const PlayerData& receiver, LWOOBJID i64L
void ChatPacketHandler::SendTeamSetLeader(const PlayerData& receiver, LWOOBJID i64PlayerID) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
CMSGHEADER;
bitStream.Write(receiver.playerID);
bitStream.Write(eGameMessageType::TEAM_SET_LEADER);
bitStream.Write(MessageType::Game::TEAM_SET_LEADER);
bitStream.Write(i64PlayerID);
@ -841,14 +841,14 @@ void ChatPacketHandler::SendTeamSetLeader(const PlayerData& receiver, LWOOBJID i
void ChatPacketHandler::SendTeamAddPlayer(const PlayerData& receiver, bool bIsFreeTrial, bool bLocal, bool bNoLootOnDeath, LWOOBJID i64PlayerID, std::u16string wsPlayerName, LWOZONEID zoneID) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
CMSGHEADER;
bitStream.Write(receiver.playerID);
bitStream.Write(eGameMessageType::TEAM_ADD_PLAYER);
bitStream.Write(MessageType::Game::TEAM_ADD_PLAYER);
bitStream.Write(bIsFreeTrial);
bitStream.Write(bLocal);
@ -870,14 +870,14 @@ void ChatPacketHandler::SendTeamAddPlayer(const PlayerData& receiver, bool bIsFr
void ChatPacketHandler::SendTeamRemovePlayer(const PlayerData& receiver, bool bDisband, bool bIsKicked, bool bIsLeaving, bool bLocal, LWOOBJID i64LeaderID, LWOOBJID i64PlayerID, std::u16string wsPlayerName) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
CMSGHEADER;
bitStream.Write(receiver.playerID);
bitStream.Write(eGameMessageType::TEAM_REMOVE_PLAYER);
bitStream.Write(MessageType::Game::TEAM_REMOVE_PLAYER);
bitStream.Write(bDisband);
bitStream.Write(bIsKicked);
@ -896,14 +896,14 @@ void ChatPacketHandler::SendTeamRemovePlayer(const PlayerData& receiver, bool bD
void ChatPacketHandler::SendTeamSetOffWorldFlag(const PlayerData& receiver, LWOOBJID i64PlayerID, LWOZONEID zoneID) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
CMSGHEADER;
bitStream.Write(receiver.playerID);
bitStream.Write(eGameMessageType::TEAM_SET_OFF_WORLD_FLAG);
bitStream.Write(MessageType::Game::TEAM_SET_OFF_WORLD_FLAG);
bitStream.Write(i64PlayerID);
if (receiver.zoneID.GetCloneID() == zoneID.GetCloneID()) {
@ -930,11 +930,11 @@ void ChatPacketHandler::SendFriendUpdate(const PlayerData& friendData, const Pla
[bool] - is FTP*/
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(friendData.playerID);
//portion that will get routed:
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::UPDATE_FRIEND_NOTIFY);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::UPDATE_FRIEND_NOTIFY);
bitStream.Write<uint8_t>(notifyType);
std::string playerName = playerData.playerName.c_str();
@ -967,11 +967,11 @@ void ChatPacketHandler::SendFriendRequest(const PlayerData& receiver, const Play
}
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::ADD_FRIEND_REQUEST);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::ADD_FRIEND_REQUEST);
bitStream.Write(LUWString(sender.playerName));
bitStream.Write<uint8_t>(0); // This is a BFF flag however this is unused in live and does not have an implementation client side.
@ -981,11 +981,11 @@ void ChatPacketHandler::SendFriendRequest(const PlayerData& receiver, const Play
void ChatPacketHandler::SendFriendResponse(const PlayerData& receiver, const PlayerData& sender, eAddFriendResponseType responseCode, uint8_t isBestFriendsAlready, uint8_t isBestFriendRequest) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
// Portion that will get routed:
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::ADD_FRIEND_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::ADD_FRIEND_RESPONSE);
bitStream.Write(responseCode);
// For all requests besides accepted, write a flag that says whether or not we are already best friends with the receiver.
bitStream.Write<uint8_t>(responseCode != eAddFriendResponseType::ACCEPTED ? isBestFriendsAlready : sender.sysAddr != UNASSIGNED_SYSTEM_ADDRESS);
@ -1004,11 +1004,11 @@ void ChatPacketHandler::SendFriendResponse(const PlayerData& receiver, const Pla
void ChatPacketHandler::SendRemoveFriend(const PlayerData& receiver, std::string& personToRemove, bool isSuccessful) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WORLD_ROUTE_PACKET);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WORLD_ROUTE_PACKET);
bitStream.Write(receiver.playerID);
//portion that will get routed:
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::REMOVE_FRIEND_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::REMOVE_FRIEND_RESPONSE);
bitStream.Write<uint8_t>(isSuccessful); //isOnline
bitStream.Write(LUWString(personToRemove));

View File

@ -16,8 +16,8 @@
#include "eConnectionType.h"
#include "PlayerContainer.h"
#include "ChatPacketHandler.h"
#include "eChatMessageType.h"
#include "eWorldMessageType.h"
#include "MessageType/Chat.h"
#include "MessageType/World.h"
#include "ChatIgnoreList.h"
#include "StringifiedEnum.h"
@ -108,7 +108,7 @@ int main(int argc, char** argv) {
const bool dontGenerateDCF = GeneralUtils::TryParse<bool>(Game::config->GetValue("dont_generate_dcf")).value_or(false);
Game::chatFilter = new dChatFilter(Game::assetManager->GetResPath().string() + "/chatplus_en_us", dontGenerateDCF);
Game::randomEngine = std::mt19937(time(0));
Game::playerContainer.Initialize();
@ -190,154 +190,154 @@ void HandlePacket(Packet* packet) {
inStream.SetReadOffset(BYTES_TO_BITS(1));
eConnectionType connection;
eChatMessageType chatMessageID;
MessageType::Chat chatMessageID;
inStream.Read(connection);
if (connection != eConnectionType::CHAT) return;
inStream.Read(chatMessageID);
switch (chatMessageID) {
case eChatMessageType::GM_MUTE:
case MessageType::Chat::GM_MUTE:
Game::playerContainer.MuteUpdate(packet);
break;
case eChatMessageType::CREATE_TEAM:
case MessageType::Chat::CREATE_TEAM:
Game::playerContainer.CreateTeamServer(packet);
break;
case eChatMessageType::GET_FRIENDS_LIST:
case MessageType::Chat::GET_FRIENDS_LIST:
ChatPacketHandler::HandleFriendlistRequest(packet);
break;
case eChatMessageType::GET_IGNORE_LIST:
case MessageType::Chat::GET_IGNORE_LIST:
ChatIgnoreList::GetIgnoreList(packet);
break;
case eChatMessageType::ADD_IGNORE:
case MessageType::Chat::ADD_IGNORE:
ChatIgnoreList::AddIgnore(packet);
break;
case eChatMessageType::REMOVE_IGNORE:
case MessageType::Chat::REMOVE_IGNORE:
ChatIgnoreList::RemoveIgnore(packet);
break;
case eChatMessageType::TEAM_GET_STATUS:
case MessageType::Chat::TEAM_GET_STATUS:
ChatPacketHandler::HandleTeamStatusRequest(packet);
break;
case eChatMessageType::ADD_FRIEND_REQUEST:
case MessageType::Chat::ADD_FRIEND_REQUEST:
//this involves someone sending the initial request, the response is below, response as in from the other player.
//We basically just check to see if this player is online or not and route the packet.
ChatPacketHandler::HandleFriendRequest(packet);
break;
case eChatMessageType::ADD_FRIEND_RESPONSE:
case MessageType::Chat::ADD_FRIEND_RESPONSE:
//This isn't the response a server sent, rather it is a player's response to a received request.
//Here, we'll actually have to add them to eachother's friend lists depending on the response code.
ChatPacketHandler::HandleFriendResponse(packet);
break;
case eChatMessageType::REMOVE_FRIEND:
case MessageType::Chat::REMOVE_FRIEND:
ChatPacketHandler::HandleRemoveFriend(packet);
break;
case eChatMessageType::GENERAL_CHAT_MESSAGE:
case MessageType::Chat::GENERAL_CHAT_MESSAGE:
ChatPacketHandler::HandleChatMessage(packet);
break;
case eChatMessageType::PRIVATE_CHAT_MESSAGE:
case MessageType::Chat::PRIVATE_CHAT_MESSAGE:
//This message is supposed to be echo'd to both the sender and the receiver
//BUT: they have to have different responseCodes, so we'll do some of the ol hacky wacky to fix that right up.
ChatPacketHandler::HandlePrivateChatMessage(packet);
break;
case eChatMessageType::TEAM_INVITE:
case MessageType::Chat::TEAM_INVITE:
ChatPacketHandler::HandleTeamInvite(packet);
break;
case eChatMessageType::TEAM_INVITE_RESPONSE:
case MessageType::Chat::TEAM_INVITE_RESPONSE:
ChatPacketHandler::HandleTeamInviteResponse(packet);
break;
case eChatMessageType::TEAM_LEAVE:
case MessageType::Chat::TEAM_LEAVE:
ChatPacketHandler::HandleTeamLeave(packet);
break;
case eChatMessageType::TEAM_SET_LEADER:
case MessageType::Chat::TEAM_SET_LEADER:
ChatPacketHandler::HandleTeamPromote(packet);
break;
case eChatMessageType::TEAM_KICK:
case MessageType::Chat::TEAM_KICK:
ChatPacketHandler::HandleTeamKick(packet);
break;
case eChatMessageType::TEAM_SET_LOOT:
case MessageType::Chat::TEAM_SET_LOOT:
ChatPacketHandler::HandleTeamLootOption(packet);
break;
case eChatMessageType::GMLEVEL_UPDATE:
case MessageType::Chat::GMLEVEL_UPDATE:
ChatPacketHandler::HandleGMLevelUpdate(packet);
break;
case eChatMessageType::LOGIN_SESSION_NOTIFY:
case MessageType::Chat::LOGIN_SESSION_NOTIFY:
Game::playerContainer.InsertPlayer(packet);
break;
case eChatMessageType::GM_ANNOUNCE:{
case MessageType::Chat::GM_ANNOUNCE:{
// we just forward this packet to every connected server
inStream.ResetReadPointer();
Game::server->Send(inStream, packet->systemAddress, true); // send to everyone except origin
}
break;
case eChatMessageType::UNEXPECTED_DISCONNECT:
case MessageType::Chat::UNEXPECTED_DISCONNECT:
Game::playerContainer.RemovePlayer(packet);
break;
case eChatMessageType::WHO:
case MessageType::Chat::WHO:
ChatPacketHandler::HandleWho(packet);
break;
case eChatMessageType::SHOW_ALL:
case MessageType::Chat::SHOW_ALL:
ChatPacketHandler::HandleShowAll(packet);
break;
case eChatMessageType::USER_CHANNEL_CHAT_MESSAGE:
case eChatMessageType::WORLD_DISCONNECT_REQUEST:
case eChatMessageType::WORLD_PROXIMITY_RESPONSE:
case eChatMessageType::WORLD_PARCEL_RESPONSE:
case eChatMessageType::TEAM_MISSED_INVITE_CHECK:
case eChatMessageType::GUILD_CREATE:
case eChatMessageType::GUILD_INVITE:
case eChatMessageType::GUILD_INVITE_RESPONSE:
case eChatMessageType::GUILD_LEAVE:
case eChatMessageType::GUILD_KICK:
case eChatMessageType::GUILD_GET_STATUS:
case eChatMessageType::GUILD_GET_ALL:
case eChatMessageType::BLUEPRINT_MODERATED:
case eChatMessageType::BLUEPRINT_MODEL_READY:
case eChatMessageType::PROPERTY_READY_FOR_APPROVAL:
case eChatMessageType::PROPERTY_MODERATION_CHANGED:
case eChatMessageType::PROPERTY_BUILDMODE_CHANGED:
case eChatMessageType::PROPERTY_BUILDMODE_CHANGED_REPORT:
case eChatMessageType::MAIL:
case eChatMessageType::WORLD_INSTANCE_LOCATION_REQUEST:
case eChatMessageType::REPUTATION_UPDATE:
case eChatMessageType::SEND_CANNED_TEXT:
case eChatMessageType::CHARACTER_NAME_CHANGE_REQUEST:
case eChatMessageType::CSR_REQUEST:
case eChatMessageType::CSR_REPLY:
case eChatMessageType::GM_KICK:
case eChatMessageType::WORLD_ROUTE_PACKET:
case eChatMessageType::GET_ZONE_POPULATIONS:
case eChatMessageType::REQUEST_MINIMUM_CHAT_MODE:
case eChatMessageType::MATCH_REQUEST:
case eChatMessageType::UGCMANIFEST_REPORT_MISSING_FILE:
case eChatMessageType::UGCMANIFEST_REPORT_DONE_FILE:
case eChatMessageType::UGCMANIFEST_REPORT_DONE_BLUEPRINT:
case eChatMessageType::UGCC_REQUEST:
case eChatMessageType::WORLD_PLAYERS_PET_MODERATED_ACKNOWLEDGE:
case eChatMessageType::ACHIEVEMENT_NOTIFY:
case eChatMessageType::GM_CLOSE_PRIVATE_CHAT_WINDOW:
case eChatMessageType::PLAYER_READY:
case eChatMessageType::GET_DONATION_TOTAL:
case eChatMessageType::UPDATE_DONATION:
case eChatMessageType::PRG_CSR_COMMAND:
case eChatMessageType::HEARTBEAT_REQUEST_FROM_WORLD:
case eChatMessageType::UPDATE_FREE_TRIAL_STATUS:
case MessageType::Chat::USER_CHANNEL_CHAT_MESSAGE:
case MessageType::Chat::WORLD_DISCONNECT_REQUEST:
case MessageType::Chat::WORLD_PROXIMITY_RESPONSE:
case MessageType::Chat::WORLD_PARCEL_RESPONSE:
case MessageType::Chat::TEAM_MISSED_INVITE_CHECK:
case MessageType::Chat::GUILD_CREATE:
case MessageType::Chat::GUILD_INVITE:
case MessageType::Chat::GUILD_INVITE_RESPONSE:
case MessageType::Chat::GUILD_LEAVE:
case MessageType::Chat::GUILD_KICK:
case MessageType::Chat::GUILD_GET_STATUS:
case MessageType::Chat::GUILD_GET_ALL:
case MessageType::Chat::BLUEPRINT_MODERATED:
case MessageType::Chat::BLUEPRINT_MODEL_READY:
case MessageType::Chat::PROPERTY_READY_FOR_APPROVAL:
case MessageType::Chat::PROPERTY_MODERATION_CHANGED:
case MessageType::Chat::PROPERTY_BUILDMODE_CHANGED:
case MessageType::Chat::PROPERTY_BUILDMODE_CHANGED_REPORT:
case MessageType::Chat::MAIL:
case MessageType::Chat::WORLD_INSTANCE_LOCATION_REQUEST:
case MessageType::Chat::REPUTATION_UPDATE:
case MessageType::Chat::SEND_CANNED_TEXT:
case MessageType::Chat::CHARACTER_NAME_CHANGE_REQUEST:
case MessageType::Chat::CSR_REQUEST:
case MessageType::Chat::CSR_REPLY:
case MessageType::Chat::GM_KICK:
case MessageType::Chat::WORLD_ROUTE_PACKET:
case MessageType::Chat::GET_ZONE_POPULATIONS:
case MessageType::Chat::REQUEST_MINIMUM_CHAT_MODE:
case MessageType::Chat::MATCH_REQUEST:
case MessageType::Chat::UGCMANIFEST_REPORT_MISSING_FILE:
case MessageType::Chat::UGCMANIFEST_REPORT_DONE_FILE:
case MessageType::Chat::UGCMANIFEST_REPORT_DONE_BLUEPRINT:
case MessageType::Chat::UGCC_REQUEST:
case MessageType::Chat::WORLD_PLAYERS_PET_MODERATED_ACKNOWLEDGE:
case MessageType::Chat::ACHIEVEMENT_NOTIFY:
case MessageType::Chat::GM_CLOSE_PRIVATE_CHAT_WINDOW:
case MessageType::Chat::PLAYER_READY:
case MessageType::Chat::GET_DONATION_TOTAL:
case MessageType::Chat::UPDATE_DONATION:
case MessageType::Chat::PRG_CSR_COMMAND:
case MessageType::Chat::HEARTBEAT_REQUEST_FROM_WORLD:
case MessageType::Chat::UPDATE_FREE_TRIAL_STATUS:
LOG("Unhandled CHAT Message id: %s (%i)", StringifiedEnum::ToString(chatMessageID).data(), chatMessageID);
break;
default:

View File

@ -11,7 +11,7 @@
#include "eConnectionType.h"
#include "ChatPackets.h"
#include "dConfig.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
void PlayerContainer::Initialize() {
m_MaxNumberOfBestFriends =
@ -154,7 +154,7 @@ void PlayerContainer::CreateTeamServer(Packet* packet) {
void PlayerContainer::BroadcastMuteUpdate(LWOOBJID player, time_t time) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::GM_MUTE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::GM_MUTE);
bitStream.Write(player);
bitStream.Write(time);
@ -361,7 +361,7 @@ void PlayerContainer::TeamStatusUpdate(TeamData* team) {
void PlayerContainer::UpdateTeamsOnWorld(TeamData* team, bool deleteTeam) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::TEAM_GET_STATUS);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::TEAM_GET_STATUS);
bitStream.Write(team->teamID);
bitStream.Write(deleteTeam);

View File

@ -0,0 +1,13 @@
#pragma once
#include <cstdint>
namespace MessageType {
enum class Auth : uint32_t {
LOGIN_REQUEST = 0,
LOGOUT_REQUEST,
CREATE_NEW_ACCOUNT_REQUEST,
LEGOINTERFACE_AUTH_RESPONSE,
SESSIONKEY_RECEIVED_CONFIRM,
RUNTIME_CONFIG
};
}

View File

@ -0,0 +1,78 @@
#pragma once
#include <cstdint>
namespace MessageType {
//! The Internal Chat Packet Identifiers
enum class Chat : uint32_t {
LOGIN_SESSION_NOTIFY = 0,
GENERAL_CHAT_MESSAGE,
PRIVATE_CHAT_MESSAGE,
USER_CHANNEL_CHAT_MESSAGE,
WORLD_DISCONNECT_REQUEST,
WORLD_PROXIMITY_RESPONSE,
WORLD_PARCEL_RESPONSE,
ADD_FRIEND_REQUEST,
ADD_FRIEND_RESPONSE,
REMOVE_FRIEND,
GET_FRIENDS_LIST,
ADD_IGNORE,
REMOVE_IGNORE,
GET_IGNORE_LIST,
TEAM_MISSED_INVITE_CHECK,
TEAM_INVITE,
TEAM_INVITE_RESPONSE,
TEAM_KICK,
TEAM_LEAVE,
TEAM_SET_LOOT,
TEAM_SET_LEADER,
TEAM_GET_STATUS,
GUILD_CREATE,
GUILD_INVITE,
GUILD_INVITE_RESPONSE,
GUILD_LEAVE,
GUILD_KICK,
GUILD_GET_STATUS,
GUILD_GET_ALL,
SHOW_ALL,
BLUEPRINT_MODERATED,
BLUEPRINT_MODEL_READY,
PROPERTY_READY_FOR_APPROVAL,
PROPERTY_MODERATION_CHANGED,
PROPERTY_BUILDMODE_CHANGED,
PROPERTY_BUILDMODE_CHANGED_REPORT,
MAIL,
WORLD_INSTANCE_LOCATION_REQUEST,
REPUTATION_UPDATE,
SEND_CANNED_TEXT,
GMLEVEL_UPDATE,
CHARACTER_NAME_CHANGE_REQUEST,
CSR_REQUEST,
CSR_REPLY,
GM_KICK,
GM_ANNOUNCE,
GM_MUTE,
ACTIVITY_UPDATE,
WORLD_ROUTE_PACKET,
GET_ZONE_POPULATIONS,
REQUEST_MINIMUM_CHAT_MODE,
REQUEST_MINIMUM_CHAT_MODE_PRIVATE,
MATCH_REQUEST,
UGCMANIFEST_REPORT_MISSING_FILE,
UGCMANIFEST_REPORT_DONE_FILE,
UGCMANIFEST_REPORT_DONE_BLUEPRINT,
UGCC_REQUEST,
WHO,
WORLD_PLAYERS_PET_MODERATED_ACKNOWLEDGE,
ACHIEVEMENT_NOTIFY,
GM_CLOSE_PRIVATE_CHAT_WINDOW,
UNEXPECTED_DISCONNECT,
PLAYER_READY,
GET_DONATION_TOTAL,
UPDATE_DONATION,
PRG_CSR_COMMAND,
HEARTBEAT_REQUEST_FROM_WORLD,
UPDATE_FREE_TRIAL_STATUS,
// CUSTOM DLU MESSAGE ID FOR INTERNAL USE
CREATE_TEAM,
};
}

View File

@ -0,0 +1,74 @@
#pragma once
#include <cstdint>
namespace MessageType {
enum class Client : uint32_t {
LOGIN_RESPONSE = 0,
LOGOUT_RESPONSE,
LOAD_STATIC_ZONE,
CREATE_OBJECT,
CREATE_CHARACTER,
CREATE_CHARACTER_EXTENDED,
CHARACTER_LIST_RESPONSE,
CHARACTER_CREATE_RESPONSE,
CHARACTER_RENAME_RESPONSE,
CHAT_CONNECT_RESPONSE,
AUTH_ACCOUNT_CREATE_RESPONSE,
DELETE_CHARACTER_RESPONSE,
GAME_MSG,
CONNECT_CHAT,
TRANSFER_TO_WORLD,
IMPENDING_RELOAD_NOTIFY,
MAKE_GM_RESPONSE,
HTTP_MONITOR_INFO_RESPONSE,
SLASH_PUSH_MAP_RESPONSE,
SLASH_PULL_MAP_RESPONSE,
SLASH_LOCK_MAP_RESPONSE,
BLUEPRINT_SAVE_RESPONSE,
BLUEPRINT_LUP_SAVE_RESPONSE,
BLUEPRINT_LOAD_RESPONSE_ITEMID,
BLUEPRINT_GET_ALL_DATA_RESPONSE,
MODEL_INSTANTIATE_RESPONSE,
DEBUG_OUTPUT,
ADD_FRIEND_REQUEST,
ADD_FRIEND_RESPONSE,
REMOVE_FRIEND_RESPONSE,
GET_FRIENDS_LIST_RESPONSE,
UPDATE_FRIEND_NOTIFY,
ADD_IGNORE_RESPONSE,
REMOVE_IGNORE_RESPONSE,
GET_IGNORE_LIST_RESPONSE,
TEAM_INVITE,
TEAM_INVITE_INITIAL_RESPONSE,
GUILD_CREATE_RESPONSE,
GUILD_GET_STATUS_RESPONSE,
GUILD_INVITE,
GUILD_INVITE_INITIAL_RESPONSE,
GUILD_INVITE_FINAL_RESPONSE,
GUILD_INVITE_CONFIRM,
GUILD_ADD_PLAYER,
GUILD_REMOVE_PLAYER,
GUILD_LOGIN_LOGOUT,
GUILD_RANK_CHANGE,
GUILD_DATA,
GUILD_STATUS,
MAIL,
DB_PROXY_RESULT,
SHOW_ALL_RESPONSE,
WHO_RESPONSE,
SEND_CANNED_TEXT,
UPDATE_CHARACTER_NAME,
SET_NETWORK_SIMULATOR,
INVALID_CHAT_MESSAGE,
MINIMUM_CHAT_MODE_RESPONSE,
MINIMUM_CHAT_MODE_RESPONSE_PRIVATE,
CHAT_MODERATION_STRING,
UGC_MANIFEST_RESPONSE,
IN_LOGIN_QUEUE,
SERVER_STATES,
GM_CLOSE_TARGET_CHAT_WINDOW,
GENERAL_TEXT_FOR_LOCALIZATION,
UPDATE_FREE_TRIAL_STATUS,
UGC_DOWNLOAD_FAILED = 120
};
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
#pragma once
#include <cstdint>
namespace MessageType {
enum class Master : uint32_t {
REQUEST_PERSISTENT_ID = 1,
REQUEST_PERSISTENT_ID_RESPONSE,
REQUEST_ZONE_TRANSFER,
REQUEST_ZONE_TRANSFER_RESPONSE,
SERVER_INFO,
REQUEST_SESSION_KEY,
SET_SESSION_KEY,
SESSION_KEY_RESPONSE,
PLAYER_ADDED,
PLAYER_REMOVED,
CREATE_PRIVATE_ZONE,
REQUEST_PRIVATE_ZONE,
WORLD_READY,
PREP_ZONE,
SHUTDOWN,
SHUTDOWN_RESPONSE,
SHUTDOWN_IMMEDIATE,
SHUTDOWN_UNIVERSE,
AFFIRM_TRANSFER_REQUEST,
AFFIRM_TRANSFER_RESPONSE,
NEW_SESSION_ALERT
};
}

View File

@ -0,0 +1,11 @@
#pragma once
#include <cstdint>
namespace MessageType {
//! The Internal Server Packet Identifiers
enum class Server : uint32_t {
VERSION_CONFIRM = 0,
DISCONNECT_NOTIFY,
GENERAL_NOTIFY
};
}

View File

@ -0,0 +1,49 @@
#pragma once
#include <cstdint>
#include "magic_enum.hpp"
namespace MessageType {
enum class World : uint32_t {
VALIDATION = 1, // Session info
CHARACTER_LIST_REQUEST,
CHARACTER_CREATE_REQUEST,
LOGIN_REQUEST, // Character selected
GAME_MSG,
CHARACTER_DELETE_REQUEST,
CHARACTER_RENAME_REQUEST,
HAPPY_FLOWER_MODE_NOTIFY,
SLASH_RELOAD_MAP, // Reload map cmp
SLASH_PUSH_MAP_REQUEST, // Push map req cmd
SLASH_PUSH_MAP, // Push map cmd
SLASH_PULL_MAP, // Pull map cmd
LOCK_MAP_REQUEST,
GENERAL_CHAT_MESSAGE, // General chat message
HTTP_MONITOR_INFO_REQUEST,
SLASH_DEBUG_SCRIPTS, // Debug scripts cmd
MODELS_CLEAR,
EXHIBIT_INSERT_MODEL,
LEVEL_LOAD_COMPLETE, // Character data request
TMP_GUILD_CREATE,
ROUTE_PACKET, // Social?
POSITION_UPDATE,
MAIL,
WORD_CHECK, // AllowList word check
STRING_CHECK, // AllowList string check
GET_PLAYERS_IN_ZONE,
REQUEST_UGC_MANIFEST_INFO,
BLUEPRINT_GET_ALL_DATA_REQUEST,
CANCEL_MAP_QUEUE,
HANDLE_FUNNESS,
FAKE_PRG_CSR_MESSAGE,
REQUEST_FREE_TRIAL_REFRESH,
GM_SET_FREE_TRIAL_STATUS,
UI_HELP_TOP_5 = 91
};
}
template <>
struct magic_enum::customize::enum_range<MessageType::World> {
static constexpr int min = 0;
static constexpr int max = 91;
};

View File

@ -8,7 +8,7 @@
#include <set>
#include "BitStream.h"
#include "eConnectionType.h"
#include "eClientMessageType.h"
#include "MessageType/Client.h"
#include "BitStreamUtils.h"
#pragma warning (disable:4251) //Disables SQL warnings
@ -33,7 +33,7 @@ constexpr uint32_t lowFrameDelta = FRAMES_TO_MS(lowFramerate);
#define CBITSTREAM RakNet::BitStream bitStream;
#define CINSTREAM RakNet::BitStream inStream(packet->data, packet->length, false);
#define CINSTREAM_SKIP_HEADER CINSTREAM if (inStream.GetNumberOfUnreadBits() >= BYTES_TO_BITS(HEADER_SIZE)) inStream.IgnoreBytes(HEADER_SIZE); else inStream.IgnoreBits(inStream.GetNumberOfUnreadBits());
#define CMSGHEADER BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
#define CMSGHEADER BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
#define SEND_PACKET Game::server->Send(bitStream, sysAddr, false);
#define SEND_PACKET_BROADCAST Game::server->Send(bitStream, UNASSIGNED_SYSTEM_ADDRESS, true);

View File

@ -1,15 +0,0 @@
#ifndef __EAUTHMESSAGETYPE__H__
#define __EAUTHMESSAGETYPE__H__
#include <cstdint>
enum class eAuthMessageType : uint32_t {
LOGIN_REQUEST = 0,
LOGOUT_REQUEST,
CREATE_NEW_ACCOUNT_REQUEST,
LEGOINTERFACE_AUTH_RESPONSE,
SESSIONKEY_RECEIVED_CONFIRM,
RUNTIME_CONFIG
};
#endif //!__EAUTHMESSAGETYPE__H__

View File

@ -1,80 +0,0 @@
#ifndef __ECHATMESSAGETYPE__H__
#define __ECHATMESSAGETYPE__H__
#include <cstdint>
//! The Internal Chat Packet Identifiers
enum class eChatMessageType :uint32_t {
LOGIN_SESSION_NOTIFY = 0,
GENERAL_CHAT_MESSAGE,
PRIVATE_CHAT_MESSAGE,
USER_CHANNEL_CHAT_MESSAGE,
WORLD_DISCONNECT_REQUEST,
WORLD_PROXIMITY_RESPONSE,
WORLD_PARCEL_RESPONSE,
ADD_FRIEND_REQUEST,
ADD_FRIEND_RESPONSE,
REMOVE_FRIEND,
GET_FRIENDS_LIST,
ADD_IGNORE,
REMOVE_IGNORE,
GET_IGNORE_LIST,
TEAM_MISSED_INVITE_CHECK,
TEAM_INVITE,
TEAM_INVITE_RESPONSE,
TEAM_KICK,
TEAM_LEAVE,
TEAM_SET_LOOT,
TEAM_SET_LEADER,
TEAM_GET_STATUS,
GUILD_CREATE,
GUILD_INVITE,
GUILD_INVITE_RESPONSE,
GUILD_LEAVE,
GUILD_KICK,
GUILD_GET_STATUS,
GUILD_GET_ALL,
SHOW_ALL,
BLUEPRINT_MODERATED,
BLUEPRINT_MODEL_READY,
PROPERTY_READY_FOR_APPROVAL,
PROPERTY_MODERATION_CHANGED,
PROPERTY_BUILDMODE_CHANGED,
PROPERTY_BUILDMODE_CHANGED_REPORT,
MAIL,
WORLD_INSTANCE_LOCATION_REQUEST,
REPUTATION_UPDATE,
SEND_CANNED_TEXT,
GMLEVEL_UPDATE,
CHARACTER_NAME_CHANGE_REQUEST,
CSR_REQUEST,
CSR_REPLY,
GM_KICK,
GM_ANNOUNCE,
GM_MUTE,
ACTIVITY_UPDATE,
WORLD_ROUTE_PACKET,
GET_ZONE_POPULATIONS,
REQUEST_MINIMUM_CHAT_MODE,
REQUEST_MINIMUM_CHAT_MODE_PRIVATE,
MATCH_REQUEST,
UGCMANIFEST_REPORT_MISSING_FILE,
UGCMANIFEST_REPORT_DONE_FILE,
UGCMANIFEST_REPORT_DONE_BLUEPRINT,
UGCC_REQUEST,
WHO,
WORLD_PLAYERS_PET_MODERATED_ACKNOWLEDGE,
ACHIEVEMENT_NOTIFY,
GM_CLOSE_PRIVATE_CHAT_WINDOW,
UNEXPECTED_DISCONNECT,
PLAYER_READY,
GET_DONATION_TOTAL,
UPDATE_DONATION,
PRG_CSR_COMMAND,
HEARTBEAT_REQUEST_FROM_WORLD,
UPDATE_FREE_TRIAL_STATUS,
// CUSTOM DLU MESSAGE ID FOR INTERNAL USE
CREATE_TEAM,
};
#endif //!__ECHATMESSAGETYPE__H__

View File

@ -1,76 +0,0 @@
#ifndef __ECLIENTMESSAGETYPE__H__
#define __ECLIENTMESSAGETYPE__H__
#include <cstdint>
enum class eClientMessageType : uint32_t {
LOGIN_RESPONSE = 0,
LOGOUT_RESPONSE,
LOAD_STATIC_ZONE,
CREATE_OBJECT,
CREATE_CHARACTER,
CREATE_CHARACTER_EXTENDED,
CHARACTER_LIST_RESPONSE,
CHARACTER_CREATE_RESPONSE,
CHARACTER_RENAME_RESPONSE,
CHAT_CONNECT_RESPONSE,
AUTH_ACCOUNT_CREATE_RESPONSE,
DELETE_CHARACTER_RESPONSE,
GAME_MSG,
CONNECT_CHAT,
TRANSFER_TO_WORLD,
IMPENDING_RELOAD_NOTIFY,
MAKE_GM_RESPONSE,
HTTP_MONITOR_INFO_RESPONSE,
SLASH_PUSH_MAP_RESPONSE,
SLASH_PULL_MAP_RESPONSE,
SLASH_LOCK_MAP_RESPONSE,
BLUEPRINT_SAVE_RESPONSE,
BLUEPRINT_LUP_SAVE_RESPONSE,
BLUEPRINT_LOAD_RESPONSE_ITEMID,
BLUEPRINT_GET_ALL_DATA_RESPONSE,
MODEL_INSTANTIATE_RESPONSE,
DEBUG_OUTPUT,
ADD_FRIEND_REQUEST,
ADD_FRIEND_RESPONSE,
REMOVE_FRIEND_RESPONSE,
GET_FRIENDS_LIST_RESPONSE,
UPDATE_FRIEND_NOTIFY,
ADD_IGNORE_RESPONSE,
REMOVE_IGNORE_RESPONSE,
GET_IGNORE_LIST_RESPONSE,
TEAM_INVITE,
TEAM_INVITE_INITIAL_RESPONSE,
GUILD_CREATE_RESPONSE,
GUILD_GET_STATUS_RESPONSE,
GUILD_INVITE,
GUILD_INVITE_INITIAL_RESPONSE,
GUILD_INVITE_FINAL_RESPONSE,
GUILD_INVITE_CONFIRM,
GUILD_ADD_PLAYER,
GUILD_REMOVE_PLAYER,
GUILD_LOGIN_LOGOUT,
GUILD_RANK_CHANGE,
GUILD_DATA,
GUILD_STATUS,
MAIL,
DB_PROXY_RESULT,
SHOW_ALL_RESPONSE,
WHO_RESPONSE,
SEND_CANNED_TEXT,
UPDATE_CHARACTER_NAME,
SET_NETWORK_SIMULATOR,
INVALID_CHAT_MESSAGE,
MINIMUM_CHAT_MODE_RESPONSE,
MINIMUM_CHAT_MODE_RESPONSE_PRIVATE,
CHAT_MODERATION_STRING,
UGC_MANIFEST_RESPONSE,
IN_LOGIN_QUEUE,
SERVER_STATES,
GM_CLOSE_TARGET_CHAT_WINDOW,
GENERAL_TEXT_FOR_LOCALIZATION,
UPDATE_FREE_TRIAL_STATUS,
UGC_DOWNLOAD_FAILED = 120
};
#endif //!__ECLIENTMESSAGETYPE__H__

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +0,0 @@
#ifndef __EMASTERMESSAGETYPE__H__
#define __EMASTERMESSAGETYPE__H__
#include <cstdint>
enum class eMasterMessageType : uint32_t {
REQUEST_PERSISTENT_ID = 1,
REQUEST_PERSISTENT_ID_RESPONSE,
REQUEST_ZONE_TRANSFER,
REQUEST_ZONE_TRANSFER_RESPONSE,
SERVER_INFO,
REQUEST_SESSION_KEY,
SET_SESSION_KEY,
SESSION_KEY_RESPONSE,
PLAYER_ADDED,
PLAYER_REMOVED,
CREATE_PRIVATE_ZONE,
REQUEST_PRIVATE_ZONE,
WORLD_READY,
PREP_ZONE,
SHUTDOWN,
SHUTDOWN_RESPONSE,
SHUTDOWN_IMMEDIATE,
SHUTDOWN_UNIVERSE,
AFFIRM_TRANSFER_REQUEST,
AFFIRM_TRANSFER_RESPONSE,
NEW_SESSION_ALERT
};
#endif //!__EMASTERMESSAGETYPE__H__

View File

@ -1,12 +0,0 @@
#ifndef __ESERVERMESSAGETYPE__H__
#define __ESERVERMESSAGETYPE__H__
#include <cstdint>
//! The Internal Server Packet Identifiers
enum class eServerMessageType : uint32_t {
VERSION_CONFIRM = 0,
DISCONNECT_NOTIFY,
GENERAL_NOTIFY
};
#endif //!__ESERVERMESSAGETYPE__H__

View File

@ -1,51 +0,0 @@
#ifndef __EWORLDMESSAGETYPE__H__
#define __EWORLDMESSAGETYPE__H__
#include <cstdint>
#include "magic_enum.hpp"
enum class eWorldMessageType : uint32_t {
VALIDATION = 1, // Session info
CHARACTER_LIST_REQUEST,
CHARACTER_CREATE_REQUEST,
LOGIN_REQUEST, // Character selected
GAME_MSG,
CHARACTER_DELETE_REQUEST,
CHARACTER_RENAME_REQUEST,
HAPPY_FLOWER_MODE_NOTIFY,
SLASH_RELOAD_MAP, // Reload map cmp
SLASH_PUSH_MAP_REQUEST, // Push map req cmd
SLASH_PUSH_MAP, // Push map cmd
SLASH_PULL_MAP, // Pull map cmd
LOCK_MAP_REQUEST,
GENERAL_CHAT_MESSAGE, // General chat message
HTTP_MONITOR_INFO_REQUEST,
SLASH_DEBUG_SCRIPTS, // Debug scripts cmd
MODELS_CLEAR,
EXHIBIT_INSERT_MODEL,
LEVEL_LOAD_COMPLETE, // Character data request
TMP_GUILD_CREATE,
ROUTE_PACKET, // Social?
POSITION_UPDATE,
MAIL,
WORD_CHECK, // AllowList word check
STRING_CHECK, // AllowList string check
GET_PLAYERS_IN_ZONE,
REQUEST_UGC_MANIFEST_INFO,
BLUEPRINT_GET_ALL_DATA_REQUEST,
CANCEL_MAP_QUEUE,
HANDLE_FUNNESS,
FAKE_PRG_CSR_MESSAGE,
REQUEST_FREE_TRIAL_REFRESH,
GM_SET_FREE_TRIAL_STATUS,
UI_HELP_TOP_5 = 91
};
template <>
struct magic_enum::customize::enum_range<eWorldMessageType> {
static constexpr int min = 0;
static constexpr int max = 91;
};
#endif //!__EWORLDMESSAGETYPE__H__

View File

@ -24,7 +24,7 @@
#include "eTriggerEventType.h"
#include "eObjectBits.h"
#include "PositionUpdate.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
#include "PlayerManager.h"
//Component includes:
@ -881,7 +881,7 @@ void Entity::SetGMLevel(eGameMasterLevel value) {
// Update the chat server of our GM Level
{
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::GMLEVEL_UPDATE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::GMLEVEL_UPDATE);
bitStream.Write(m_ObjectID);
bitStream.Write(m_GMLevel);

View File

@ -26,7 +26,7 @@
#include "eCharacterCreationResponse.h"
#include "eRenameResponse.h"
#include "eConnectionType.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
#include "BitStreamUtils.h"
#include "CheatDetection.h"
@ -216,7 +216,7 @@ void UserManager::RequestCharacterList(const SystemAddress& sysAddr) {
}
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::CHARACTER_LIST_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::CHARACTER_LIST_RESPONSE);
std::vector<Character*> characters = u->GetCharacters();
bitStream.Write<uint8_t>(characters.size());
@ -266,7 +266,7 @@ void UserManager::RequestCharacterList(const SystemAddress& sysAddr) {
void UserManager::CreateCharacter(const SystemAddress& sysAddr, Packet* packet) {
User* u = GetUser(sysAddr);
if (!u) return;
LUWString LUWStringName;
uint32_t firstNameIndex;
uint32_t middleNameIndex;
@ -422,7 +422,7 @@ void UserManager::DeleteCharacter(const SystemAddress& sysAddr, Packet* packet)
Database::Get()->DeleteCharacter(charID);
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::UNEXPECTED_DISCONNECT);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::UNEXPECTED_DISCONNECT);
bitStream.Write(objectID);
Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE, 0, Game::chatSysAddr, false);
@ -439,7 +439,7 @@ void UserManager::RenameCharacter(const SystemAddress& sysAddr, Packet* packet)
CINSTREAM_SKIP_HEADER;
LWOOBJID objectID;
inStream.Read(objectID);
inStream.Read(objectID);
GeneralUtils::ClearBit(objectID, eObjectBits::CHARACTER);
GeneralUtils::ClearBit(objectID, eObjectBits::PERSISTENT);

View File

@ -212,7 +212,7 @@ void BehaviorContext::UpdatePlayerSyncs(float deltaTime) {
echo.sBitStream.assign(reinterpret_cast<char*>(bitStream.GetData()), bitStream.GetNumberOfBytesUsed());
RakNet::BitStream message;
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
message.Write(this->originator);
echo.Serialize(message);
@ -285,7 +285,7 @@ bool BehaviorContext::CalculateUpdate(const float deltaTime) {
// Write message
RakNet::BitStream message;
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
message.Write(this->originator);
echo.Serialize(message);

View File

@ -1,7 +1,7 @@
#pragma once
#include "Behavior.h"
#include "eAninmationFlags.h"
#include "eAnimationFlags.h"
class ChangeIdleFlagsBehavior final : public Behavior {
public:

View File

@ -21,7 +21,7 @@
#include "eMissionTaskType.h"
#include "eMatchUpdate.h"
#include "eConnectionType.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
#include "CDCurrencyTableTable.h"
#include "CDActivityRewardsTable.h"
@ -501,7 +501,7 @@ void ActivityInstance::StartZone() {
// only make a team if we have more than one participant
if (participants.size() > 1) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::CREATE_TEAM);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::CREATE_TEAM);
bitStream.Write(leader->GetObjectID());
bitStream.Write(m_Participants.size());

View File

@ -5,7 +5,7 @@
#include "Component.h"
#include "Item.h"
#include "PossessorComponent.h"
#include "eAninmationFlags.h"
#include "eAnimationFlags.h"
#include "eReplicaComponentType.h"
/**

View File

@ -18,7 +18,7 @@
#include "BitStreamUtils.h"
#include "eObjectWorldState.h"
#include "eConnectionType.h"
#include "eMasterMessageType.h"
#include "MessageType/Master.h"
RocketLaunchpadControlComponent::RocketLaunchpadControlComponent(Entity* parent, int rocketId) : Component(parent) {
auto query = CDClientDatabase::CreatePreppedStmt(
@ -137,7 +137,7 @@ LWOCLONEID RocketLaunchpadControlComponent::GetSelectedCloneId(LWOOBJID player)
void RocketLaunchpadControlComponent::TellMasterToPrepZone(int zoneID) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::PREP_ZONE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::PREP_ZONE);
bitStream.Write(zoneID);
Game::server->SendToMaster(bitStream);
}

View File

@ -24,7 +24,7 @@
#include "CDClientManager.h"
#include "CDSkillBehaviorTable.h"
#include "eConnectionType.h"
#include "eClientMessageType.h"
#include "MessageType/Client.h"
ProjectileSyncEntry::ProjectileSyncEntry() {
}
@ -320,7 +320,7 @@ SkillExecutionResult SkillComponent::CalculateBehavior(
// Write message
RakNet::BitStream message;
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
message.Write(this->m_Parent->GetObjectID());
start.Serialize(message);
@ -451,7 +451,7 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
RakNet::BitStream message;
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
BitStreamUtils::WriteHeader(message, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
message.Write(this->m_Parent->GetObjectID());
projectileImpact.Serialize(message);

View File

@ -27,7 +27,7 @@ public:
}
void Serialize(RakNet::BitStream& stream) {
stream.Write(eGameMessageType::DO_CLIENT_PROJECTILE_IMPACT);
stream.Write(MessageType::Game::DO_CLIENT_PROJECTILE_IMPACT);
stream.Write(i64OrgID != LWOOBJID_EMPTY);
if (i64OrgID != LWOOBJID_EMPTY) stream.Write(i64OrgID);

View File

@ -4,7 +4,7 @@
#include "dCommonVars.h"
#include "NiPoint3.h"
#include "NiQuaternion.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
/* Same as start skill but with different network options. An echo down to other clients that need to play the skill. */
class EchoStartSkill {
@ -40,7 +40,7 @@ public:
}
void Serialize(RakNet::BitStream& stream) {
stream.Write(eGameMessageType::ECHO_START_SKILL);
stream.Write(MessageType::Game::ECHO_START_SKILL);
stream.Write(bUsedMouse);

View File

@ -4,7 +4,7 @@
#include <string>
#include "BitStream.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
/* Message to synchronize a skill cast */
@ -29,7 +29,7 @@ public:
}
void Serialize(RakNet::BitStream& stream) {
stream.Write(eGameMessageType::ECHO_SYNC_SKILL);
stream.Write(MessageType::Game::ECHO_SYNC_SKILL);
stream.Write(bDone);
uint32_t sBitStreamLength = sBitStream.length();

View File

@ -33,13 +33,13 @@
#include "eMissionTaskType.h"
#include "eReplicaComponentType.h"
#include "eConnectionType.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
#include "ePlayerFlag.h"
#include "dConfig.h"
#include "GhostComponent.h"
#include "StringifiedEnum.h"
void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const SystemAddress& sysAddr, LWOOBJID objectID, eGameMessageType messageID) {
void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const SystemAddress& sysAddr, LWOOBJID objectID, MessageType::Game messageID) {
CBITSTREAM;
@ -53,58 +53,58 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
return;
}
if (messageID != eGameMessageType::READY_FOR_UPDATES) LOG_DEBUG("Received GM with ID and name: %4i, %s", messageID, StringifiedEnum::ToString(messageID).data());
if (messageID != MessageType::Game::READY_FOR_UPDATES) LOG_DEBUG("Received GM with ID and name: %4i, %s", messageID, StringifiedEnum::ToString(messageID).data());
switch (messageID) {
case eGameMessageType::UN_USE_BBB_MODEL: {
case MessageType::Game::UN_USE_BBB_MODEL: {
GameMessages::HandleUnUseModel(inStream, entity, sysAddr);
break;
}
case eGameMessageType::PLAY_EMOTE: {
case MessageType::Game::PLAY_EMOTE: {
GameMessages::HandlePlayEmote(inStream, entity);
break;
}
case eGameMessageType::MOVE_ITEM_IN_INVENTORY: {
case MessageType::Game::MOVE_ITEM_IN_INVENTORY: {
GameMessages::HandleMoveItemInInventory(inStream, entity);
break;
}
case eGameMessageType::REMOVE_ITEM_FROM_INVENTORY: {
case MessageType::Game::REMOVE_ITEM_FROM_INVENTORY: {
GameMessages::HandleRemoveItemFromInventory(inStream, entity, sysAddr);
break;
}
case eGameMessageType::EQUIP_INVENTORY:
case MessageType::Game::EQUIP_INVENTORY:
GameMessages::HandleEquipItem(inStream, entity);
break;
case eGameMessageType::UN_EQUIP_INVENTORY:
case MessageType::Game::UN_EQUIP_INVENTORY:
GameMessages::HandleUnequipItem(inStream, entity);
break;
case eGameMessageType::RESPOND_TO_MISSION: {
case MessageType::Game::RESPOND_TO_MISSION: {
GameMessages::HandleRespondToMission(inStream, entity);
break;
}
case eGameMessageType::REQUEST_USE: {
case MessageType::Game::REQUEST_USE: {
GameMessages::HandleRequestUse(inStream, entity, sysAddr);
break;
}
case eGameMessageType::SET_FLAG: {
case MessageType::Game::SET_FLAG: {
GameMessages::HandleSetFlag(inStream, entity);
break;
}
case eGameMessageType::HAS_BEEN_COLLECTED: {
case MessageType::Game::HAS_BEEN_COLLECTED: {
GameMessages::HandleHasBeenCollected(inStream, entity);
break;
}
case eGameMessageType::PLAYER_LOADED: {
case MessageType::Game::PLAYER_LOADED: {
GameMessages::SendRestoreToPostLoadStats(entity, sysAddr);
entity->SetPlayerReadyForUpdates();
@ -183,82 +183,82 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
break;
}
case eGameMessageType::REQUEST_LINKED_MISSION: {
case MessageType::Game::REQUEST_LINKED_MISSION: {
GameMessages::HandleRequestLinkedMission(inStream, entity);
break;
}
case eGameMessageType::MISSION_DIALOGUE_OK: {
case MessageType::Game::MISSION_DIALOGUE_OK: {
GameMessages::HandleMissionDialogOK(inStream, entity);
break;
}
case eGameMessageType::MISSION_DIALOGUE_CANCELLED: {
case MessageType::Game::MISSION_DIALOGUE_CANCELLED: {
// This message is pointless for our implementation, as the client just carries on after
// rejecting a mission offer. We dont need to do anything. This is just here to remove a warning in our logs :)
break;
}
case eGameMessageType::REQUEST_PLATFORM_RESYNC: {
case MessageType::Game::REQUEST_PLATFORM_RESYNC: {
GameMessages::HandleRequestPlatformResync(inStream, entity, sysAddr);
break;
}
case eGameMessageType::FIRE_EVENT_SERVER_SIDE: {
case MessageType::Game::FIRE_EVENT_SERVER_SIDE: {
GameMessages::HandleFireEventServerSide(inStream, entity, sysAddr);
break;
}
case eGameMessageType::SEND_ACTIVITY_SUMMARY_LEADERBOARD_DATA: {
case MessageType::Game::SEND_ACTIVITY_SUMMARY_LEADERBOARD_DATA: {
GameMessages::HandleActivitySummaryLeaderboardData(inStream, entity, sysAddr);
break;
}
case eGameMessageType::REQUEST_ACTIVITY_SUMMARY_LEADERBOARD_DATA: {
case MessageType::Game::REQUEST_ACTIVITY_SUMMARY_LEADERBOARD_DATA: {
GameMessages::HandleRequestActivitySummaryLeaderboardData(inStream, entity, sysAddr);
break;
}
case eGameMessageType::ACTIVITY_STATE_CHANGE_REQUEST: {
case MessageType::Game::ACTIVITY_STATE_CHANGE_REQUEST: {
GameMessages::HandleActivityStateChangeRequest(inStream, entity);
break;
}
case eGameMessageType::PARSE_CHAT_MESSAGE: {
case MessageType::Game::PARSE_CHAT_MESSAGE: {
GameMessages::HandleParseChatMessage(inStream, entity, sysAddr);
break;
}
case eGameMessageType::NOTIFY_SERVER_LEVEL_PROCESSING_COMPLETE: {
case MessageType::Game::NOTIFY_SERVER_LEVEL_PROCESSING_COMPLETE: {
GameMessages::HandleNotifyServerLevelProcessingComplete(inStream, entity);
break;
}
case eGameMessageType::PICKUP_CURRENCY: {
case MessageType::Game::PICKUP_CURRENCY: {
GameMessages::HandlePickupCurrency(inStream, entity);
break;
}
case eGameMessageType::PICKUP_ITEM: {
case MessageType::Game::PICKUP_ITEM: {
GameMessages::HandlePickupItem(inStream, entity);
break;
}
case eGameMessageType::RESURRECT: {
case MessageType::Game::RESURRECT: {
GameMessages::HandleResurrect(inStream, entity);
break;
}
case eGameMessageType::REQUEST_RESURRECT: {
case MessageType::Game::REQUEST_RESURRECT: {
GameMessages::SendResurrect(entity);
break;
}
case eGameMessageType::GET_HOT_PROPERTY_DATA: {
case MessageType::Game::GET_HOT_PROPERTY_DATA: {
GameMessages::HandleGetHotPropertyData(inStream, entity, sysAddr);
break;
}
case eGameMessageType::REQUEST_SERVER_PROJECTILE_IMPACT:
case MessageType::Game::REQUEST_SERVER_PROJECTILE_IMPACT:
{
auto message = RequestServerProjectileImpact();
@ -275,7 +275,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
break;
}
case eGameMessageType::START_SKILL: {
case MessageType::Game::START_SKILL: {
StartSkill startSkill = StartSkill();
startSkill.Deserialize(inStream); // inStream replaces &bitStream
@ -311,7 +311,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
if (success) {
//Broadcast our startSkill:
RakNet::BitStream bitStreamLocal;
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
bitStreamLocal.Write(entity->GetObjectID());
EchoStartSkill echoStartSkill;
@ -331,9 +331,9 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
}
} break;
case eGameMessageType::SYNC_SKILL: {
case MessageType::Game::SYNC_SKILL: {
RakNet::BitStream bitStreamLocal;
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
bitStreamLocal.Write(entity->GetObjectID());
SyncSkill sync = SyncSkill(inStream); // inStream replaced &bitStream
@ -365,330 +365,330 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
Game::server->Send(bitStreamLocal, sysAddr, true);
} break;
case eGameMessageType::REQUEST_SMASH_PLAYER:
case MessageType::Game::REQUEST_SMASH_PLAYER:
entity->Smash(entity->GetObjectID());
break;
case eGameMessageType::MOVE_ITEM_BETWEEN_INVENTORY_TYPES:
case MessageType::Game::MOVE_ITEM_BETWEEN_INVENTORY_TYPES:
GameMessages::HandleMoveItemBetweenInventoryTypes(inStream, entity, sysAddr);
break;
case eGameMessageType::MODULAR_BUILD_FINISH:
case MessageType::Game::MODULAR_BUILD_FINISH:
GameMessages::HandleModularBuildFinish(inStream, entity, sysAddr);
break;
case eGameMessageType::PUSH_EQUIPPED_ITEMS_STATE:
case MessageType::Game::PUSH_EQUIPPED_ITEMS_STATE:
GameMessages::HandlePushEquippedItemsState(inStream, entity);
break;
case eGameMessageType::POP_EQUIPPED_ITEMS_STATE:
case MessageType::Game::POP_EQUIPPED_ITEMS_STATE:
GameMessages::HandlePopEquippedItemsState(inStream, entity);
break;
case eGameMessageType::BUY_FROM_VENDOR:
case MessageType::Game::BUY_FROM_VENDOR:
GameMessages::HandleBuyFromVendor(inStream, entity, sysAddr);
break;
case eGameMessageType::SELL_TO_VENDOR:
case MessageType::Game::SELL_TO_VENDOR:
GameMessages::HandleSellToVendor(inStream, entity, sysAddr);
break;
case eGameMessageType::BUYBACK_FROM_VENDOR:
case MessageType::Game::BUYBACK_FROM_VENDOR:
GameMessages::HandleBuybackFromVendor(inStream, entity, sysAddr);
break;
case eGameMessageType::MODULAR_BUILD_MOVE_AND_EQUIP:
case MessageType::Game::MODULAR_BUILD_MOVE_AND_EQUIP:
GameMessages::HandleModularBuildMoveAndEquip(inStream, entity, sysAddr);
break;
case eGameMessageType::DONE_ARRANGING_WITH_ITEM:
case MessageType::Game::DONE_ARRANGING_WITH_ITEM:
GameMessages::HandleDoneArrangingWithItem(inStream, entity, sysAddr);
break;
case eGameMessageType::MODULAR_BUILD_CONVERT_MODEL:
case MessageType::Game::MODULAR_BUILD_CONVERT_MODEL:
GameMessages::HandleModularBuildConvertModel(inStream, entity, sysAddr);
break;
case eGameMessageType::BUILD_MODE_SET:
case MessageType::Game::BUILD_MODE_SET:
GameMessages::HandleBuildModeSet(inStream, entity);
break;
case eGameMessageType::REBUILD_CANCEL:
case MessageType::Game::REBUILD_CANCEL:
GameMessages::HandleQuickBuildCancel(inStream, entity);
break;
case eGameMessageType::MATCH_REQUEST:
case MessageType::Game::MATCH_REQUEST:
GameMessages::HandleMatchRequest(inStream, entity);
break;
case eGameMessageType::USE_NON_EQUIPMENT_ITEM:
case MessageType::Game::USE_NON_EQUIPMENT_ITEM:
GameMessages::HandleUseNonEquipmentItem(inStream, entity);
break;
case eGameMessageType::CLIENT_ITEM_CONSUMED:
case MessageType::Game::CLIENT_ITEM_CONSUMED:
GameMessages::HandleClientItemConsumed(inStream, entity);
break;
case eGameMessageType::SET_CONSUMABLE_ITEM:
case MessageType::Game::SET_CONSUMABLE_ITEM:
GameMessages::HandleSetConsumableItem(inStream, entity, sysAddr);
break;
case eGameMessageType::VERIFY_ACK:
case MessageType::Game::VERIFY_ACK:
GameMessages::HandleVerifyAck(inStream, entity, sysAddr);
break;
// Trading
case eGameMessageType::CLIENT_TRADE_REQUEST:
case MessageType::Game::CLIENT_TRADE_REQUEST:
GameMessages::HandleClientTradeRequest(inStream, entity, sysAddr);
break;
case eGameMessageType::CLIENT_TRADE_CANCEL:
case MessageType::Game::CLIENT_TRADE_CANCEL:
GameMessages::HandleClientTradeCancel(inStream, entity, sysAddr);
break;
case eGameMessageType::CLIENT_TRADE_ACCEPT:
case MessageType::Game::CLIENT_TRADE_ACCEPT:
GameMessages::HandleClientTradeAccept(inStream, entity, sysAddr);
break;
case eGameMessageType::CLIENT_TRADE_UPDATE:
case MessageType::Game::CLIENT_TRADE_UPDATE:
GameMessages::HandleClientTradeUpdate(inStream, entity, sysAddr);
break;
// Pets
case eGameMessageType::PET_TAMING_TRY_BUILD:
case MessageType::Game::PET_TAMING_TRY_BUILD:
GameMessages::HandlePetTamingTryBuild(inStream, entity, sysAddr);
break;
case eGameMessageType::NOTIFY_TAMING_BUILD_SUCCESS:
case MessageType::Game::NOTIFY_TAMING_BUILD_SUCCESS:
GameMessages::HandleNotifyTamingBuildSuccess(inStream, entity, sysAddr);
break;
case eGameMessageType::REQUEST_SET_PET_NAME:
case MessageType::Game::REQUEST_SET_PET_NAME:
GameMessages::HandleRequestSetPetName(inStream, entity, sysAddr);
break;
case eGameMessageType::START_SERVER_PET_MINIGAME_TIMER:
case MessageType::Game::START_SERVER_PET_MINIGAME_TIMER:
GameMessages::HandleStartServerPetMinigameTimer(inStream, entity, sysAddr);
break;
case eGameMessageType::CLIENT_EXIT_TAMING_MINIGAME:
case MessageType::Game::CLIENT_EXIT_TAMING_MINIGAME:
GameMessages::HandleClientExitTamingMinigame(inStream, entity, sysAddr);
break;
case eGameMessageType::COMMAND_PET:
case MessageType::Game::COMMAND_PET:
GameMessages::HandleCommandPet(inStream, entity, sysAddr);
break;
case eGameMessageType::DESPAWN_PET:
case MessageType::Game::DESPAWN_PET:
GameMessages::HandleDespawnPet(inStream, entity, sysAddr);
break;
case eGameMessageType::MESSAGE_BOX_RESPOND:
case MessageType::Game::MESSAGE_BOX_RESPOND:
GameMessages::HandleMessageBoxResponse(inStream, entity, sysAddr);
break;
case eGameMessageType::CHOICE_BOX_RESPOND:
case MessageType::Game::CHOICE_BOX_RESPOND:
GameMessages::HandleChoiceBoxRespond(inStream, entity, sysAddr);
break;
// Property
case eGameMessageType::QUERY_PROPERTY_DATA:
case MessageType::Game::QUERY_PROPERTY_DATA:
GameMessages::HandleQueryPropertyData(inStream, entity, sysAddr);
break;
case eGameMessageType::START_BUILDING_WITH_ITEM:
case MessageType::Game::START_BUILDING_WITH_ITEM:
GameMessages::HandleStartBuildingWithItem(inStream, entity, sysAddr);
break;
case eGameMessageType::SET_BUILD_MODE:
case MessageType::Game::SET_BUILD_MODE:
GameMessages::HandleSetBuildMode(inStream, entity, sysAddr);
break;
case eGameMessageType::PROPERTY_EDITOR_BEGIN:
case MessageType::Game::PROPERTY_EDITOR_BEGIN:
GameMessages::HandlePropertyEditorBegin(inStream, entity, sysAddr);
break;
case eGameMessageType::PROPERTY_EDITOR_END:
case MessageType::Game::PROPERTY_EDITOR_END:
GameMessages::HandlePropertyEditorEnd(inStream, entity, sysAddr);
break;
case eGameMessageType::PROPERTY_CONTENTS_FROM_CLIENT:
case MessageType::Game::PROPERTY_CONTENTS_FROM_CLIENT:
GameMessages::HandlePropertyContentsFromClient(inStream, entity, sysAddr);
break;
case eGameMessageType::ZONE_PROPERTY_MODEL_EQUIPPED:
case MessageType::Game::ZONE_PROPERTY_MODEL_EQUIPPED:
GameMessages::HandlePropertyModelEquipped(inStream, entity, sysAddr);
break;
case eGameMessageType::PLACE_PROPERTY_MODEL:
case MessageType::Game::PLACE_PROPERTY_MODEL:
GameMessages::HandlePlacePropertyModel(inStream, entity, sysAddr);
break;
case eGameMessageType::UPDATE_MODEL_FROM_CLIENT:
case MessageType::Game::UPDATE_MODEL_FROM_CLIENT:
GameMessages::HandleUpdatePropertyModel(inStream, entity, sysAddr);
break;
case eGameMessageType::DELETE_MODEL_FROM_CLIENT:
case MessageType::Game::DELETE_MODEL_FROM_CLIENT:
GameMessages::HandleDeletePropertyModel(inStream, entity, sysAddr);
break;
case eGameMessageType::BBB_LOAD_ITEM_REQUEST:
case MessageType::Game::BBB_LOAD_ITEM_REQUEST:
GameMessages::HandleBBBLoadItemRequest(inStream, entity, sysAddr);
break;
case eGameMessageType::BBB_SAVE_REQUEST:
case MessageType::Game::BBB_SAVE_REQUEST:
GameMessages::HandleBBBSaveRequest(inStream, entity, sysAddr);
break;
case eGameMessageType::CONTROL_BEHAVIORS:
case MessageType::Game::CONTROL_BEHAVIORS:
GameMessages::HandleControlBehaviors(inStream, entity, sysAddr);
break;
case eGameMessageType::PROPERTY_ENTRANCE_SYNC:
case MessageType::Game::PROPERTY_ENTRANCE_SYNC:
GameMessages::HandlePropertyEntranceSync(inStream, entity, sysAddr);
break;
case eGameMessageType::ENTER_PROPERTY1:
case MessageType::Game::ENTER_PROPERTY1:
GameMessages::HandleEnterProperty(inStream, entity, sysAddr);
break;
case eGameMessageType::ZONE_PROPERTY_MODEL_ROTATED:
case MessageType::Game::ZONE_PROPERTY_MODEL_ROTATED:
Game::entityManager->GetZoneControlEntity()->OnZonePropertyModelRotated(usr->GetLastUsedChar()->GetEntity());
break;
case eGameMessageType::UPDATE_PROPERTY_OR_MODEL_FOR_FILTER_CHECK:
case MessageType::Game::UPDATE_PROPERTY_OR_MODEL_FOR_FILTER_CHECK:
GameMessages::HandleUpdatePropertyOrModelForFilterCheck(inStream, entity, sysAddr);
break;
case eGameMessageType::SET_PROPERTY_ACCESS:
case MessageType::Game::SET_PROPERTY_ACCESS:
GameMessages::HandleSetPropertyAccess(inStream, entity, sysAddr);
break;
// Racing
case eGameMessageType::MODULE_ASSEMBLY_QUERY_DATA:
case MessageType::Game::MODULE_ASSEMBLY_QUERY_DATA:
GameMessages::HandleModuleAssemblyQueryData(inStream, entity, sysAddr);
break;
case eGameMessageType::ACKNOWLEDGE_POSSESSION:
case MessageType::Game::ACKNOWLEDGE_POSSESSION:
GameMessages::HandleAcknowledgePossession(inStream, entity, sysAddr);
break;
case eGameMessageType::VEHICLE_SET_WHEEL_LOCK_STATE:
case MessageType::Game::VEHICLE_SET_WHEEL_LOCK_STATE:
GameMessages::HandleVehicleSetWheelLockState(inStream, entity, sysAddr);
break;
case eGameMessageType::MODULAR_ASSEMBLY_NIF_COMPLETED:
case MessageType::Game::MODULAR_ASSEMBLY_NIF_COMPLETED:
GameMessages::HandleModularAssemblyNIFCompleted(inStream, entity, sysAddr);
break;
case eGameMessageType::RACING_CLIENT_READY:
case MessageType::Game::RACING_CLIENT_READY:
GameMessages::HandleRacingClientReady(inStream, entity, sysAddr);
break;
case eGameMessageType::REQUEST_DIE:
case MessageType::Game::REQUEST_DIE:
GameMessages::HandleRequestDie(inStream, entity, sysAddr);
break;
case eGameMessageType::NOTIFY_SERVER_VEHICLE_ADD_PASSIVE_BOOST_ACTION:
case MessageType::Game::NOTIFY_SERVER_VEHICLE_ADD_PASSIVE_BOOST_ACTION:
GameMessages::HandleVehicleNotifyServerAddPassiveBoostAction(inStream, entity, sysAddr);
break;
case eGameMessageType::NOTIFY_SERVER_VEHICLE_REMOVE_PASSIVE_BOOST_ACTION:
case MessageType::Game::NOTIFY_SERVER_VEHICLE_REMOVE_PASSIVE_BOOST_ACTION:
GameMessages::HandleVehicleNotifyServerRemovePassiveBoostAction(inStream, entity, sysAddr);
break;
case eGameMessageType::RACING_PLAYER_INFO_RESET_FINISHED:
case MessageType::Game::RACING_PLAYER_INFO_RESET_FINISHED:
GameMessages::HandleRacingPlayerInfoResetFinished(inStream, entity, sysAddr);
break;
case eGameMessageType::VEHICLE_NOTIFY_HIT_IMAGINATION_SERVER:
case MessageType::Game::VEHICLE_NOTIFY_HIT_IMAGINATION_SERVER:
GameMessages::HandleVehicleNotifyHitImaginationServer(inStream, entity, sysAddr);
break;
case eGameMessageType::UPDATE_PROPERTY_PERFORMANCE_COST:
case MessageType::Game::UPDATE_PROPERTY_PERFORMANCE_COST:
GameMessages::HandleUpdatePropertyPerformanceCost(inStream, entity, sysAddr);
break;
// SG
case eGameMessageType::UPDATE_SHOOTING_GALLERY_ROTATION:
case MessageType::Game::UPDATE_SHOOTING_GALLERY_ROTATION:
GameMessages::HandleUpdateShootingGalleryRotation(inStream, entity, sysAddr);
break;
// NT
case eGameMessageType::REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES:
case MessageType::Game::REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES:
GameMessages::HandleRequestMoveItemBetweenInventoryTypes(inStream, entity, sysAddr);
break;
case eGameMessageType::TOGGLE_GHOST_REFERENCE_OVERRIDE:
case MessageType::Game::TOGGLE_GHOST_REFERENCE_OVERRIDE:
GameMessages::HandleToggleGhostReferenceOverride(inStream, entity, sysAddr);
break;
case eGameMessageType::SET_GHOST_REFERENCE_POSITION:
case MessageType::Game::SET_GHOST_REFERENCE_POSITION:
GameMessages::HandleSetGhostReferencePosition(inStream, entity, sysAddr);
break;
case eGameMessageType::READY_FOR_UPDATES:
case MessageType::Game::READY_FOR_UPDATES:
//We don't really care about this message, as it's simply here to inform us that the client is done loading an object.
//In the event we _do_ send an update to an object that hasn't finished loading, the client will handle it anyway.
break;
case eGameMessageType::REPORT_BUG:
case MessageType::Game::REPORT_BUG:
GameMessages::HandleReportBug(inStream, entity);
break;
case eGameMessageType::CLIENT_RAIL_MOVEMENT_READY:
case MessageType::Game::CLIENT_RAIL_MOVEMENT_READY:
GameMessages::HandleClientRailMovementReady(inStream, entity, sysAddr);
break;
case eGameMessageType::CANCEL_RAIL_MOVEMENT:
case MessageType::Game::CANCEL_RAIL_MOVEMENT:
GameMessages::HandleCancelRailMovement(inStream, entity, sysAddr);
break;
case eGameMessageType::PLAYER_RAIL_ARRIVED_NOTIFICATION:
case MessageType::Game::PLAYER_RAIL_ARRIVED_NOTIFICATION:
GameMessages::HandlePlayerRailArrivedNotification(inStream, entity, sysAddr);
break;
case eGameMessageType::CINEMATIC_UPDATE:
case MessageType::Game::CINEMATIC_UPDATE:
GameMessages::HandleCinematicUpdate(inStream, entity, sysAddr);
break;
case eGameMessageType::MODIFY_PLAYER_ZONE_STATISTIC:
case MessageType::Game::MODIFY_PLAYER_ZONE_STATISTIC:
GameMessages::HandleModifyPlayerZoneStatistic(inStream, entity);
break;
case eGameMessageType::UPDATE_PLAYER_STATISTIC:
case MessageType::Game::UPDATE_PLAYER_STATISTIC:
GameMessages::HandleUpdatePlayerStatistic(inStream, entity);
break;
case eGameMessageType::DISMOUNT_COMPLETE:
case MessageType::Game::DISMOUNT_COMPLETE:
GameMessages::HandleDismountComplete(inStream, entity, sysAddr);
break;
case eGameMessageType::DECTIVATE_BUBBLE_BUFF:
case MessageType::Game::DECTIVATE_BUBBLE_BUFF:
GameMessages::HandleDeactivateBubbleBuff(inStream, entity);
break;
case eGameMessageType::ACTIVATE_BUBBLE_BUFF:
case MessageType::Game::ACTIVATE_BUBBLE_BUFF:
GameMessages::HandleActivateBubbleBuff(inStream, entity);
break;
case eGameMessageType::ZONE_SUMMARY_DISMISSED:
case MessageType::Game::ZONE_SUMMARY_DISMISSED:
GameMessages::HandleZoneSummaryDismissed(inStream, entity);
break;
case eGameMessageType::REQUEST_ACTIVITY_EXIT:
case MessageType::Game::REQUEST_ACTIVITY_EXIT:
GameMessages::HandleRequestActivityExit(inStream, entity);
break;
case eGameMessageType::ADD_DONATION_ITEM:
case MessageType::Game::ADD_DONATION_ITEM:
GameMessages::HandleAddDonationItem(inStream, entity, sysAddr);
break;
case eGameMessageType::REMOVE_DONATION_ITEM:
case MessageType::Game::REMOVE_DONATION_ITEM:
GameMessages::HandleRemoveDonationItem(inStream, entity, sysAddr);
break;
case eGameMessageType::CONFIRM_DONATION_ON_PLAYER:
case MessageType::Game::CONFIRM_DONATION_ON_PLAYER:
GameMessages::HandleConfirmDonationOnPlayer(inStream, entity);
break;
case eGameMessageType::CANCEL_DONATION_ON_PLAYER:
case MessageType::Game::CANCEL_DONATION_ON_PLAYER:
GameMessages::HandleCancelDonationOnPlayer(inStream, entity);
break;
case eGameMessageType::REQUEST_VENDOR_STATUS_UPDATE:
case MessageType::Game::REQUEST_VENDOR_STATUS_UPDATE:
GameMessages::SendVendorStatusUpdate(entity, sysAddr, true);
break;
case eGameMessageType::UPDATE_INVENTORY_GROUP:
case MessageType::Game::UPDATE_INVENTORY_GROUP:
GameMessages::HandleUpdateInventoryGroup(inStream, entity, sysAddr);
break;
case eGameMessageType::UPDATE_INVENTORY_GROUP_CONTENTS:
case MessageType::Game::UPDATE_INVENTORY_GROUP_CONTENTS:
GameMessages::HandleUpdateInventoryGroupContents(inStream, entity, sysAddr);
break;

View File

@ -19,10 +19,10 @@
#include "Logger.h"
#include "GameMessages.h"
#include "CDClientDatabase.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
namespace GameMessageHandler {
void HandleMessage(RakNet::BitStream& inStream, const SystemAddress& sysAddr, LWOOBJID objectID, eGameMessageType messageID);
void HandleMessage(RakNet::BitStream& inStream, const SystemAddress& sysAddr, LWOOBJID objectID, MessageType::Game messageID);
};
#endif // GAMEMESSAGEHANDLER_H

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
#define __REQUESTSERVERPROJECTILEIMPACT__H__
#include "dCommonVars.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
/* Notifying the server that a locally owned projectile impacted. Sent to the caster of the projectile
should always be the local char. */
@ -27,7 +27,7 @@ public:
}
void Serialize(RakNet::BitStream& stream) {
stream.Write(eGameMessageType::REQUEST_SERVER_PROJECTILE_IMPACT);
stream.Write(MessageType::Game::REQUEST_SERVER_PROJECTILE_IMPACT);
stream.Write(i64LocalID != LWOOBJID_EMPTY);
if (i64LocalID != LWOOBJID_EMPTY) stream.Write(i64LocalID);

View File

@ -4,7 +4,7 @@
#include "dCommonVars.h"
#include "NiPoint3.h"
#include "NiQuaternion.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
/**
* Same as sync skill but with different network options. An echo down to other clients that need to play the skill.
@ -44,7 +44,7 @@ public:
}
void Serialize(RakNet::BitStream& stream) {
stream.Write(eGameMessageType::START_SKILL);
stream.Write(MessageType::Game::START_SKILL);
stream.Write(bUsedMouse);

View File

@ -5,7 +5,7 @@
#include <string>
#include "BitStream.h"
#include "eGameMessageType.h"
#include "MessageType/Game.h"
/* Message to synchronize a skill cast */
class SyncSkill {
@ -29,7 +29,7 @@ public:
}
void Serialize(RakNet::BitStream& stream) {
stream.Write(eGameMessageType::SYNC_SKILL);
stream.Write(MessageType::Game::SYNC_SKILL);
stream.Write(bDone);
uint32_t sBitStreamLength = sBitStream.length();

View File

@ -152,7 +152,7 @@ void Mail::HandleSendMail(RakNet::BitStream& packet, const SystemAddress& sysAdd
LUWString bodyRead(400);
packet.Read(bodyRead);
LUWString recipientRead(32);
packet.Read(recipientRead);
@ -245,7 +245,7 @@ void Mail::HandleDataRequest(RakNet::BitStream& packet, const SystemAddress& sys
auto playerMail = Database::Get()->GetMailForPlayer(player->GetCharacter()->GetID(), 20);
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAIL);
bitStream.Write(int(MailMessageID::MailData));
bitStream.Write(int(0)); // throttled
@ -348,7 +348,7 @@ void Mail::HandleNotificationRequest(const SystemAddress& sysAddr, uint32_t obje
void Mail::SendSendResponse(const SystemAddress& sysAddr, MailSendResponse response) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAIL);
bitStream.Write(int(MailMessageID::SendResponse));
bitStream.Write(int(response));
Game::server->Send(bitStream, sysAddr, false);
@ -356,7 +356,7 @@ void Mail::SendSendResponse(const SystemAddress& sysAddr, MailSendResponse respo
void Mail::SendNotification(const SystemAddress& sysAddr, int mailCount) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAIL);
uint64_t messageType = 2;
uint64_t s1 = 0;
uint64_t s2 = 0;
@ -375,7 +375,7 @@ void Mail::SendNotification(const SystemAddress& sysAddr, int mailCount) {
void Mail::SendAttachmentRemoveConfirm(const SystemAddress& sysAddr, uint64_t mailID) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAIL);
bitStream.Write(int(MailMessageID::AttachmentCollectConfirm));
bitStream.Write(int(0)); //unknown
bitStream.Write(mailID);
@ -384,7 +384,7 @@ void Mail::SendAttachmentRemoveConfirm(const SystemAddress& sysAddr, uint64_t ma
void Mail::SendDeleteConfirm(const SystemAddress& sysAddr, uint64_t mailID, LWOOBJID playerID) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAIL);
bitStream.Write(int(MailMessageID::MailDeleteConfirm));
bitStream.Write(int(0)); //unknown
bitStream.Write(mailID);
@ -395,7 +395,7 @@ void Mail::SendDeleteConfirm(const SystemAddress& sysAddr, uint64_t mailID, LWOO
void Mail::SendReadConfirm(const SystemAddress& sysAddr, uint64_t mailID) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAIL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAIL);
bitStream.Write(int(MailMessageID::MailReadConfirm));
bitStream.Write(int(0)); //unknown
bitStream.Write(mailID);

View File

@ -16,7 +16,7 @@
#include "Amf3.h"
#include "Database.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
#include "dServer.h"
namespace {
@ -153,7 +153,7 @@ void SlashCommandHandler::SendAnnouncement(const std::string& title, const std::
//Notify chat about it
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::GM_ANNOUNCE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::GM_ANNOUNCE);
bitStream.Write<uint32_t>(title.size());
for (auto character : title) {

View File

@ -45,7 +45,7 @@
// Enums
#include "eGameMasterLevel.h"
#include "eMasterMessageType.h"
#include "MessageType/Master.h"
#include "eInventoryType.h"
#include "ePlayerFlag.h"
@ -503,7 +503,7 @@ namespace DEVGMCommands {
void ShutdownUniverse(Entity* entity, const SystemAddress& sysAddr, const std::string args) {
//Tell the master server that we're going to be shutting down whole "universe":
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SHUTDOWN_UNIVERSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SHUTDOWN_UNIVERSE);
Game::server->SendToMaster(bitStream);
ChatPackets::SendSystemMessage(sysAddr, u"Sent universe shutdown notification to master.");

View File

@ -15,7 +15,7 @@
#include "PropertyManagementComponent.h"
// Enums
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
#include "eServerDisconnectIdentifiers.h"
#include "eObjectBits.h"
@ -197,7 +197,7 @@ namespace GMGreaterThanZeroCommands {
//Notify chat about it
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::GM_MUTE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::GM_MUTE);
bitStream.Write(characterId);
bitStream.Write(expire);
@ -292,7 +292,7 @@ namespace GMGreaterThanZeroCommands {
bool displayZoneData = true;
bool displayIndividualPlayers = true;
const auto splitArgs = GeneralUtils::SplitString(args, ' ');
if (!splitArgs.empty() && !splitArgs.at(0).empty()) displayZoneData = splitArgs.at(0) == "1";
if (splitArgs.size() > 1) displayIndividualPlayers = splitArgs.at(1) == "1";

View File

@ -10,7 +10,7 @@
#include "MasterPackets.h"
#include "BitStreamUtils.h"
#include "eConnectionType.h"
#include "eMasterMessageType.h"
#include "MessageType/Master.h"
#include "Start.h"
@ -177,7 +177,7 @@ void InstanceManager::RequestAffirmation(Instance* instance, const PendingInstan
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::AFFIRM_TRANSFER_REQUEST);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::AFFIRM_TRANSFER_REQUEST);
bitStream.Write(request.id);
@ -359,7 +359,7 @@ bool Instance::GetShutdownComplete() const {
void Instance::Shutdown() {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SHUTDOWN);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SHUTDOWN);
Game::server->Send(bitStream, this->m_SysAddr, false);

View File

@ -24,7 +24,7 @@
#include "AssetManager.h"
#include "BinaryPathFinder.h"
#include "eConnectionType.h"
#include "eMasterMessageType.h"
#include "MessageType/Master.h"
//RakNet includes:
#include "RakNetDefines.h"
@ -473,8 +473,8 @@ void HandlePacket(Packet* packet) {
if (packet->length < 4) return;
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::MASTER) {
switch (static_cast<eMasterMessageType>(packet->data[3])) {
case eMasterMessageType::REQUEST_PERSISTENT_ID: {
switch (static_cast<MessageType::Master>(packet->data[3])) {
case MessageType::Master::REQUEST_PERSISTENT_ID: {
LOG("A persistent ID req");
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -486,7 +486,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::REQUEST_ZONE_TRANSFER: {
case MessageType::Master::REQUEST_ZONE_TRANSFER: {
LOG("Received zone transfer req");
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -522,7 +522,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::SERVER_INFO: {
case MessageType::Master::SERVER_INFO: {
//MasterPackets::HandleServerInfo(packet);
//This is here because otherwise we'd have to include IM in
@ -583,7 +583,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::SET_SESSION_KEY: {
case MessageType::Master::SET_SESSION_KEY: {
CINSTREAM_SKIP_HEADER;
uint32_t sessionKey = 0;
inStream.Read(sessionKey);
@ -595,7 +595,7 @@ void HandlePacket(Packet* packet) {
activeSessions.erase(it.first);
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::NEW_SESSION_ALERT);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::NEW_SESSION_ALERT);
bitStream.Write(sessionKey);
bitStream.Write(username);
SEND_PACKET_BROADCAST;
@ -609,7 +609,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::REQUEST_SESSION_KEY: {
case MessageType::Master::REQUEST_SESSION_KEY: {
CINSTREAM_SKIP_HEADER;
LUWString username;
inStream.Read(username);
@ -617,7 +617,7 @@ void HandlePacket(Packet* packet) {
for (auto key : activeSessions) {
if (key.second == username.GetAsString()) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SESSION_KEY_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SESSION_KEY_RESPONSE);
bitStream.Write(key.first);
bitStream.Write(username);
Game::server->Send(bitStream, packet->systemAddress, false);
@ -627,7 +627,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::PLAYER_ADDED: {
case MessageType::Master::PLAYER_ADDED: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -647,7 +647,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::PLAYER_REMOVED: {
case MessageType::Master::PLAYER_REMOVED: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -665,7 +665,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::CREATE_PRIVATE_ZONE: {
case MessageType::Master::CREATE_PRIVATE_ZONE: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -689,7 +689,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::REQUEST_PRIVATE_ZONE: {
case MessageType::Master::REQUEST_PRIVATE_ZONE: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -724,7 +724,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::WORLD_READY: {
case MessageType::Master::WORLD_READY: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -748,7 +748,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::PREP_ZONE: {
case MessageType::Master::PREP_ZONE: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -764,7 +764,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::AFFIRM_TRANSFER_RESPONSE: {
case MessageType::Master::AFFIRM_TRANSFER_RESPONSE: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -784,7 +784,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::SHUTDOWN_RESPONSE: {
case MessageType::Master::SHUTDOWN_RESPONSE: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -799,7 +799,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eMasterMessageType::SHUTDOWN_UNIVERSE: {
case MessageType::Master::SHUTDOWN_UNIVERSE: {
LOG("Received shutdown universe command, shutting down in 10 minutes.");
Game::universeShutdownRequested = true;
break;
@ -829,7 +829,7 @@ int ShutdownSequence(int32_t signal) {
{
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SHUTDOWN);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SHUTDOWN);
Game::server->Send(bitStream, UNASSIGNED_SYSTEM_ADDRESS, true);
LOG("Triggered master shutdown");
}

View File

@ -20,8 +20,8 @@
#include "eServerDisconnectIdentifiers.h"
#include "eLoginResponse.h"
#include "eConnectionType.h"
#include "eServerMessageType.h"
#include "eMasterMessageType.h"
#include "MessageType/Server.h"
#include "MessageType/Master.h"
#include "eGameMasterLevel.h"
#include "StringifiedEnum.h"
namespace {
@ -63,7 +63,7 @@ void AuthPackets::HandleHandshake(dServer* server, Packet* packet) {
if (port != packet->systemAddress.port) LOG("WARNING: Port written in packet does not match the port the client is connecting over!");
inStream.IgnoreBytes(33);
LOG_DEBUG("Client Data [Version: %i, Service: %s, Process: %u, Port: %u, Sysaddr Port: %u]", clientVersion, StringifiedEnum::ToString(serviceId).data(), processID, port, packet->systemAddress.port);
SendHandshake(server, packet->systemAddress, server->GetIP(), server->GetPort(), server->GetServerType());
@ -71,8 +71,8 @@ void AuthPackets::HandleHandshake(dServer* server, Packet* packet) {
void AuthPackets::SendHandshake(dServer* server, const SystemAddress& sysAddr, const std::string& nextServerIP, uint16_t nextServerPort, const ServerType serverType) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::SERVER, eServerMessageType::VERSION_CONFIRM);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::SERVER, MessageType::Server::VERSION_CONFIRM);
const auto clientNetVersionString = Game::config->GetValue("client_net_version");
const uint32_t clientNetVersion = GeneralUtils::TryParse<uint32_t>(clientNetVersionString).value_or(171022);
@ -227,7 +227,7 @@ void AuthPackets::HandleLoginRequest(dServer* server, Packet* packet) {
void AuthPackets::SendLoginResponse(dServer* server, const SystemAddress& sysAddr, eLoginResponse responseCode, const std::string& errorMsg, const std::string& wServerIP, uint16_t wServerPort, std::string username, std::vector<Stamp>& stamps) {
stamps.emplace_back(eStamps::PASSPORT_AUTH_IM_LOGIN_START, 1);
RakNet::BitStream loginResponse;
BitStreamUtils::WriteHeader(loginResponse, eConnectionType::CLIENT, eClientMessageType::LOGIN_RESPONSE);
BitStreamUtils::WriteHeader(loginResponse, eConnectionType::CLIENT, MessageType::Client::LOGIN_RESPONSE);
loginResponse.Write(responseCode);
@ -297,7 +297,7 @@ void AuthPackets::SendLoginResponse(dServer* server, const SystemAddress& sysAdd
//Inform the master server that we've created a session for this user:
if (responseCode == eLoginResponse::SUCCESS) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SET_SESSION_KEY);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SET_SESSION_KEY);
bitStream.Write(sessionKey);
bitStream.Write(LUString(username));
server->SendToMaster(bitStream);

View File

@ -10,10 +10,10 @@
#include "BitStreamUtils.h"
#include "dServer.h"
#include "eConnectionType.h"
#include "eChatMessageType.h"
#include "MessageType/Chat.h"
void ShowAllRequest::Serialize(RakNet::BitStream& bitStream) {
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::SHOW_ALL);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::SHOW_ALL);
bitStream.Write(this->requestor);
bitStream.Write(this->displayZoneData);
bitStream.Write(this->displayIndividualPlayers);
@ -26,7 +26,7 @@ void ShowAllRequest::Deserialize(RakNet::BitStream& inStream) {
}
void FindPlayerRequest::Serialize(RakNet::BitStream& bitStream) {
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::WHO);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::WHO);
bitStream.Write(this->requestor);
bitStream.Write(this->playerName);
}
@ -38,7 +38,7 @@ void FindPlayerRequest::Deserialize(RakNet::BitStream& inStream) {
void ChatPackets::SendChatMessage(const SystemAddress& sysAddr, char chatChannel, const std::string& senderName, LWOOBJID playerObjectID, bool senderMythran, const std::u16string& message) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::GENERAL_CHAT_MESSAGE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::GENERAL_CHAT_MESSAGE);
bitStream.Write<uint64_t>(0);
bitStream.Write(chatChannel);
@ -60,7 +60,7 @@ void ChatPackets::SendChatMessage(const SystemAddress& sysAddr, char chatChannel
void ChatPackets::SendSystemMessage(const SystemAddress& sysAddr, const std::u16string& message, const bool broadcast) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::GENERAL_CHAT_MESSAGE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::GENERAL_CHAT_MESSAGE);
bitStream.Write<uint64_t>(0);
bitStream.Write<char>(4);
@ -92,7 +92,7 @@ void ChatPackets::SendMessageFail(const SystemAddress& sysAddr) {
//0x01 - "Upgrade to a full LEGO Universe Membership to chat with other players."
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::SEND_CANNED_TEXT);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::SEND_CANNED_TEXT);
bitStream.Write<uint8_t>(0); //response type, options above ^
//docs say there's a wstring here-- no idea what it's for, or if it's even needed so leaving it as is for now.
SEND_PACKET;

View File

@ -3,21 +3,21 @@
#include "dCommonVars.h"
#include "dServer.h"
#include "eConnectionType.h"
#include "eMasterMessageType.h"
#include "MessageType/Master.h"
#include "BitStreamUtils.h"
#include <string>
void MasterPackets::SendPersistentIDRequest(dServer* server, uint64_t requestID) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::REQUEST_PERSISTENT_ID);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::REQUEST_PERSISTENT_ID);
bitStream.Write(requestID);
server->SendToMaster(bitStream);
}
void MasterPackets::SendPersistentIDResponse(dServer* server, const SystemAddress& sysAddr, uint64_t requestID, uint32_t objID) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::REQUEST_PERSISTENT_ID_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::REQUEST_PERSISTENT_ID_RESPONSE);
bitStream.Write(requestID);
bitStream.Write(objID);
@ -27,7 +27,7 @@ void MasterPackets::SendPersistentIDResponse(dServer* server, const SystemAddres
void MasterPackets::SendZoneTransferRequest(dServer* server, uint64_t requestID, bool mythranShift, uint32_t zoneID, uint32_t cloneID) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::REQUEST_ZONE_TRANSFER);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::REQUEST_ZONE_TRANSFER);
bitStream.Write(requestID);
bitStream.Write<uint8_t>(mythranShift);
@ -39,7 +39,7 @@ void MasterPackets::SendZoneTransferRequest(dServer* server, uint64_t requestID,
void MasterPackets::SendZoneCreatePrivate(dServer* server, uint32_t zoneID, uint32_t cloneID, const std::string& password) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::CREATE_PRIVATE_ZONE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::CREATE_PRIVATE_ZONE);
bitStream.Write(zoneID);
bitStream.Write(cloneID);
@ -54,7 +54,7 @@ void MasterPackets::SendZoneCreatePrivate(dServer* server, uint32_t zoneID, uint
void MasterPackets::SendZoneRequestPrivate(dServer* server, uint64_t requestID, bool mythranShift, const std::string& password) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::REQUEST_PRIVATE_ZONE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::REQUEST_PRIVATE_ZONE);
bitStream.Write(requestID);
bitStream.Write<uint8_t>(mythranShift);
@ -69,7 +69,7 @@ void MasterPackets::SendZoneRequestPrivate(dServer* server, uint64_t requestID,
void MasterPackets::SendWorldReady(dServer* server, LWOMAPID zoneId, LWOINSTANCEID instanceId) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::WORLD_READY);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::WORLD_READY);
bitStream.Write(zoneId);
bitStream.Write(instanceId);
@ -79,7 +79,7 @@ void MasterPackets::SendWorldReady(dServer* server, LWOMAPID zoneId, LWOINSTANCE
void MasterPackets::SendZoneTransferResponse(dServer* server, const SystemAddress& sysAddr, uint64_t requestID, bool mythranShift, uint32_t zoneID, uint32_t zoneInstance, uint32_t zoneClone, const std::string& serverIP, uint32_t serverPort) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::REQUEST_ZONE_TRANSFER_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::REQUEST_ZONE_TRANSFER_RESPONSE);
bitStream.Write(requestID);
bitStream.Write<uint8_t>(mythranShift);
@ -111,7 +111,7 @@ void MasterPackets::HandleServerInfo(Packet* packet) {
void MasterPackets::SendServerInfo(dServer* server, Packet* packet) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SERVER_INFO);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SERVER_INFO);
bitStream.Write(server->GetPort());
bitStream.Write(server->GetZoneID());

View File

@ -23,7 +23,7 @@ void HTTPMonitorInfo::Serialize(RakNet::BitStream &bitStream) const {
void WorldPackets::SendLoadStaticZone(const SystemAddress& sysAddr, float x, float y, float z, uint32_t checksum, LWOZONEID zone) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::LOAD_STATIC_ZONE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::LOAD_STATIC_ZONE);
bitStream.Write<uint16_t>(zone.GetMapID());
bitStream.Write<uint16_t>(zone.GetInstanceID());
@ -44,28 +44,28 @@ void WorldPackets::SendLoadStaticZone(const SystemAddress& sysAddr, float x, flo
void WorldPackets::SendCharacterCreationResponse(const SystemAddress& sysAddr, eCharacterCreationResponse response) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::CHARACTER_CREATE_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::CHARACTER_CREATE_RESPONSE);
bitStream.Write(response);
SEND_PACKET;
}
void WorldPackets::SendCharacterRenameResponse(const SystemAddress& sysAddr, eRenameResponse response) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::CHARACTER_RENAME_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::CHARACTER_RENAME_RESPONSE);
bitStream.Write(response);
SEND_PACKET;
}
void WorldPackets::SendCharacterDeleteResponse(const SystemAddress& sysAddr, bool response) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::DELETE_CHARACTER_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::DELETE_CHARACTER_RESPONSE);
bitStream.Write<uint8_t>(response);
SEND_PACKET;
}
void WorldPackets::SendTransferToWorld(const SystemAddress& sysAddr, const std::string& serverIP, uint32_t serverPort, bool mythranShift) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::TRANSFER_TO_WORLD);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::TRANSFER_TO_WORLD);
bitStream.Write(LUString(serverIP));
bitStream.Write<uint16_t>(serverPort);
@ -76,14 +76,14 @@ void WorldPackets::SendTransferToWorld(const SystemAddress& sysAddr, const std::
void WorldPackets::SendServerState(const SystemAddress& sysAddr) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::SERVER_STATES);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::SERVER_STATES);
bitStream.Write<uint8_t>(1); //If the server is receiving this request, it probably is ready anyway.
SEND_PACKET;
}
void WorldPackets::SendCreateCharacter(const SystemAddress& sysAddr, int64_t reputation, LWOOBJID player, const std::string& xmlData, const std::u16string& username, eGameMasterLevel gm) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::CREATE_CHARACTER);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::CREATE_CHARACTER);
RakNet::BitStream data;
data.Write<uint32_t>(7); //LDF key count
@ -136,7 +136,7 @@ void WorldPackets::SendCreateCharacter(const SystemAddress& sysAddr, int64_t rep
void WorldPackets::SendChatModerationResponse(const SystemAddress& sysAddr, bool requestAccepted, uint32_t requestID, const std::string& receiver, std::vector<std::pair<uint8_t, uint8_t>> unacceptedItems) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::CHAT_MODERATION_STRING);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::CHAT_MODERATION_STRING);
bitStream.Write<uint8_t>(unacceptedItems.empty()); // Is sentence ok?
bitStream.Write<uint16_t>(0x16); // Source ID, unknown
@ -160,7 +160,7 @@ void WorldPackets::SendChatModerationResponse(const SystemAddress& sysAddr, bool
void WorldPackets::SendGMLevelChange(const SystemAddress& sysAddr, bool success, eGameMasterLevel highestLevel, eGameMasterLevel prevLevel, eGameMasterLevel newLevel) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::MAKE_GM_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::MAKE_GM_RESPONSE);
bitStream.Write<uint8_t>(success);
bitStream.Write(static_cast<uint16_t>(highestLevel));
@ -172,14 +172,14 @@ void WorldPackets::SendGMLevelChange(const SystemAddress& sysAddr, bool success,
void WorldPackets::SendHTTPMonitorInfo(const SystemAddress& sysAddr, const HTTPMonitorInfo& info) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::HTTP_MONITOR_INFO_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::HTTP_MONITOR_INFO_RESPONSE);
info.Serialize(bitStream);
SEND_PACKET;
}
void WorldPackets::SendDebugOuput(const SystemAddress& sysAddr, const std::string& data){
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::DEBUG_OUTPUT);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::DEBUG_OUTPUT);
bitStream.Write<uint32_t>(data.size());
bitStream.Write(data);
SEND_PACKET;

View File

@ -7,8 +7,8 @@
#include "RakNetworkFactory.h"
#include "MessageIdentifiers.h"
#include "eConnectionType.h"
#include "eServerMessageType.h"
#include "eMasterMessageType.h"
#include "MessageType/Server.h"
#include "MessageType/Master.h"
#include "BitStreamUtils.h"
#include "MasterPackets.h"
@ -124,12 +124,12 @@ Packet* dServer::ReceiveFromMaster() {
if (packet->data[0] == ID_USER_PACKET_ENUM) {
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::MASTER) {
switch (static_cast<eMasterMessageType>(packet->data[3])) {
case eMasterMessageType::REQUEST_ZONE_TRANSFER_RESPONSE: {
switch (static_cast<MessageType::Master>(packet->data[3])) {
case MessageType::Master::REQUEST_ZONE_TRANSFER_RESPONSE: {
ZoneInstanceManager::Instance()->HandleRequestZoneTransferResponse(packet);
break;
}
case eMasterMessageType::SHUTDOWN:
case MessageType::Master::SHUTDOWN:
*mShouldShutdown = -2;
break;
@ -170,7 +170,7 @@ void dServer::SendToMaster(RakNet::BitStream& bitStream) {
void dServer::Disconnect(const SystemAddress& sysAddr, eServerDisconnectIdentifiers disconNotifyID) {
RakNet::BitStream bitStream;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::SERVER, eServerMessageType::DISCONNECT_NOTIFY);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::SERVER, MessageType::Server::DISCONNECT_NOTIFY);
bitStream.Write(disconNotifyID);
mPeer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE_ORDERED, 0, sysAddr, false);

View File

@ -6,7 +6,7 @@
#include "SkillComponent.h"
#include "BaseCombatAIComponent.h"
#include "EntityInfo.h"
#include "eAninmationFlags.h"
#include "eAnimationFlags.h"
#include "RenderComponent.h"
void AmDarklingDragon::OnStartup(Entity* self) {

View File

@ -3,7 +3,7 @@
#include "SkillComponent.h"
#include "BaseCombatAIComponent.h"
#include "DestroyableComponent.h"
#include "eAninmationFlags.h"
#include "eAnimationFlags.h"
#include "EntityInfo.h"
#include "RenderComponent.h"

View File

@ -5,7 +5,7 @@
#include "EntityManager.h"
#include "EntityInfo.h"
#include "SkillComponent.h"
#include "eAninmationFlags.h"
#include "eAnimationFlags.h"
#include "RenderComponent.h"
#include "eStateChangeType.h"

View File

@ -65,11 +65,11 @@
#include "eServerDisconnectIdentifiers.h"
#include "eObjectBits.h"
#include "eConnectionType.h"
#include "eServerMessageType.h"
#include "eChatMessageType.h"
#include "eWorldMessageType.h"
#include "eMasterMessageType.h"
#include "eGameMessageType.h"
#include "MessageType/Server.h"
#include "MessageType/Chat.h"
#include "MessageType/World.h"
#include "MessageType/Master.h"
#include "MessageType/Game.h"
#include "ZCompression.h"
#include "EntityManager.h"
#include "CheatDetection.h"
@ -547,8 +547,8 @@ void HandlePacketChat(Packet* packet) {
if (packet->data[0] == ID_USER_PACKET_ENUM && packet->length >= 4) {
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::CHAT) {
switch (static_cast<eChatMessageType>(packet->data[3])) {
case eChatMessageType::WORLD_ROUTE_PACKET: {
switch (static_cast<MessageType::Chat>(packet->data[3])) {
case MessageType::Chat::WORLD_ROUTE_PACKET: {
CINSTREAM_SKIP_HEADER;
LWOOBJID playerID;
inStream.Read(playerID);
@ -569,7 +569,7 @@ void HandlePacketChat(Packet* packet) {
break;
}
case eChatMessageType::GM_ANNOUNCE: {
case MessageType::Chat::GM_ANNOUNCE: {
CINSTREAM_SKIP_HEADER;
std::string title;
@ -602,7 +602,7 @@ void HandlePacketChat(Packet* packet) {
break;
}
case eChatMessageType::GM_MUTE: {
case MessageType::Chat::GM_MUTE: {
CINSTREAM_SKIP_HEADER;
LWOOBJID playerId;
time_t expire = 0;
@ -621,7 +621,7 @@ void HandlePacketChat(Packet* packet) {
break;
}
case eChatMessageType::TEAM_GET_STATUS: {
case MessageType::Chat::TEAM_GET_STATUS: {
CINSTREAM_SKIP_HEADER;
LWOOBJID teamID = 0;
@ -665,8 +665,8 @@ void HandlePacketChat(Packet* packet) {
void HandleMasterPacket(Packet* packet) {
if (packet->length < 2) return;
if (static_cast<eConnectionType>(packet->data[1]) != eConnectionType::MASTER || packet->length < 4) return;
switch (static_cast<eMasterMessageType>(packet->data[3])) {
case eMasterMessageType::REQUEST_PERSISTENT_ID_RESPONSE: {
switch (static_cast<MessageType::Master>(packet->data[3])) {
case MessageType::Master::REQUEST_PERSISTENT_ID_RESPONSE: {
CINSTREAM_SKIP_HEADER;
uint64_t requestID;
inStream.Read(requestID);
@ -676,7 +676,7 @@ void HandleMasterPacket(Packet* packet) {
break;
}
case eMasterMessageType::SESSION_KEY_RESPONSE: {
case MessageType::Master::SESSION_KEY_RESPONSE: {
//Read our session key and to which user it belongs:
CINSTREAM_SKIP_HEADER;
uint32_t sessionKey = 0;
@ -731,7 +731,7 @@ void HandleMasterPacket(Packet* packet) {
//Notify master:
{
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::PLAYER_ADDED);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::PLAYER_ADDED);
bitStream.Write<LWOMAPID>(Game::server->GetZoneID());
bitStream.Write<LWOINSTANCEID>(instanceID);
Game::server->SendToMaster(bitStream);
@ -740,7 +740,7 @@ void HandleMasterPacket(Packet* packet) {
break;
}
case eMasterMessageType::AFFIRM_TRANSFER_REQUEST: {
case MessageType::Master::AFFIRM_TRANSFER_REQUEST: {
CINSTREAM_SKIP_HEADER;
uint64_t requestID;
inStream.Read(requestID);
@ -748,20 +748,20 @@ void HandleMasterPacket(Packet* packet) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::AFFIRM_TRANSFER_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::AFFIRM_TRANSFER_RESPONSE);
bitStream.Write(requestID);
Game::server->SendToMaster(bitStream);
break;
}
case eMasterMessageType::SHUTDOWN: {
case MessageType::Master::SHUTDOWN: {
Game::lastSignal = -1;
LOG("Got shutdown request from master, zone (%i), instance (%i)", Game::server->GetZoneID(), Game::server->GetInstanceID());
break;
}
case eMasterMessageType::NEW_SESSION_ALERT: {
case MessageType::Master::NEW_SESSION_ALERT: {
CINSTREAM_SKIP_HEADER;
uint32_t sessionKey = inStream.Read(sessionKey);
@ -822,7 +822,7 @@ void HandlePacket(Packet* packet) {
{
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::UNEXPECTED_DISCONNECT);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::UNEXPECTED_DISCONNECT);
bitStream.Write(user->GetLoggedInChar());
Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE, 0, Game::chatSysAddr, false);
}
@ -834,7 +834,7 @@ void HandlePacket(Packet* packet) {
}
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::PLAYER_REMOVED);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::PLAYER_REMOVED);
bitStream.Write<LWOMAPID>(Game::server->GetZoneID());
bitStream.Write<LWOINSTANCEID>(instanceID);
Game::server->SendToMaster(bitStream);
@ -842,15 +842,15 @@ void HandlePacket(Packet* packet) {
if (packet->data[0] != ID_USER_PACKET_ENUM || packet->length < 4) return;
if (static_cast<eConnectionType>(packet->data[1]) == eConnectionType::SERVER) {
if (static_cast<eServerMessageType>(packet->data[3]) == eServerMessageType::VERSION_CONFIRM) {
if (static_cast<MessageType::Server>(packet->data[3]) == MessageType::Server::VERSION_CONFIRM) {
AuthPackets::HandleHandshake(Game::server, packet);
}
}
if (static_cast<eConnectionType>(packet->data[1]) != eConnectionType::WORLD) return;
switch (static_cast<eWorldMessageType>(packet->data[3])) {
case eWorldMessageType::VALIDATION: {
switch (static_cast<MessageType::World>(packet->data[3])) {
case MessageType::World::VALIDATION: {
CINSTREAM_SKIP_HEADER;
LUWString username;
inStream.Read(username);
@ -898,7 +898,7 @@ void HandlePacket(Packet* packet) {
//Request the session info from Master:
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::REQUEST_SESSION_KEY);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::REQUEST_SESSION_KEY);
bitStream.Write(username);
Game::server->SendToMaster(bitStream);
@ -911,7 +911,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::CHARACTER_LIST_REQUEST: {
case MessageType::World::CHARACTER_LIST_REQUEST: {
//We need to delete the entity first, otherwise the char list could delete it while it exists in the world!
if (Game::server->GetZoneID() != 0) {
auto user = UserManager::Instance()->GetUser(packet->systemAddress);
@ -933,12 +933,12 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::GAME_MSG: {
case MessageType::World::GAME_MSG: {
RakNet::BitStream bitStream(packet->data, packet->length, false);
uint64_t header;
LWOOBJID objectID;
eGameMessageType messageID;
MessageType::Game messageID;
bitStream.Read(header);
bitStream.Read(objectID);
@ -959,12 +959,12 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::CHARACTER_CREATE_REQUEST: {
case MessageType::World::CHARACTER_CREATE_REQUEST: {
UserManager::Instance()->CreateCharacter(packet->systemAddress, packet);
break;
}
case eWorldMessageType::LOGIN_REQUEST: {
case MessageType::World::LOGIN_REQUEST: {
RakNet::BitStream inStream(packet->data, packet->length, false);
uint64_t header = inStream.Read(header);
@ -991,7 +991,7 @@ void HandlePacket(Packet* packet) {
// This means we swapped characters and we need to remove the previous player from the container.
if (static_cast<uint32_t>(lastCharacter) != playerID) {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::UNEXPECTED_DISCONNECT);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::UNEXPECTED_DISCONNECT);
bitStream.Write(lastCharacter);
Game::chatServer->Send(&bitStream, SYSTEM_PRIORITY, RELIABLE, 0, Game::chatSysAddr, false);
}
@ -1001,17 +1001,17 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::CHARACTER_DELETE_REQUEST: {
case MessageType::World::CHARACTER_DELETE_REQUEST: {
UserManager::Instance()->DeleteCharacter(packet->systemAddress, packet);
break;
}
case eWorldMessageType::CHARACTER_RENAME_REQUEST: {
case MessageType::World::CHARACTER_RENAME_REQUEST: {
UserManager::Instance()->RenameCharacter(packet->systemAddress, packet);
break;
}
case eWorldMessageType::LEVEL_LOAD_COMPLETE: {
case MessageType::World::LEVEL_LOAD_COMPLETE: {
LOG("Received level load complete from user.");
User* user = UserManager::Instance()->GetUser(packet->systemAddress);
if (user) {
@ -1122,7 +1122,7 @@ void HandlePacket(Packet* packet) {
GeneralUtils::SetBit(blueprintID, eObjectBits::PERSISTENT);
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, eClientMessageType::BLUEPRINT_SAVE_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::BLUEPRINT_SAVE_RESPONSE);
bitStream.Write<LWOOBJID>(LWOOBJID_EMPTY); //always zero so that a check on the client passes
bitStream.Write(eBlueprintSaveResponseType::EverythingWorked);
bitStream.Write<uint32_t>(1);
@ -1154,7 +1154,7 @@ void HandlePacket(Packet* packet) {
const auto& playerName = character->GetName();
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, eChatMessageType::LOGIN_SESSION_NOTIFY);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CHAT, MessageType::Chat::LOGIN_SESSION_NOTIFY);
bitStream.Write(player->GetObjectID());
bitStream.Write<uint32_t>(playerName.size());
for (size_t i = 0; i < playerName.size(); i++) {
@ -1180,7 +1180,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::POSITION_UPDATE: {
case MessageType::World::POSITION_UPDATE: {
auto positionUpdate = ClientPackets::HandleClientPositionUpdate(packet);
User* user = UserManager::Instance()->GetUser(packet->systemAddress);
@ -1194,7 +1194,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::MAIL: {
case MessageType::World::MAIL: {
RakNet::BitStream bitStream(packet->data, packet->length, false);
// FIXME: Change this to the macro to skip the header...
LWOOBJID space;
@ -1203,7 +1203,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::ROUTE_PACKET: {
case MessageType::World::ROUTE_PACKET: {
//Yeet to chat
CINSTREAM_SKIP_HEADER;
uint32_t size = 0;
@ -1237,7 +1237,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::STRING_CHECK: {
case MessageType::World::STRING_CHECK: {
auto request = ClientPackets::HandleChatModerationRequest(packet);
// TODO: Find a good home for the logic in this case.
@ -1309,7 +1309,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::GENERAL_CHAT_MESSAGE: {
case MessageType::World::GENERAL_CHAT_MESSAGE: {
if (chatDisabled) {
ChatPackets::SendMessageFail(packet->systemAddress);
} else {
@ -1341,7 +1341,7 @@ void HandlePacket(Packet* packet) {
break;
}
case eWorldMessageType::HANDLE_FUNNESS: {
case MessageType::World::HANDLE_FUNNESS: {
//This means the client is running slower or faster than it should.
//Could be insane lag, but I'mma just YEET them as it's usually speedhacking.
//This is updated to now count the amount of times we've been caught "speedhacking" to kick with a delay
@ -1360,7 +1360,7 @@ void HandlePacket(Packet* packet) {
}
case eWorldMessageType::UI_HELP_TOP_5: {
case MessageType::World::UI_HELP_TOP_5: {
auto language = ClientPackets::SendTop5HelpIssues(packet);
// TODO: Handle different languages in a nice way
// 0: en_US
@ -1396,7 +1396,7 @@ void HandlePacket(Packet* packet) {
}
default:
const auto messageId = *reinterpret_cast<eWorldMessageType*>(&packet->data[3]);
const auto messageId = *reinterpret_cast<MessageType::World*>(&packet->data[3]);
const std::string_view messageIdString = StringifiedEnum::ToString(messageId);
LOG("Unknown world packet received: %4i, %s", messageId, messageIdString.data());
}
@ -1482,6 +1482,6 @@ void FinalizeShutdown() {
void SendShutdownMessageToMaster() {
CBITSTREAM;
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::SHUTDOWN_RESPONSE);
BitStreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, MessageType::Master::SHUTDOWN_RESPONSE);
Game::server->SendToMaster(bitStream);
}

View File

@ -3,22 +3,22 @@
#include "GeneralUtils.h"
#include "eGameMasterLevel.h"
#include "eGameMessageType.h"
#include "eWorldMessageType.h"
#include "MessageType/Game.h"
#include "MessageType/World.h"
#define ASSERT_TYPE_EQ(TYPE, ENUM)\
ASSERT_TRUE(typeid(TYPE) == typeid(GeneralUtils::ToUnderlying(static_cast<ENUM>(0))));
#define ASSERT_TYPE_NE(TYPE, ENUM)\
ASSERT_FALSE(typeid(TYPE) == typeid(GeneralUtils::ToUnderlying(static_cast<ENUM>(0))));
// Verify that the underlying enum types are being cast correctly
TEST(ToUnderlyingTests, VerifyToUnderlying) {
ASSERT_TYPE_EQ(uint8_t, eGameMasterLevel);
ASSERT_TYPE_EQ(uint16_t, eGameMessageType);
ASSERT_TYPE_EQ(uint32_t, eWorldMessageType)
ASSERT_TYPE_EQ(uint16_t, MessageType::Game);
ASSERT_TYPE_EQ(uint32_t, MessageType::World)
ASSERT_TYPE_NE(void, eGameMasterLevel);
ASSERT_TYPE_NE(void, eGameMessageType);
ASSERT_TYPE_NE(void, eWorldMessageType)
ASSERT_TYPE_NE(void, MessageType::Game);
ASSERT_TYPE_NE(void, MessageType::World)
}

View File

@ -6,8 +6,8 @@
#include "StringifiedEnum.h"
#include "Logger.h"
#include "Game.h"
#include "eGameMessageType.h"
#include "eWorldMessageType.h"
#include "MessageType/Game.h"
#include "MessageType/World.h"
#include "magic_enum.hpp"
#define ENUM_EQ(e, y, z)\
@ -21,47 +21,47 @@
TEST(MagicEnumTest, eWorldMessageTypeTest) {
Game::logger = new Logger("./MagicEnumTest_eWorldMessageTypeTest.log", true, true);
ENUM_EQ(eWorldMessageType, 1, VALIDATION);
ENUM_EQ(eWorldMessageType, 2, CHARACTER_LIST_REQUEST);
ENUM_EQ(eWorldMessageType, 3, CHARACTER_CREATE_REQUEST);
ENUM_EQ(eWorldMessageType, 4, LOGIN_REQUEST);
ENUM_EQ(eWorldMessageType, 5, GAME_MSG);
ENUM_EQ(eWorldMessageType, 6, CHARACTER_DELETE_REQUEST);
ENUM_EQ(eWorldMessageType, 7, CHARACTER_RENAME_REQUEST);
ENUM_EQ(eWorldMessageType, 8, HAPPY_FLOWER_MODE_NOTIFY);
ENUM_EQ(eWorldMessageType, 9, SLASH_RELOAD_MAP);
ENUM_EQ(eWorldMessageType, 10, SLASH_PUSH_MAP_REQUEST);
ENUM_EQ(eWorldMessageType, 11, SLASH_PUSH_MAP);
ENUM_EQ(eWorldMessageType, 12, SLASH_PULL_MAP);
ENUM_EQ(eWorldMessageType, 13, LOCK_MAP_REQUEST);
ENUM_EQ(eWorldMessageType, 14, GENERAL_CHAT_MESSAGE);
ENUM_EQ(eWorldMessageType, 15, HTTP_MONITOR_INFO_REQUEST);
ENUM_EQ(eWorldMessageType, 16, SLASH_DEBUG_SCRIPTS);
ENUM_EQ(eWorldMessageType, 17, MODELS_CLEAR);
ENUM_EQ(eWorldMessageType, 18, EXHIBIT_INSERT_MODEL);
ENUM_EQ(eWorldMessageType, 19, LEVEL_LOAD_COMPLETE);
ENUM_EQ(eWorldMessageType, 20, TMP_GUILD_CREATE);
ENUM_EQ(eWorldMessageType, 21, ROUTE_PACKET);
ENUM_EQ(eWorldMessageType, 22, POSITION_UPDATE);
ENUM_EQ(eWorldMessageType, 23, MAIL);
ENUM_EQ(eWorldMessageType, 24, WORD_CHECK);
ENUM_EQ(eWorldMessageType, 25, STRING_CHECK);
ENUM_EQ(eWorldMessageType, 26, GET_PLAYERS_IN_ZONE);
ENUM_EQ(eWorldMessageType, 27, REQUEST_UGC_MANIFEST_INFO);
ENUM_EQ(eWorldMessageType, 28, BLUEPRINT_GET_ALL_DATA_REQUEST);
ENUM_EQ(eWorldMessageType, 29, CANCEL_MAP_QUEUE);
ENUM_EQ(eWorldMessageType, 30, HANDLE_FUNNESS);
ENUM_EQ(eWorldMessageType, 31, FAKE_PRG_CSR_MESSAGE);
ENUM_EQ(eWorldMessageType, 32, REQUEST_FREE_TRIAL_REFRESH);
ENUM_EQ(eWorldMessageType, 33, GM_SET_FREE_TRIAL_STATUS);
ENUM_EQ(eWorldMessageType, 91, UI_HELP_TOP_5);
ENUM_NE(eWorldMessageType, 37);
ENUM_NE(eWorldMessageType, 123);
ENUM_EQ(MessageType::World, 1, VALIDATION);
ENUM_EQ(MessageType::World, 2, CHARACTER_LIST_REQUEST);
ENUM_EQ(MessageType::World, 3, CHARACTER_CREATE_REQUEST);
ENUM_EQ(MessageType::World, 4, LOGIN_REQUEST);
ENUM_EQ(MessageType::World, 5, GAME_MSG);
ENUM_EQ(MessageType::World, 6, CHARACTER_DELETE_REQUEST);
ENUM_EQ(MessageType::World, 7, CHARACTER_RENAME_REQUEST);
ENUM_EQ(MessageType::World, 8, HAPPY_FLOWER_MODE_NOTIFY);
ENUM_EQ(MessageType::World, 9, SLASH_RELOAD_MAP);
ENUM_EQ(MessageType::World, 10, SLASH_PUSH_MAP_REQUEST);
ENUM_EQ(MessageType::World, 11, SLASH_PUSH_MAP);
ENUM_EQ(MessageType::World, 12, SLASH_PULL_MAP);
ENUM_EQ(MessageType::World, 13, LOCK_MAP_REQUEST);
ENUM_EQ(MessageType::World, 14, GENERAL_CHAT_MESSAGE);
ENUM_EQ(MessageType::World, 15, HTTP_MONITOR_INFO_REQUEST);
ENUM_EQ(MessageType::World, 16, SLASH_DEBUG_SCRIPTS);
ENUM_EQ(MessageType::World, 17, MODELS_CLEAR);
ENUM_EQ(MessageType::World, 18, EXHIBIT_INSERT_MODEL);
ENUM_EQ(MessageType::World, 19, LEVEL_LOAD_COMPLETE);
ENUM_EQ(MessageType::World, 20, TMP_GUILD_CREATE);
ENUM_EQ(MessageType::World, 21, ROUTE_PACKET);
ENUM_EQ(MessageType::World, 22, POSITION_UPDATE);
ENUM_EQ(MessageType::World, 23, MAIL);
ENUM_EQ(MessageType::World, 24, WORD_CHECK);
ENUM_EQ(MessageType::World, 25, STRING_CHECK);
ENUM_EQ(MessageType::World, 26, GET_PLAYERS_IN_ZONE);
ENUM_EQ(MessageType::World, 27, REQUEST_UGC_MANIFEST_INFO);
ENUM_EQ(MessageType::World, 28, BLUEPRINT_GET_ALL_DATA_REQUEST);
ENUM_EQ(MessageType::World, 29, CANCEL_MAP_QUEUE);
ENUM_EQ(MessageType::World, 30, HANDLE_FUNNESS);
ENUM_EQ(MessageType::World, 31, FAKE_PRG_CSR_MESSAGE);
ENUM_EQ(MessageType::World, 32, REQUEST_FREE_TRIAL_REFRESH);
ENUM_EQ(MessageType::World, 33, GM_SET_FREE_TRIAL_STATUS);
ENUM_EQ(MessageType::World, 91, UI_HELP_TOP_5);
ENUM_NE(MessageType::World, 37);
ENUM_NE(MessageType::World, 123);
srand(time(NULL));
auto begin = std::chrono::high_resolution_clock::now();
for (int i = 0; i < 10000000; ++i) {
volatile auto f = StringifiedEnum::ToString(static_cast<eWorldMessageType>(i)).data();
volatile auto f = StringifiedEnum::ToString(static_cast<MessageType::World>(i)).data();
// To ensure the compiler doesn't optimize out the call, I print it at random intervals
if (rand() % 100000 == 0) LOG("%i, %s", i, f);
@ -78,34 +78,34 @@ TEST(MagicEnumTest, eGameMessageTypeTest) {
Game::logger = new Logger("./MagicEnumTest_eGameMessageTypeTest.log", true, true);
// Only doing the first and last 10 for the sake of my sanity
ENUM_EQ(eGameMessageType, 0, GET_POSITION);
ENUM_EQ(eGameMessageType, 1, GET_ROTATION);
ENUM_EQ(eGameMessageType, 2, GET_LINEAR_VELOCITY);
ENUM_EQ(eGameMessageType, 3, GET_ANGULAR_VELOCITY);
ENUM_EQ(eGameMessageType, 4, GET_FORWARD_VELOCITY);
ENUM_EQ(eGameMessageType, 5, GET_PLAYER_FORWARD);
ENUM_EQ(eGameMessageType, 6, GET_FORWARD_VECTOR);
ENUM_EQ(eGameMessageType, 7, SET_POSITION);
ENUM_EQ(eGameMessageType, 8, SET_LOCAL_POSITION);
ENUM_EQ(eGameMessageType, 9, SET_ROTATION);
ENUM_EQ(eGameMessageType, 10, SET_LINEAR_VELOCITY);
ENUM_EQ(eGameMessageType, 1762, USE_SKILL_SET);
ENUM_EQ(eGameMessageType, 1763, SET_SKILL_SET_POSSESSOR);
ENUM_EQ(eGameMessageType, 1764, POPULATE_ACTION_BAR);
ENUM_EQ(eGameMessageType, 1765, GET_COMPONENT_TEMPLATE_ID);
ENUM_EQ(eGameMessageType, 1766, GET_POSSESSABLE_SKILL_SET);
ENUM_EQ(eGameMessageType, 1767, MARK_INVENTORY_ITEM_AS_ACTIVE);
ENUM_EQ(eGameMessageType, 1768, UPDATE_FORGED_ITEM);
ENUM_EQ(eGameMessageType, 1769, CAN_ITEMS_BE_REFORGED);
ENUM_EQ(eGameMessageType, 1771, NOTIFY_CLIENT_RAIL_START_FAILED);
ENUM_EQ(eGameMessageType, 1772, GET_IS_ON_RAIL);
ENUM_NE(eGameMessageType, 32);
ENUM_NE(eGameMessageType, 1776);
ENUM_EQ(MessageType::Game, 0, GET_POSITION);
ENUM_EQ(MessageType::Game, 1, GET_ROTATION);
ENUM_EQ(MessageType::Game, 2, GET_LINEAR_VELOCITY);
ENUM_EQ(MessageType::Game, 3, GET_ANGULAR_VELOCITY);
ENUM_EQ(MessageType::Game, 4, GET_FORWARD_VELOCITY);
ENUM_EQ(MessageType::Game, 5, GET_PLAYER_FORWARD);
ENUM_EQ(MessageType::Game, 6, GET_FORWARD_VECTOR);
ENUM_EQ(MessageType::Game, 7, SET_POSITION);
ENUM_EQ(MessageType::Game, 8, SET_LOCAL_POSITION);
ENUM_EQ(MessageType::Game, 9, SET_ROTATION);
ENUM_EQ(MessageType::Game, 10, SET_LINEAR_VELOCITY);
ENUM_EQ(MessageType::Game, 1762, USE_SKILL_SET);
ENUM_EQ(MessageType::Game, 1763, SET_SKILL_SET_POSSESSOR);
ENUM_EQ(MessageType::Game, 1764, POPULATE_ACTION_BAR);
ENUM_EQ(MessageType::Game, 1765, GET_COMPONENT_TEMPLATE_ID);
ENUM_EQ(MessageType::Game, 1766, GET_POSSESSABLE_SKILL_SET);
ENUM_EQ(MessageType::Game, 1767, MARK_INVENTORY_ITEM_AS_ACTIVE);
ENUM_EQ(MessageType::Game, 1768, UPDATE_FORGED_ITEM);
ENUM_EQ(MessageType::Game, 1769, CAN_ITEMS_BE_REFORGED);
ENUM_EQ(MessageType::Game, 1771, NOTIFY_CLIENT_RAIL_START_FAILED);
ENUM_EQ(MessageType::Game, 1772, GET_IS_ON_RAIL);
ENUM_NE(MessageType::Game, 32);
ENUM_NE(MessageType::Game, 1776);
srand(time(NULL));
auto begin = std::chrono::high_resolution_clock::now();
for (int i = 0; i < 10000000; ++i) {
volatile auto f = StringifiedEnum::ToString(static_cast<eGameMessageType>(i)).data();
volatile auto f = StringifiedEnum::ToString(static_cast<MessageType::Game>(i)).data();
// To ensure the compiler doesn't optimize out the call, I print it at random intervals
if (rand() % 100000 == 0) LOG("%i, %s", i, f);
@ -135,10 +135,10 @@ namespace {
TEST(MagicEnumTest, ArraysAreSorted) {
Game::logger = new Logger("./MagicEnumTest_ArraysAreSorted.log", true, true);
constexpr auto wmArray = &magic_enum::enum_entries<eWorldMessageType>();
constexpr auto wmArray = &magic_enum::enum_entries<MessageType::World>();
AssertEnumArraySorted(wmArray);
constexpr auto gmArray = &magic_enum::enum_entries<eGameMessageType>();
constexpr auto gmArray = &magic_enum::enum_entries<MessageType::Game>();
AssertEnumArraySorted(gmArray);
delete Game::logger;

View File

@ -1,298 +1,298 @@
#include <gtest/gtest.h>
#include "eGameMessageType.h"
#include "MessageType/Game.h"
TEST(LegacyGameMessageTests, AssertLegacyGmValues) {
EXPECT_EQ(eGameMessageType::TELEPORT, static_cast<eGameMessageType>(19));
EXPECT_EQ(eGameMessageType::SET_PLAYER_CONTROL_SCHEME, static_cast<eGameMessageType>(26));
EXPECT_EQ(eGameMessageType::DROP_CLIENT_LOOT, static_cast<eGameMessageType>(30));
EXPECT_EQ(eGameMessageType::DIE, static_cast<eGameMessageType>(37));
EXPECT_EQ(eGameMessageType::REQUEST_DIE, static_cast<eGameMessageType>(38));
EXPECT_EQ(eGameMessageType::PLAY_EMOTE, static_cast<eGameMessageType>(41));
EXPECT_EQ(eGameMessageType::PLAY_ANIMATION, static_cast<eGameMessageType>(43));
EXPECT_EQ(eGameMessageType::CONTROL_BEHAVIORS, static_cast<eGameMessageType>(48));
EXPECT_EQ(eGameMessageType::SET_NAME, static_cast<eGameMessageType>(72));
EXPECT_EQ(eGameMessageType::ECHO_START_SKILL, static_cast<eGameMessageType>(118));
EXPECT_EQ(eGameMessageType::START_SKILL, static_cast<eGameMessageType>(119));
EXPECT_EQ(eGameMessageType::VERIFY_ACK, static_cast<eGameMessageType>(121));
EXPECT_EQ(eGameMessageType::ADD_SKILL, static_cast<eGameMessageType>(127));
EXPECT_EQ(eGameMessageType::REMOVE_SKILL, static_cast<eGameMessageType>(128));
EXPECT_EQ(eGameMessageType::SET_CURRENCY, static_cast<eGameMessageType>(133));
EXPECT_EQ(eGameMessageType::PICKUP_CURRENCY, static_cast<eGameMessageType>(137));
EXPECT_EQ(eGameMessageType::PICKUP_ITEM, static_cast<eGameMessageType>(139));
EXPECT_EQ(eGameMessageType::TEAM_PICKUP_ITEM, static_cast<eGameMessageType>(140));
EXPECT_EQ(eGameMessageType::PLAY_FX_EFFECT, static_cast<eGameMessageType>(154));
EXPECT_EQ(eGameMessageType::STOP_FX_EFFECT, static_cast<eGameMessageType>(155));
EXPECT_EQ(eGameMessageType::REQUEST_RESURRECT, static_cast<eGameMessageType>(159));
EXPECT_EQ(eGameMessageType::RESURRECT, static_cast<eGameMessageType>(160));
EXPECT_EQ(eGameMessageType::PUSH_EQUIPPED_ITEMS_STATE, static_cast<eGameMessageType>(191));
EXPECT_EQ(eGameMessageType::POP_EQUIPPED_ITEMS_STATE, static_cast<eGameMessageType>(192));
EXPECT_EQ(eGameMessageType::SET_GM_LEVEL, static_cast<eGameMessageType>(193));
EXPECT_EQ(eGameMessageType::SET_STUNNED, static_cast<eGameMessageType>(198));
EXPECT_EQ(eGameMessageType::SET_STUN_IMMUNITY, static_cast<eGameMessageType>(200));
EXPECT_EQ(eGameMessageType::KNOCKBACK, static_cast<eGameMessageType>(202));
EXPECT_EQ(eGameMessageType::REBUILD_CANCEL, static_cast<eGameMessageType>(209));
EXPECT_EQ(eGameMessageType::ENABLE_REBUILD, static_cast<eGameMessageType>(213));
EXPECT_EQ(eGameMessageType::MOVE_ITEM_IN_INVENTORY, static_cast<eGameMessageType>(224));
EXPECT_EQ(eGameMessageType::ADD_ITEM_TO_INVENTORY_CLIENT_SYNC, static_cast<eGameMessageType>(227));
EXPECT_EQ(eGameMessageType::REMOVE_ITEM_FROM_INVENTORY, static_cast<eGameMessageType>(230));
EXPECT_EQ(eGameMessageType::EQUIP_INVENTORY, static_cast<eGameMessageType>(231));
EXPECT_EQ(eGameMessageType::UN_EQUIP_INVENTORY, static_cast<eGameMessageType>(233));
EXPECT_EQ(eGameMessageType::OFFER_MISSION, static_cast<eGameMessageType>(248));
EXPECT_EQ(eGameMessageType::RESPOND_TO_MISSION, static_cast<eGameMessageType>(249));
EXPECT_EQ(eGameMessageType::NOTIFY_MISSION, static_cast<eGameMessageType>(254));
EXPECT_EQ(eGameMessageType::NOTIFY_MISSION_TASK, static_cast<eGameMessageType>(255));
EXPECT_EQ(eGameMessageType::REBUILD_NOTIFY_STATE, static_cast<eGameMessageType>(336));
EXPECT_EQ(eGameMessageType::TERMINATE_INTERACTION, static_cast<eGameMessageType>(357));
EXPECT_EQ(eGameMessageType::SERVER_TERMINATE_INTERACTION, static_cast<eGameMessageType>(358));
EXPECT_EQ(eGameMessageType::REQUEST_USE, static_cast<eGameMessageType>(364));
EXPECT_EQ(eGameMessageType::VENDOR_OPEN_WINDOW, static_cast<eGameMessageType>(369));
EXPECT_EQ(eGameMessageType::BUY_FROM_VENDOR, static_cast<eGameMessageType>(373));
EXPECT_EQ(eGameMessageType::SELL_TO_VENDOR, static_cast<eGameMessageType>(374));
EXPECT_EQ(eGameMessageType::TEAM_SET_OFF_WORLD_FLAG, static_cast<eGameMessageType>(383));
EXPECT_EQ(eGameMessageType::SET_INVENTORY_SIZE, static_cast<eGameMessageType>(389));
EXPECT_EQ(eGameMessageType::ACKNOWLEDGE_POSSESSION, static_cast<eGameMessageType>(391));
EXPECT_EQ(eGameMessageType::SET_SHOOTING_GALLERY_PARAMS, static_cast<eGameMessageType>(400));
EXPECT_EQ(eGameMessageType::REQUEST_ACTIVITY_START_STOP, static_cast<eGameMessageType>(402));
EXPECT_EQ(eGameMessageType::REQUEST_ACTIVITY_ENTER, static_cast<eGameMessageType>(403));
EXPECT_EQ(eGameMessageType::REQUEST_ACTIVITY_EXIT, static_cast<eGameMessageType>(404));
EXPECT_EQ(eGameMessageType::ACTIVITY_ENTER, static_cast<eGameMessageType>(405));
EXPECT_EQ(eGameMessageType::ACTIVITY_EXIT, static_cast<eGameMessageType>(406));
EXPECT_EQ(eGameMessageType::ACTIVITY_START, static_cast<eGameMessageType>(407));
EXPECT_EQ(eGameMessageType::ACTIVITY_STOP, static_cast<eGameMessageType>(408));
EXPECT_EQ(eGameMessageType::SHOOTING_GALLERY_CLIENT_AIM_UPDATE, static_cast<eGameMessageType>(409));
EXPECT_EQ(eGameMessageType::SHOOTING_GALLERY_FIRE, static_cast<eGameMessageType>(411));
EXPECT_EQ(eGameMessageType::REQUEST_VENDOR_STATUS_UPDATE, static_cast<eGameMessageType>(416));
EXPECT_EQ(eGameMessageType::VENDOR_STATUS_UPDATE, static_cast<eGameMessageType>(417));
EXPECT_EQ(eGameMessageType::NOTIFY_CLIENT_SHOOTING_GALLERY_SCORE, static_cast<eGameMessageType>(425));
EXPECT_EQ(eGameMessageType::CONSUME_CLIENT_ITEM, static_cast<eGameMessageType>(427));
EXPECT_EQ(eGameMessageType::CLIENT_ITEM_CONSUMED, static_cast<eGameMessageType>(428));
EXPECT_EQ(eGameMessageType::UPDATE_SHOOTING_GALLERY_ROTATION, static_cast<eGameMessageType>(448));
EXPECT_EQ(eGameMessageType::SET_FLAG, static_cast<eGameMessageType>(471));
EXPECT_EQ(eGameMessageType::NOTIFY_CLIENT_FLAG_CHANGE, static_cast<eGameMessageType>(472));
EXPECT_EQ(eGameMessageType::VENDOR_TRANSACTION_RESULT, static_cast<eGameMessageType>(476));
EXPECT_EQ(eGameMessageType::HAS_BEEN_COLLECTED, static_cast<eGameMessageType>(486));
EXPECT_EQ(eGameMessageType::DISPLAY_CHAT_BUBBLE, static_cast<eGameMessageType>(495));
EXPECT_EQ(eGameMessageType::SPAWN_PET, static_cast<eGameMessageType>(498));
EXPECT_EQ(eGameMessageType::DESPAWN_PET, static_cast<eGameMessageType>(499));
EXPECT_EQ(eGameMessageType::PLAYER_LOADED, static_cast<eGameMessageType>(505));
EXPECT_EQ(eGameMessageType::PLAYER_READY, static_cast<eGameMessageType>(509));
EXPECT_EQ(eGameMessageType::REQUEST_LINKED_MISSION, static_cast<eGameMessageType>(515));
EXPECT_EQ(eGameMessageType::INVALID_ZONE_TRANSFER_LIST, static_cast<eGameMessageType>(519));
EXPECT_EQ(eGameMessageType::MISSION_DIALOGUE_OK, static_cast<eGameMessageType>(520));
EXPECT_EQ(eGameMessageType::DISPLAY_MESSAGE_BOX, static_cast<eGameMessageType>(529));
EXPECT_EQ(eGameMessageType::MESSAGE_BOX_RESPOND, static_cast<eGameMessageType>(530));
EXPECT_EQ(eGameMessageType::CHOICE_BOX_RESPOND, static_cast<eGameMessageType>(531));
EXPECT_EQ(eGameMessageType::SMASH, static_cast<eGameMessageType>(537));
EXPECT_EQ(eGameMessageType::UN_SMASH, static_cast<eGameMessageType>(538));
EXPECT_EQ(eGameMessageType::PLACE_MODEL_RESPONSE, static_cast<eGameMessageType>(547));
EXPECT_EQ(eGameMessageType::SET_SHOOTING_GALLERY_RETICULE_EFFECT, static_cast<eGameMessageType>(546));
EXPECT_EQ(eGameMessageType::SET_JET_PACK_MODE, static_cast<eGameMessageType>(561));
EXPECT_EQ(eGameMessageType::REGISTER_PET_ID, static_cast<eGameMessageType>(565));
EXPECT_EQ(eGameMessageType::REGISTER_PET_DBID, static_cast<eGameMessageType>(566));
EXPECT_EQ(eGameMessageType::SHOW_ACTIVITY_COUNTDOWN, static_cast<eGameMessageType>(568));
EXPECT_EQ(eGameMessageType::START_ACTIVITY_TIME, static_cast<eGameMessageType>(576));
EXPECT_EQ(eGameMessageType::ACTIVITY_PAUSE, static_cast<eGameMessageType>(602));
EXPECT_EQ(eGameMessageType::USE_NON_EQUIPMENT_ITEM, static_cast<eGameMessageType>(603));
EXPECT_EQ(eGameMessageType::USE_ITEM_RESULT, static_cast<eGameMessageType>(607));
EXPECT_EQ(eGameMessageType::COMMAND_PET, static_cast<eGameMessageType>(640));
EXPECT_EQ(eGameMessageType::PET_RESPONSE, static_cast<eGameMessageType>(641));
EXPECT_EQ(eGameMessageType::REQUEST_ACTIVITY_SUMMARY_LEADERBOARD_DATA, static_cast<eGameMessageType>(648));
EXPECT_EQ(eGameMessageType::SEND_ACTIVITY_SUMMARY_LEADERBOARD_DATA, static_cast<eGameMessageType>(649));
EXPECT_EQ(eGameMessageType::NOTIFY_OBJECT, static_cast<eGameMessageType>(656));
EXPECT_EQ(eGameMessageType::CLIENT_NOTIFY_PET, static_cast<eGameMessageType>(659));
EXPECT_EQ(eGameMessageType::NOTIFY_PET, static_cast<eGameMessageType>(660));
EXPECT_EQ(eGameMessageType::NOTIFY_PET_TAMING_MINIGAME, static_cast<eGameMessageType>(661));
EXPECT_EQ(eGameMessageType::START_SERVER_PET_MINIGAME_TIMER, static_cast<eGameMessageType>(662));
EXPECT_EQ(eGameMessageType::CLIENT_EXIT_TAMING_MINIGAME, static_cast<eGameMessageType>(663));
EXPECT_EQ(eGameMessageType::PET_NAME_CHANGED, static_cast<eGameMessageType>(686));
EXPECT_EQ(eGameMessageType::PET_TAMING_MINIGAME_RESULT, static_cast<eGameMessageType>(667));
EXPECT_EQ(eGameMessageType::PET_TAMING_TRY_BUILD_RESULT, static_cast<eGameMessageType>(668));
EXPECT_EQ(eGameMessageType::NOTIFY_TAMING_BUILD_SUCCESS, static_cast<eGameMessageType>(673));
EXPECT_EQ(eGameMessageType::NOTIFY_TAMING_MODEL_LOADED_ON_SERVER, static_cast<eGameMessageType>(674));
EXPECT_EQ(eGameMessageType::ACTIVATE_BUBBLE_BUFF, static_cast<eGameMessageType>(678));
EXPECT_EQ(eGameMessageType::DECTIVATE_BUBBLE_BUFF, static_cast<eGameMessageType>(679));
EXPECT_EQ(eGameMessageType::ADD_PET_TO_PLAYER, static_cast<eGameMessageType>(681));
EXPECT_EQ(eGameMessageType::REQUEST_SET_PET_NAME, static_cast<eGameMessageType>(683));
EXPECT_EQ(eGameMessageType::SET_PET_NAME, static_cast<eGameMessageType>(684));
EXPECT_EQ(eGameMessageType::NOTIFY_TAMING_PUZZLE_SELECTED, static_cast<eGameMessageType>(675));
EXPECT_EQ(eGameMessageType::SHOW_PET_ACTION_BUTTON, static_cast<eGameMessageType>(692));
EXPECT_EQ(eGameMessageType::SET_EMOTE_LOCK_STATE, static_cast<eGameMessageType>(693));
EXPECT_EQ(eGameMessageType::USE_ITEM_REQUIREMENTS_RESPONSE, static_cast<eGameMessageType>(703));
EXPECT_EQ(eGameMessageType::PLAY_EMBEDDED_EFFECT_ON_ALL_CLIENTS_NEAR_OBJECT, static_cast<eGameMessageType>(713));
EXPECT_EQ(eGameMessageType::DOWNLOAD_PROPERTY_DATA, static_cast<eGameMessageType>(716));
EXPECT_EQ(eGameMessageType::QUERY_PROPERTY_DATA, static_cast<eGameMessageType>(717));
EXPECT_EQ(eGameMessageType::PROPERTY_EDITOR_BEGIN, static_cast<eGameMessageType>(724));
EXPECT_EQ(eGameMessageType::PROPERTY_EDITOR_END, static_cast<eGameMessageType>(725));
EXPECT_EQ(eGameMessageType::IS_MINIFIG_IN_A_BUBBLE, static_cast<eGameMessageType>(729));
EXPECT_EQ(eGameMessageType::START_PATHING, static_cast<eGameMessageType>(733));
EXPECT_EQ(eGameMessageType::ACTIVATE_BUBBLE_BUFF_FROM_SERVER, static_cast<eGameMessageType>(734));
EXPECT_EQ(eGameMessageType::DEACTIVATE_BUBBLE_BUFF_FROM_SERVER, static_cast<eGameMessageType>(735));
EXPECT_EQ(eGameMessageType::NOTIFY_CLIENT_ZONE_OBJECT, static_cast<eGameMessageType>(737));
EXPECT_EQ(eGameMessageType::UPDATE_REPUTATION, static_cast<eGameMessageType>(746));
EXPECT_EQ(eGameMessageType::PROPERTY_RENTAL_RESPONSE, static_cast<eGameMessageType>(750));
EXPECT_EQ(eGameMessageType::REQUEST_PLATFORM_RESYNC, static_cast<eGameMessageType>(760));
EXPECT_EQ(eGameMessageType::PLATFORM_RESYNC, static_cast<eGameMessageType>(761));
EXPECT_EQ(eGameMessageType::PLAY_CINEMATIC, static_cast<eGameMessageType>(762));
EXPECT_EQ(eGameMessageType::END_CINEMATIC, static_cast<eGameMessageType>(763));
EXPECT_EQ(eGameMessageType::CINEMATIC_UPDATE, static_cast<eGameMessageType>(764));
EXPECT_EQ(eGameMessageType::TOGGLE_GHOST_REFERENCE_OVERRIDE, static_cast<eGameMessageType>(767));
EXPECT_EQ(eGameMessageType::SET_GHOST_REFERENCE_POSITION, static_cast<eGameMessageType>(768));
EXPECT_EQ(eGameMessageType::FIRE_EVENT_SERVER_SIDE, static_cast<eGameMessageType>(770));
EXPECT_EQ(eGameMessageType::SCRIPT_NETWORK_VAR_UPDATE, static_cast<eGameMessageType>(781));
EXPECT_EQ(eGameMessageType::UPDATE_MODEL_FROM_CLIENT, static_cast<eGameMessageType>(793));
EXPECT_EQ(eGameMessageType::DELETE_MODEL_FROM_CLIENT, static_cast<eGameMessageType>(794));
EXPECT_EQ(eGameMessageType::PLAY_ND_AUDIO_EMITTER, static_cast<eGameMessageType>(821));
EXPECT_EQ(eGameMessageType::PLAY2_D_AMBIENT_SOUND, static_cast<eGameMessageType>(831));
EXPECT_EQ(eGameMessageType::ENTER_PROPERTY1, static_cast<eGameMessageType>(840));
EXPECT_EQ(eGameMessageType::ENTER_PROPERTY2, static_cast<eGameMessageType>(841));
EXPECT_EQ(eGameMessageType::PROPERTY_ENTRANCE_SYNC, static_cast<eGameMessageType>(842));
EXPECT_EQ(eGameMessageType::PROPERTY_SELECT_QUERY, static_cast<eGameMessageType>(845));
EXPECT_EQ(eGameMessageType::PARSE_CHAT_MESSAGE, static_cast<eGameMessageType>(850));
EXPECT_EQ(eGameMessageType::BROADCAST_TEXT_TO_CHATBOX, static_cast<eGameMessageType>(858));
EXPECT_EQ(eGameMessageType::OPEN_PROPERTY_MANAGEMENT, static_cast<eGameMessageType>(860));
EXPECT_EQ(eGameMessageType::OPEN_PROPERTY_VENDOR, static_cast<eGameMessageType>(861));
EXPECT_EQ(eGameMessageType::UPDATE_PROPERTY_OR_MODEL_FOR_FILTER_CHECK, static_cast<eGameMessageType>(863));
EXPECT_EQ(eGameMessageType::CLIENT_TRADE_REQUEST, static_cast<eGameMessageType>(868));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_REQUEST, static_cast<eGameMessageType>(869));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_INVITE, static_cast<eGameMessageType>(870));
EXPECT_EQ(eGameMessageType::CLIENT_TRADE_REPLY, static_cast<eGameMessageType>(871));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_REPLY, static_cast<eGameMessageType>(872));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_INITIAL_REPLY, static_cast<eGameMessageType>(873));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_FINAL_REPLY, static_cast<eGameMessageType>(874));
EXPECT_EQ(eGameMessageType::CLIENT_TRADE_UPDATE, static_cast<eGameMessageType>(875));
EXPECT_EQ(eGameMessageType::SERVER_SIDE_TRADE_UPDATE, static_cast<eGameMessageType>(876));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_UPDATE, static_cast<eGameMessageType>(877));
EXPECT_EQ(eGameMessageType::CLIENT_TRADE_CANCEL, static_cast<eGameMessageType>(878));
EXPECT_EQ(eGameMessageType::CLIENT_SIDE_TRADE_CANCEL, static_cast<eGameMessageType>(879));
EXPECT_EQ(eGameMessageType::CLIENT_TRADE_ACCEPT, static_cast<eGameMessageType>(880));
EXPECT_EQ(eGameMessageType::SERVER_SIDE_TRADE_ACCEPT, static_cast<eGameMessageType>(881));
EXPECT_EQ(eGameMessageType::SERVER_SIDE_TRADE_CANCEL, static_cast<eGameMessageType>(882));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_CANCEL, static_cast<eGameMessageType>(883));
EXPECT_EQ(eGameMessageType::SERVER_TRADE_ACCEPT, static_cast<eGameMessageType>(884));
EXPECT_EQ(eGameMessageType::READY_FOR_UPDATES, static_cast<eGameMessageType>(888));
EXPECT_EQ(eGameMessageType::ORIENT_TO_OBJECT, static_cast<eGameMessageType>(905));
EXPECT_EQ(eGameMessageType::ORIENT_TO_POSITION, static_cast<eGameMessageType>(906));
EXPECT_EQ(eGameMessageType::ORIENT_TO_ANGLE, static_cast<eGameMessageType>(907));
EXPECT_EQ(eGameMessageType::BOUNCER_ACTIVE_STATUS, static_cast<eGameMessageType>(942));
EXPECT_EQ(eGameMessageType::UN_USE_BBB_MODEL, static_cast<eGameMessageType>(999));
EXPECT_EQ(eGameMessageType::BBB_LOAD_ITEM_REQUEST, static_cast<eGameMessageType>(1000));
EXPECT_EQ(eGameMessageType::BBB_SAVE_REQUEST, static_cast<eGameMessageType>(1001));
EXPECT_EQ(eGameMessageType::BBB_SAVE_RESPONSE, static_cast<eGameMessageType>(1005));
EXPECT_EQ(eGameMessageType::NOTIFY_CLIENT_OBJECT, static_cast<eGameMessageType>(1042));
EXPECT_EQ(eGameMessageType::DISPLAY_ZONE_SUMMARY, static_cast<eGameMessageType>(1043));
EXPECT_EQ(eGameMessageType::ZONE_SUMMARY_DISMISSED, static_cast<eGameMessageType>(1044));
EXPECT_EQ(eGameMessageType::ACTIVITY_STATE_CHANGE_REQUEST, static_cast<eGameMessageType>(1053));
EXPECT_EQ(eGameMessageType::MODIFY_PLAYER_ZONE_STATISTIC, static_cast<eGameMessageType>(1046));
EXPECT_EQ(eGameMessageType::START_BUILDING_WITH_ITEM, static_cast<eGameMessageType>(1057));
EXPECT_EQ(eGameMessageType::START_ARRANGING_WITH_ITEM, static_cast<eGameMessageType>(1061));
EXPECT_EQ(eGameMessageType::FINISH_ARRANGING_WITH_ITEM, static_cast<eGameMessageType>(1062));
EXPECT_EQ(eGameMessageType::DONE_ARRANGING_WITH_ITEM, static_cast<eGameMessageType>(1063));
EXPECT_EQ(eGameMessageType::SET_BUILD_MODE, static_cast<eGameMessageType>(1068));
EXPECT_EQ(eGameMessageType::BUILD_MODE_SET, static_cast<eGameMessageType>(1069));
EXPECT_EQ(eGameMessageType::SET_BUILD_MODE_CONFIRMED, static_cast<eGameMessageType>(1073));
EXPECT_EQ(eGameMessageType::NOTIFY_CLIENT_FAILED_PRECONDITION, static_cast<eGameMessageType>(1081));
EXPECT_EQ(eGameMessageType::MOVE_ITEM_BETWEEN_INVENTORY_TYPES, static_cast<eGameMessageType>(1093));
EXPECT_EQ(eGameMessageType::MODULAR_BUILD_BEGIN, static_cast<eGameMessageType>(1094));
EXPECT_EQ(eGameMessageType::MODULAR_BUILD_END, static_cast<eGameMessageType>(1095));
EXPECT_EQ(eGameMessageType::MODULAR_BUILD_MOVE_AND_EQUIP, static_cast<eGameMessageType>(1096));
EXPECT_EQ(eGameMessageType::MODULAR_BUILD_FINISH, static_cast<eGameMessageType>(1097));
EXPECT_EQ(eGameMessageType::REPORT_BUG, static_cast<eGameMessageType>(1198));
EXPECT_EQ(eGameMessageType::MISSION_DIALOGUE_CANCELLED, static_cast<eGameMessageType>(1129));
EXPECT_EQ(eGameMessageType::ECHO_SYNC_SKILL, static_cast<eGameMessageType>(1144));
EXPECT_EQ(eGameMessageType::SYNC_SKILL, static_cast<eGameMessageType>(1145));
EXPECT_EQ(eGameMessageType::REQUEST_SERVER_PROJECTILE_IMPACT, static_cast<eGameMessageType>(1148));
EXPECT_EQ(eGameMessageType::DO_CLIENT_PROJECTILE_IMPACT, static_cast<eGameMessageType>(1151));
EXPECT_EQ(eGameMessageType::MODULAR_BUILD_CONVERT_MODEL, static_cast<eGameMessageType>(1155));
EXPECT_EQ(eGameMessageType::SET_PLAYER_ALLOWED_RESPAWN, static_cast<eGameMessageType>(1165));
EXPECT_EQ(eGameMessageType::UI_MESSAGE_SERVER_TO_SINGLE_CLIENT, static_cast<eGameMessageType>(1184));
EXPECT_EQ(eGameMessageType::UI_MESSAGE_SERVER_TO_ALL_CLIENTS, static_cast<eGameMessageType>(1185));
EXPECT_EQ(eGameMessageType::PET_TAMING_TRY_BUILD, static_cast<eGameMessageType>(1197));
EXPECT_EQ(eGameMessageType::REQUEST_SMASH_PLAYER, static_cast<eGameMessageType>(1202));
EXPECT_EQ(eGameMessageType::FIRE_EVENT_CLIENT_SIDE, static_cast<eGameMessageType>(1213));
EXPECT_EQ(eGameMessageType::TOGGLE_GM_INVIS, static_cast<eGameMessageType>(1218));
EXPECT_EQ(eGameMessageType::CHANGE_OBJECT_WORLD_STATE, static_cast<eGameMessageType>(1223));
EXPECT_EQ(eGameMessageType::VEHICLE_LOCK_INPUT, static_cast<eGameMessageType>(1230));
EXPECT_EQ(eGameMessageType::VEHICLE_UNLOCK_INPUT, static_cast<eGameMessageType>(1231));
EXPECT_EQ(eGameMessageType::RACING_RESET_PLAYER_TO_LAST_RESET, static_cast<eGameMessageType>(1252));
EXPECT_EQ(eGameMessageType::RACING_SERVER_SET_PLAYER_LAP_AND_PLANE, static_cast<eGameMessageType>(1253));
EXPECT_EQ(eGameMessageType::RACING_SET_PLAYER_RESET_INFO, static_cast<eGameMessageType>(1254));
EXPECT_EQ(eGameMessageType::RACING_PLAYER_INFO_RESET_FINISHED, static_cast<eGameMessageType>(1255));
EXPECT_EQ(eGameMessageType::LOCK_NODE_ROTATION, static_cast<eGameMessageType>(1260));
EXPECT_EQ(eGameMessageType::VEHICLE_SET_WHEEL_LOCK_STATE, static_cast<eGameMessageType>(1273));
EXPECT_EQ(eGameMessageType::NOTIFY_VEHICLE_OF_RACING_OBJECT, static_cast<eGameMessageType>(1276));
EXPECT_EQ(eGameMessageType::SET_NAME_BILLBOARD_STATE, static_cast<eGameMessageType>(1284));
EXPECT_EQ(eGameMessageType::PLAYER_REACHED_RESPAWN_CHECKPOINT, static_cast<eGameMessageType>(1296));
EXPECT_EQ(eGameMessageType::HANDLE_UGC_POST_DELETE_BASED_ON_EDIT_MODE, static_cast<eGameMessageType>(1300));
EXPECT_EQ(eGameMessageType::HANDLE_UGC_POST_CREATE_BASED_ON_EDIT_MODE, static_cast<eGameMessageType>(1301));
EXPECT_EQ(eGameMessageType::PROPERTY_CONTENTS_FROM_CLIENT, static_cast<eGameMessageType>(1305));
EXPECT_EQ(eGameMessageType::GET_MODELS_ON_PROPERTY, static_cast<eGameMessageType>(1306));
EXPECT_EQ(eGameMessageType::MATCH_REQUEST, static_cast<eGameMessageType>(1308));
EXPECT_EQ(eGameMessageType::MATCH_RESPONSE, static_cast<eGameMessageType>(1309));
EXPECT_EQ(eGameMessageType::MATCH_UPDATE, static_cast<eGameMessageType>(1310));
EXPECT_EQ(eGameMessageType::MODULE_ASSEMBLY_DB_DATA_FOR_CLIENT, static_cast<eGameMessageType>(1131));
EXPECT_EQ(eGameMessageType::MODULE_ASSEMBLY_QUERY_DATA, static_cast<eGameMessageType>(1132));
EXPECT_EQ(eGameMessageType::SHOW_BILLBOARD_INTERACT_ICON, static_cast<eGameMessageType>(1337));
EXPECT_EQ(eGameMessageType::CHANGE_IDLE_FLAGS, static_cast<eGameMessageType>(1338));
EXPECT_EQ(eGameMessageType::VEHICLE_ADD_PASSIVE_BOOST_ACTION, static_cast<eGameMessageType>(1340));
EXPECT_EQ(eGameMessageType::VEHICLE_REMOVE_PASSIVE_BOOST_ACTION, static_cast<eGameMessageType>(1341));
EXPECT_EQ(eGameMessageType::NOTIFY_SERVER_VEHICLE_ADD_PASSIVE_BOOST_ACTION, static_cast<eGameMessageType>(1342));
EXPECT_EQ(eGameMessageType::NOTIFY_SERVER_VEHICLE_REMOVE_PASSIVE_BOOST_ACTION, static_cast<eGameMessageType>(1343));
EXPECT_EQ(eGameMessageType::VEHICLE_ADD_SLOWDOWN_ACTION, static_cast<eGameMessageType>(1344));
EXPECT_EQ(eGameMessageType::VEHICLE_REMOVE_SLOWDOWN_ACTION, static_cast<eGameMessageType>(1345));
EXPECT_EQ(eGameMessageType::NOTIFY_SERVER_VEHICLE_ADD_SLOWDOWN_ACTION, static_cast<eGameMessageType>(1346));
EXPECT_EQ(eGameMessageType::NOTIFY_SERVER_VEHICLE_REMOVE_SLOWDOWN_ACTION, static_cast<eGameMessageType>(1347));
EXPECT_EQ(eGameMessageType::BUYBACK_FROM_VENDOR, static_cast<eGameMessageType>(1350));
EXPECT_EQ(eGameMessageType::SET_PROPERTY_ACCESS, static_cast<eGameMessageType>(1366));
EXPECT_EQ(eGameMessageType::ZONE_PROPERTY_MODEL_PLACED, static_cast<eGameMessageType>(1369));
EXPECT_EQ(eGameMessageType::ZONE_PROPERTY_MODEL_ROTATED, static_cast<eGameMessageType>(1370));
EXPECT_EQ(eGameMessageType::ZONE_PROPERTY_MODEL_REMOVED_WHILE_EQUIPPED, static_cast<eGameMessageType>(1371));
EXPECT_EQ(eGameMessageType::ZONE_PROPERTY_MODEL_EQUIPPED, static_cast<eGameMessageType>(1372));
EXPECT_EQ(eGameMessageType::ZONE_PROPERTY_MODEL_PICKED_UP, static_cast<eGameMessageType>(1373));
EXPECT_EQ(eGameMessageType::ZONE_PROPERTY_MODEL_REMOVED, static_cast<eGameMessageType>(1374));
EXPECT_EQ(eGameMessageType::NOTIFY_RACING_CLIENT, static_cast<eGameMessageType>(1390));
EXPECT_EQ(eGameMessageType::RACING_PLAYER_HACK_CAR, static_cast<eGameMessageType>(1391));
EXPECT_EQ(eGameMessageType::RACING_PLAYER_LOADED, static_cast<eGameMessageType>(1392));
EXPECT_EQ(eGameMessageType::RACING_CLIENT_READY, static_cast<eGameMessageType>(1393));
EXPECT_EQ(eGameMessageType::UPDATE_CHAT_MODE, static_cast<eGameMessageType>(1395));
EXPECT_EQ(eGameMessageType::VEHICLE_NOTIFY_FINISHED_RACE, static_cast<eGameMessageType>(1396));
EXPECT_EQ(eGameMessageType::SET_CONSUMABLE_ITEM, static_cast<eGameMessageType>(1409));
EXPECT_EQ(eGameMessageType::SET_STATUS_IMMUNITY, static_cast<eGameMessageType>(1435));
EXPECT_EQ(eGameMessageType::SET_PET_NAME_MODERATED, static_cast<eGameMessageType>(1448));
EXPECT_EQ(eGameMessageType::MODIFY_LEGO_SCORE, static_cast<eGameMessageType>(1459));
EXPECT_EQ(eGameMessageType::RESTORE_TO_POST_LOAD_STATS, static_cast<eGameMessageType>(1468));
EXPECT_EQ(eGameMessageType::SET_RAIL_MOVEMENT, static_cast<eGameMessageType>(1471));
EXPECT_EQ(eGameMessageType::START_RAIL_MOVEMENT, static_cast<eGameMessageType>(1472));
EXPECT_EQ(eGameMessageType::CANCEL_RAIL_MOVEMENT, static_cast<eGameMessageType>(1474));
EXPECT_EQ(eGameMessageType::CLIENT_RAIL_MOVEMENT_READY, static_cast<eGameMessageType>(1476));
EXPECT_EQ(eGameMessageType::PLAYER_RAIL_ARRIVED_NOTIFICATION, static_cast<eGameMessageType>(1477));
EXPECT_EQ(eGameMessageType::UPDATE_PLAYER_STATISTIC, static_cast<eGameMessageType>(1481));
EXPECT_EQ(eGameMessageType::MODULAR_ASSEMBLY_NIF_COMPLETED, static_cast<eGameMessageType>(1498));
EXPECT_EQ(eGameMessageType::NOTIFY_NOT_ENOUGH_INV_SPACE, static_cast<eGameMessageType>(1516));
EXPECT_EQ(eGameMessageType::TEAM_SET_LEADER, static_cast<eGameMessageType>(1557));
EXPECT_EQ(eGameMessageType::TEAM_INVITE_CONFIRM, static_cast<eGameMessageType>(1558));
EXPECT_EQ(eGameMessageType::TEAM_GET_STATUS_RESPONSE, static_cast<eGameMessageType>(1559));
EXPECT_EQ(eGameMessageType::TEAM_ADD_PLAYER, static_cast<eGameMessageType>(1562));
EXPECT_EQ(eGameMessageType::TEAM_REMOVE_PLAYER, static_cast<eGameMessageType>(1563));
EXPECT_EQ(eGameMessageType::START_CELEBRATION_EFFECT, static_cast<eGameMessageType>(1618));
EXPECT_EQ(eGameMessageType::ADD_BUFF, static_cast<eGameMessageType>(1647));
EXPECT_EQ(eGameMessageType::SERVER_DONE_LOADING_ALL_OBJECTS, static_cast<eGameMessageType>(1642));
EXPECT_EQ(eGameMessageType::PLACE_PROPERTY_MODEL, static_cast<eGameMessageType>(1170));
EXPECT_EQ(eGameMessageType::VEHICLE_NOTIFY_HIT_IMAGINATION_SERVER, static_cast<eGameMessageType>(1606));
EXPECT_EQ(eGameMessageType::ADD_RUN_SPEED_MODIFIER, static_cast<eGameMessageType>(1505));
EXPECT_EQ(eGameMessageType::GET_HOT_PROPERTY_DATA, static_cast<eGameMessageType>(1511));
EXPECT_EQ(eGameMessageType::SEND_HOT_PROPERTY_DATA, static_cast<eGameMessageType>(1510));
EXPECT_EQ(eGameMessageType::REMOVE_RUN_SPEED_MODIFIER, static_cast<eGameMessageType>(1506));
EXPECT_EQ(eGameMessageType::UPDATE_PROPERTY_PERFORMANCE_COST, static_cast<eGameMessageType>(1547));
EXPECT_EQ(eGameMessageType::PROPERTY_ENTRANCE_BEGIN, static_cast<eGameMessageType>(1553));
EXPECT_EQ(eGameMessageType::SET_RESURRECT_RESTORE_VALUES, static_cast<eGameMessageType>(1591));
EXPECT_EQ(eGameMessageType::VEHICLE_STOP_BOOST, static_cast<eGameMessageType>(1617));
EXPECT_EQ(eGameMessageType::REMOVE_BUFF, static_cast<eGameMessageType>(1648));
EXPECT_EQ(eGameMessageType::REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES, static_cast<eGameMessageType>(1666));
EXPECT_EQ(eGameMessageType::RESPONSE_MOVE_ITEM_BETWEEN_INVENTORY_TYPES, static_cast<eGameMessageType>(1667));
EXPECT_EQ(eGameMessageType::PLAYER_SET_CAMERA_CYCLING_MODE, static_cast<eGameMessageType>(1676));
EXPECT_EQ(eGameMessageType::SET_MOUNT_INVENTORY_ID, static_cast<eGameMessageType>(1727));
EXPECT_EQ(eGameMessageType::NOTIFY_SERVER_LEVEL_PROCESSING_COMPLETE, static_cast<eGameMessageType>(1734));
EXPECT_EQ(eGameMessageType::NOTIFY_LEVEL_REWARDS, static_cast<eGameMessageType>(1735));
EXPECT_EQ(eGameMessageType::DISMOUNT_COMPLETE, static_cast<eGameMessageType>(1756));
EXPECT_EQ(eGameMessageType::MARK_INVENTORY_ITEM_AS_ACTIVE, static_cast<eGameMessageType>(1767));
EXPECT_EQ(MessageType::Game::TELEPORT, static_cast<MessageType::Game>(19));
EXPECT_EQ(MessageType::Game::SET_PLAYER_CONTROL_SCHEME, static_cast<MessageType::Game>(26));
EXPECT_EQ(MessageType::Game::DROP_CLIENT_LOOT, static_cast<MessageType::Game>(30));
EXPECT_EQ(MessageType::Game::DIE, static_cast<MessageType::Game>(37));
EXPECT_EQ(MessageType::Game::REQUEST_DIE, static_cast<MessageType::Game>(38));
EXPECT_EQ(MessageType::Game::PLAY_EMOTE, static_cast<MessageType::Game>(41));
EXPECT_EQ(MessageType::Game::PLAY_ANIMATION, static_cast<MessageType::Game>(43));
EXPECT_EQ(MessageType::Game::CONTROL_BEHAVIORS, static_cast<MessageType::Game>(48));
EXPECT_EQ(MessageType::Game::SET_NAME, static_cast<MessageType::Game>(72));
EXPECT_EQ(MessageType::Game::ECHO_START_SKILL, static_cast<MessageType::Game>(118));
EXPECT_EQ(MessageType::Game::START_SKILL, static_cast<MessageType::Game>(119));
EXPECT_EQ(MessageType::Game::VERIFY_ACK, static_cast<MessageType::Game>(121));
EXPECT_EQ(MessageType::Game::ADD_SKILL, static_cast<MessageType::Game>(127));
EXPECT_EQ(MessageType::Game::REMOVE_SKILL, static_cast<MessageType::Game>(128));
EXPECT_EQ(MessageType::Game::SET_CURRENCY, static_cast<MessageType::Game>(133));
EXPECT_EQ(MessageType::Game::PICKUP_CURRENCY, static_cast<MessageType::Game>(137));
EXPECT_EQ(MessageType::Game::PICKUP_ITEM, static_cast<MessageType::Game>(139));
EXPECT_EQ(MessageType::Game::TEAM_PICKUP_ITEM, static_cast<MessageType::Game>(140));
EXPECT_EQ(MessageType::Game::PLAY_FX_EFFECT, static_cast<MessageType::Game>(154));
EXPECT_EQ(MessageType::Game::STOP_FX_EFFECT, static_cast<MessageType::Game>(155));
EXPECT_EQ(MessageType::Game::REQUEST_RESURRECT, static_cast<MessageType::Game>(159));
EXPECT_EQ(MessageType::Game::RESURRECT, static_cast<MessageType::Game>(160));
EXPECT_EQ(MessageType::Game::PUSH_EQUIPPED_ITEMS_STATE, static_cast<MessageType::Game>(191));
EXPECT_EQ(MessageType::Game::POP_EQUIPPED_ITEMS_STATE, static_cast<MessageType::Game>(192));
EXPECT_EQ(MessageType::Game::SET_GM_LEVEL, static_cast<MessageType::Game>(193));
EXPECT_EQ(MessageType::Game::SET_STUNNED, static_cast<MessageType::Game>(198));
EXPECT_EQ(MessageType::Game::SET_STUN_IMMUNITY, static_cast<MessageType::Game>(200));
EXPECT_EQ(MessageType::Game::KNOCKBACK, static_cast<MessageType::Game>(202));
EXPECT_EQ(MessageType::Game::REBUILD_CANCEL, static_cast<MessageType::Game>(209));
EXPECT_EQ(MessageType::Game::ENABLE_REBUILD, static_cast<MessageType::Game>(213));
EXPECT_EQ(MessageType::Game::MOVE_ITEM_IN_INVENTORY, static_cast<MessageType::Game>(224));
EXPECT_EQ(MessageType::Game::ADD_ITEM_TO_INVENTORY_CLIENT_SYNC, static_cast<MessageType::Game>(227));
EXPECT_EQ(MessageType::Game::REMOVE_ITEM_FROM_INVENTORY, static_cast<MessageType::Game>(230));
EXPECT_EQ(MessageType::Game::EQUIP_INVENTORY, static_cast<MessageType::Game>(231));
EXPECT_EQ(MessageType::Game::UN_EQUIP_INVENTORY, static_cast<MessageType::Game>(233));
EXPECT_EQ(MessageType::Game::OFFER_MISSION, static_cast<MessageType::Game>(248));
EXPECT_EQ(MessageType::Game::RESPOND_TO_MISSION, static_cast<MessageType::Game>(249));
EXPECT_EQ(MessageType::Game::NOTIFY_MISSION, static_cast<MessageType::Game>(254));
EXPECT_EQ(MessageType::Game::NOTIFY_MISSION_TASK, static_cast<MessageType::Game>(255));
EXPECT_EQ(MessageType::Game::REBUILD_NOTIFY_STATE, static_cast<MessageType::Game>(336));
EXPECT_EQ(MessageType::Game::TERMINATE_INTERACTION, static_cast<MessageType::Game>(357));
EXPECT_EQ(MessageType::Game::SERVER_TERMINATE_INTERACTION, static_cast<MessageType::Game>(358));
EXPECT_EQ(MessageType::Game::REQUEST_USE, static_cast<MessageType::Game>(364));
EXPECT_EQ(MessageType::Game::VENDOR_OPEN_WINDOW, static_cast<MessageType::Game>(369));
EXPECT_EQ(MessageType::Game::BUY_FROM_VENDOR, static_cast<MessageType::Game>(373));
EXPECT_EQ(MessageType::Game::SELL_TO_VENDOR, static_cast<MessageType::Game>(374));
EXPECT_EQ(MessageType::Game::TEAM_SET_OFF_WORLD_FLAG, static_cast<MessageType::Game>(383));
EXPECT_EQ(MessageType::Game::SET_INVENTORY_SIZE, static_cast<MessageType::Game>(389));
EXPECT_EQ(MessageType::Game::ACKNOWLEDGE_POSSESSION, static_cast<MessageType::Game>(391));
EXPECT_EQ(MessageType::Game::SET_SHOOTING_GALLERY_PARAMS, static_cast<MessageType::Game>(400));
EXPECT_EQ(MessageType::Game::REQUEST_ACTIVITY_START_STOP, static_cast<MessageType::Game>(402));
EXPECT_EQ(MessageType::Game::REQUEST_ACTIVITY_ENTER, static_cast<MessageType::Game>(403));
EXPECT_EQ(MessageType::Game::REQUEST_ACTIVITY_EXIT, static_cast<MessageType::Game>(404));
EXPECT_EQ(MessageType::Game::ACTIVITY_ENTER, static_cast<MessageType::Game>(405));
EXPECT_EQ(MessageType::Game::ACTIVITY_EXIT, static_cast<MessageType::Game>(406));
EXPECT_EQ(MessageType::Game::ACTIVITY_START, static_cast<MessageType::Game>(407));
EXPECT_EQ(MessageType::Game::ACTIVITY_STOP, static_cast<MessageType::Game>(408));
EXPECT_EQ(MessageType::Game::SHOOTING_GALLERY_CLIENT_AIM_UPDATE, static_cast<MessageType::Game>(409));
EXPECT_EQ(MessageType::Game::SHOOTING_GALLERY_FIRE, static_cast<MessageType::Game>(411));
EXPECT_EQ(MessageType::Game::REQUEST_VENDOR_STATUS_UPDATE, static_cast<MessageType::Game>(416));
EXPECT_EQ(MessageType::Game::VENDOR_STATUS_UPDATE, static_cast<MessageType::Game>(417));
EXPECT_EQ(MessageType::Game::NOTIFY_CLIENT_SHOOTING_GALLERY_SCORE, static_cast<MessageType::Game>(425));
EXPECT_EQ(MessageType::Game::CONSUME_CLIENT_ITEM, static_cast<MessageType::Game>(427));
EXPECT_EQ(MessageType::Game::CLIENT_ITEM_CONSUMED, static_cast<MessageType::Game>(428));
EXPECT_EQ(MessageType::Game::UPDATE_SHOOTING_GALLERY_ROTATION, static_cast<MessageType::Game>(448));
EXPECT_EQ(MessageType::Game::SET_FLAG, static_cast<MessageType::Game>(471));
EXPECT_EQ(MessageType::Game::NOTIFY_CLIENT_FLAG_CHANGE, static_cast<MessageType::Game>(472));
EXPECT_EQ(MessageType::Game::VENDOR_TRANSACTION_RESULT, static_cast<MessageType::Game>(476));
EXPECT_EQ(MessageType::Game::HAS_BEEN_COLLECTED, static_cast<MessageType::Game>(486));
EXPECT_EQ(MessageType::Game::DISPLAY_CHAT_BUBBLE, static_cast<MessageType::Game>(495));
EXPECT_EQ(MessageType::Game::SPAWN_PET, static_cast<MessageType::Game>(498));
EXPECT_EQ(MessageType::Game::DESPAWN_PET, static_cast<MessageType::Game>(499));
EXPECT_EQ(MessageType::Game::PLAYER_LOADED, static_cast<MessageType::Game>(505));
EXPECT_EQ(MessageType::Game::PLAYER_READY, static_cast<MessageType::Game>(509));
EXPECT_EQ(MessageType::Game::REQUEST_LINKED_MISSION, static_cast<MessageType::Game>(515));
EXPECT_EQ(MessageType::Game::INVALID_ZONE_TRANSFER_LIST, static_cast<MessageType::Game>(519));
EXPECT_EQ(MessageType::Game::MISSION_DIALOGUE_OK, static_cast<MessageType::Game>(520));
EXPECT_EQ(MessageType::Game::DISPLAY_MESSAGE_BOX, static_cast<MessageType::Game>(529));
EXPECT_EQ(MessageType::Game::MESSAGE_BOX_RESPOND, static_cast<MessageType::Game>(530));
EXPECT_EQ(MessageType::Game::CHOICE_BOX_RESPOND, static_cast<MessageType::Game>(531));
EXPECT_EQ(MessageType::Game::SMASH, static_cast<MessageType::Game>(537));
EXPECT_EQ(MessageType::Game::UN_SMASH, static_cast<MessageType::Game>(538));
EXPECT_EQ(MessageType::Game::PLACE_MODEL_RESPONSE, static_cast<MessageType::Game>(547));
EXPECT_EQ(MessageType::Game::SET_SHOOTING_GALLERY_RETICULE_EFFECT, static_cast<MessageType::Game>(546));
EXPECT_EQ(MessageType::Game::SET_JET_PACK_MODE, static_cast<MessageType::Game>(561));
EXPECT_EQ(MessageType::Game::REGISTER_PET_ID, static_cast<MessageType::Game>(565));
EXPECT_EQ(MessageType::Game::REGISTER_PET_DBID, static_cast<MessageType::Game>(566));
EXPECT_EQ(MessageType::Game::SHOW_ACTIVITY_COUNTDOWN, static_cast<MessageType::Game>(568));
EXPECT_EQ(MessageType::Game::START_ACTIVITY_TIME, static_cast<MessageType::Game>(576));
EXPECT_EQ(MessageType::Game::ACTIVITY_PAUSE, static_cast<MessageType::Game>(602));
EXPECT_EQ(MessageType::Game::USE_NON_EQUIPMENT_ITEM, static_cast<MessageType::Game>(603));
EXPECT_EQ(MessageType::Game::USE_ITEM_RESULT, static_cast<MessageType::Game>(607));
EXPECT_EQ(MessageType::Game::COMMAND_PET, static_cast<MessageType::Game>(640));
EXPECT_EQ(MessageType::Game::PET_RESPONSE, static_cast<MessageType::Game>(641));
EXPECT_EQ(MessageType::Game::REQUEST_ACTIVITY_SUMMARY_LEADERBOARD_DATA, static_cast<MessageType::Game>(648));
EXPECT_EQ(MessageType::Game::SEND_ACTIVITY_SUMMARY_LEADERBOARD_DATA, static_cast<MessageType::Game>(649));
EXPECT_EQ(MessageType::Game::NOTIFY_OBJECT, static_cast<MessageType::Game>(656));
EXPECT_EQ(MessageType::Game::CLIENT_NOTIFY_PET, static_cast<MessageType::Game>(659));
EXPECT_EQ(MessageType::Game::NOTIFY_PET, static_cast<MessageType::Game>(660));
EXPECT_EQ(MessageType::Game::NOTIFY_PET_TAMING_MINIGAME, static_cast<MessageType::Game>(661));
EXPECT_EQ(MessageType::Game::START_SERVER_PET_MINIGAME_TIMER, static_cast<MessageType::Game>(662));
EXPECT_EQ(MessageType::Game::CLIENT_EXIT_TAMING_MINIGAME, static_cast<MessageType::Game>(663));
EXPECT_EQ(MessageType::Game::PET_NAME_CHANGED, static_cast<MessageType::Game>(686));
EXPECT_EQ(MessageType::Game::PET_TAMING_MINIGAME_RESULT, static_cast<MessageType::Game>(667));
EXPECT_EQ(MessageType::Game::PET_TAMING_TRY_BUILD_RESULT, static_cast<MessageType::Game>(668));
EXPECT_EQ(MessageType::Game::NOTIFY_TAMING_BUILD_SUCCESS, static_cast<MessageType::Game>(673));
EXPECT_EQ(MessageType::Game::NOTIFY_TAMING_MODEL_LOADED_ON_SERVER, static_cast<MessageType::Game>(674));
EXPECT_EQ(MessageType::Game::ACTIVATE_BUBBLE_BUFF, static_cast<MessageType::Game>(678));
EXPECT_EQ(MessageType::Game::DECTIVATE_BUBBLE_BUFF, static_cast<MessageType::Game>(679));
EXPECT_EQ(MessageType::Game::ADD_PET_TO_PLAYER, static_cast<MessageType::Game>(681));
EXPECT_EQ(MessageType::Game::REQUEST_SET_PET_NAME, static_cast<MessageType::Game>(683));
EXPECT_EQ(MessageType::Game::SET_PET_NAME, static_cast<MessageType::Game>(684));
EXPECT_EQ(MessageType::Game::NOTIFY_TAMING_PUZZLE_SELECTED, static_cast<MessageType::Game>(675));
EXPECT_EQ(MessageType::Game::SHOW_PET_ACTION_BUTTON, static_cast<MessageType::Game>(692));
EXPECT_EQ(MessageType::Game::SET_EMOTE_LOCK_STATE, static_cast<MessageType::Game>(693));
EXPECT_EQ(MessageType::Game::USE_ITEM_REQUIREMENTS_RESPONSE, static_cast<MessageType::Game>(703));
EXPECT_EQ(MessageType::Game::PLAY_EMBEDDED_EFFECT_ON_ALL_CLIENTS_NEAR_OBJECT, static_cast<MessageType::Game>(713));
EXPECT_EQ(MessageType::Game::DOWNLOAD_PROPERTY_DATA, static_cast<MessageType::Game>(716));
EXPECT_EQ(MessageType::Game::QUERY_PROPERTY_DATA, static_cast<MessageType::Game>(717));
EXPECT_EQ(MessageType::Game::PROPERTY_EDITOR_BEGIN, static_cast<MessageType::Game>(724));
EXPECT_EQ(MessageType::Game::PROPERTY_EDITOR_END, static_cast<MessageType::Game>(725));
EXPECT_EQ(MessageType::Game::IS_MINIFIG_IN_A_BUBBLE, static_cast<MessageType::Game>(729));
EXPECT_EQ(MessageType::Game::START_PATHING, static_cast<MessageType::Game>(733));
EXPECT_EQ(MessageType::Game::ACTIVATE_BUBBLE_BUFF_FROM_SERVER, static_cast<MessageType::Game>(734));
EXPECT_EQ(MessageType::Game::DEACTIVATE_BUBBLE_BUFF_FROM_SERVER, static_cast<MessageType::Game>(735));
EXPECT_EQ(MessageType::Game::NOTIFY_CLIENT_ZONE_OBJECT, static_cast<MessageType::Game>(737));
EXPECT_EQ(MessageType::Game::UPDATE_REPUTATION, static_cast<MessageType::Game>(746));
EXPECT_EQ(MessageType::Game::PROPERTY_RENTAL_RESPONSE, static_cast<MessageType::Game>(750));
EXPECT_EQ(MessageType::Game::REQUEST_PLATFORM_RESYNC, static_cast<MessageType::Game>(760));
EXPECT_EQ(MessageType::Game::PLATFORM_RESYNC, static_cast<MessageType::Game>(761));
EXPECT_EQ(MessageType::Game::PLAY_CINEMATIC, static_cast<MessageType::Game>(762));
EXPECT_EQ(MessageType::Game::END_CINEMATIC, static_cast<MessageType::Game>(763));
EXPECT_EQ(MessageType::Game::CINEMATIC_UPDATE, static_cast<MessageType::Game>(764));
EXPECT_EQ(MessageType::Game::TOGGLE_GHOST_REFERENCE_OVERRIDE, static_cast<MessageType::Game>(767));
EXPECT_EQ(MessageType::Game::SET_GHOST_REFERENCE_POSITION, static_cast<MessageType::Game>(768));
EXPECT_EQ(MessageType::Game::FIRE_EVENT_SERVER_SIDE, static_cast<MessageType::Game>(770));
EXPECT_EQ(MessageType::Game::SCRIPT_NETWORK_VAR_UPDATE, static_cast<MessageType::Game>(781));
EXPECT_EQ(MessageType::Game::UPDATE_MODEL_FROM_CLIENT, static_cast<MessageType::Game>(793));
EXPECT_EQ(MessageType::Game::DELETE_MODEL_FROM_CLIENT, static_cast<MessageType::Game>(794));
EXPECT_EQ(MessageType::Game::PLAY_ND_AUDIO_EMITTER, static_cast<MessageType::Game>(821));
EXPECT_EQ(MessageType::Game::PLAY2_D_AMBIENT_SOUND, static_cast<MessageType::Game>(831));
EXPECT_EQ(MessageType::Game::ENTER_PROPERTY1, static_cast<MessageType::Game>(840));
EXPECT_EQ(MessageType::Game::ENTER_PROPERTY2, static_cast<MessageType::Game>(841));
EXPECT_EQ(MessageType::Game::PROPERTY_ENTRANCE_SYNC, static_cast<MessageType::Game>(842));
EXPECT_EQ(MessageType::Game::PROPERTY_SELECT_QUERY, static_cast<MessageType::Game>(845));
EXPECT_EQ(MessageType::Game::PARSE_CHAT_MESSAGE, static_cast<MessageType::Game>(850));
EXPECT_EQ(MessageType::Game::BROADCAST_TEXT_TO_CHATBOX, static_cast<MessageType::Game>(858));
EXPECT_EQ(MessageType::Game::OPEN_PROPERTY_MANAGEMENT, static_cast<MessageType::Game>(860));
EXPECT_EQ(MessageType::Game::OPEN_PROPERTY_VENDOR, static_cast<MessageType::Game>(861));
EXPECT_EQ(MessageType::Game::UPDATE_PROPERTY_OR_MODEL_FOR_FILTER_CHECK, static_cast<MessageType::Game>(863));
EXPECT_EQ(MessageType::Game::CLIENT_TRADE_REQUEST, static_cast<MessageType::Game>(868));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_REQUEST, static_cast<MessageType::Game>(869));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_INVITE, static_cast<MessageType::Game>(870));
EXPECT_EQ(MessageType::Game::CLIENT_TRADE_REPLY, static_cast<MessageType::Game>(871));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_REPLY, static_cast<MessageType::Game>(872));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_INITIAL_REPLY, static_cast<MessageType::Game>(873));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_FINAL_REPLY, static_cast<MessageType::Game>(874));
EXPECT_EQ(MessageType::Game::CLIENT_TRADE_UPDATE, static_cast<MessageType::Game>(875));
EXPECT_EQ(MessageType::Game::SERVER_SIDE_TRADE_UPDATE, static_cast<MessageType::Game>(876));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_UPDATE, static_cast<MessageType::Game>(877));
EXPECT_EQ(MessageType::Game::CLIENT_TRADE_CANCEL, static_cast<MessageType::Game>(878));
EXPECT_EQ(MessageType::Game::CLIENT_SIDE_TRADE_CANCEL, static_cast<MessageType::Game>(879));
EXPECT_EQ(MessageType::Game::CLIENT_TRADE_ACCEPT, static_cast<MessageType::Game>(880));
EXPECT_EQ(MessageType::Game::SERVER_SIDE_TRADE_ACCEPT, static_cast<MessageType::Game>(881));
EXPECT_EQ(MessageType::Game::SERVER_SIDE_TRADE_CANCEL, static_cast<MessageType::Game>(882));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_CANCEL, static_cast<MessageType::Game>(883));
EXPECT_EQ(MessageType::Game::SERVER_TRADE_ACCEPT, static_cast<MessageType::Game>(884));
EXPECT_EQ(MessageType::Game::READY_FOR_UPDATES, static_cast<MessageType::Game>(888));
EXPECT_EQ(MessageType::Game::ORIENT_TO_OBJECT, static_cast<MessageType::Game>(905));
EXPECT_EQ(MessageType::Game::ORIENT_TO_POSITION, static_cast<MessageType::Game>(906));
EXPECT_EQ(MessageType::Game::ORIENT_TO_ANGLE, static_cast<MessageType::Game>(907));
EXPECT_EQ(MessageType::Game::BOUNCER_ACTIVE_STATUS, static_cast<MessageType::Game>(942));
EXPECT_EQ(MessageType::Game::UN_USE_BBB_MODEL, static_cast<MessageType::Game>(999));
EXPECT_EQ(MessageType::Game::BBB_LOAD_ITEM_REQUEST, static_cast<MessageType::Game>(1000));
EXPECT_EQ(MessageType::Game::BBB_SAVE_REQUEST, static_cast<MessageType::Game>(1001));
EXPECT_EQ(MessageType::Game::BBB_SAVE_RESPONSE, static_cast<MessageType::Game>(1005));
EXPECT_EQ(MessageType::Game::NOTIFY_CLIENT_OBJECT, static_cast<MessageType::Game>(1042));
EXPECT_EQ(MessageType::Game::DISPLAY_ZONE_SUMMARY, static_cast<MessageType::Game>(1043));
EXPECT_EQ(MessageType::Game::ZONE_SUMMARY_DISMISSED, static_cast<MessageType::Game>(1044));
EXPECT_EQ(MessageType::Game::ACTIVITY_STATE_CHANGE_REQUEST, static_cast<MessageType::Game>(1053));
EXPECT_EQ(MessageType::Game::MODIFY_PLAYER_ZONE_STATISTIC, static_cast<MessageType::Game>(1046));
EXPECT_EQ(MessageType::Game::START_BUILDING_WITH_ITEM, static_cast<MessageType::Game>(1057));
EXPECT_EQ(MessageType::Game::START_ARRANGING_WITH_ITEM, static_cast<MessageType::Game>(1061));
EXPECT_EQ(MessageType::Game::FINISH_ARRANGING_WITH_ITEM, static_cast<MessageType::Game>(1062));
EXPECT_EQ(MessageType::Game::DONE_ARRANGING_WITH_ITEM, static_cast<MessageType::Game>(1063));
EXPECT_EQ(MessageType::Game::SET_BUILD_MODE, static_cast<MessageType::Game>(1068));
EXPECT_EQ(MessageType::Game::BUILD_MODE_SET, static_cast<MessageType::Game>(1069));
EXPECT_EQ(MessageType::Game::SET_BUILD_MODE_CONFIRMED, static_cast<MessageType::Game>(1073));
EXPECT_EQ(MessageType::Game::NOTIFY_CLIENT_FAILED_PRECONDITION, static_cast<MessageType::Game>(1081));
EXPECT_EQ(MessageType::Game::MOVE_ITEM_BETWEEN_INVENTORY_TYPES, static_cast<MessageType::Game>(1093));
EXPECT_EQ(MessageType::Game::MODULAR_BUILD_BEGIN, static_cast<MessageType::Game>(1094));
EXPECT_EQ(MessageType::Game::MODULAR_BUILD_END, static_cast<MessageType::Game>(1095));
EXPECT_EQ(MessageType::Game::MODULAR_BUILD_MOVE_AND_EQUIP, static_cast<MessageType::Game>(1096));
EXPECT_EQ(MessageType::Game::MODULAR_BUILD_FINISH, static_cast<MessageType::Game>(1097));
EXPECT_EQ(MessageType::Game::REPORT_BUG, static_cast<MessageType::Game>(1198));
EXPECT_EQ(MessageType::Game::MISSION_DIALOGUE_CANCELLED, static_cast<MessageType::Game>(1129));
EXPECT_EQ(MessageType::Game::ECHO_SYNC_SKILL, static_cast<MessageType::Game>(1144));
EXPECT_EQ(MessageType::Game::SYNC_SKILL, static_cast<MessageType::Game>(1145));
EXPECT_EQ(MessageType::Game::REQUEST_SERVER_PROJECTILE_IMPACT, static_cast<MessageType::Game>(1148));
EXPECT_EQ(MessageType::Game::DO_CLIENT_PROJECTILE_IMPACT, static_cast<MessageType::Game>(1151));
EXPECT_EQ(MessageType::Game::MODULAR_BUILD_CONVERT_MODEL, static_cast<MessageType::Game>(1155));
EXPECT_EQ(MessageType::Game::SET_PLAYER_ALLOWED_RESPAWN, static_cast<MessageType::Game>(1165));
EXPECT_EQ(MessageType::Game::UI_MESSAGE_SERVER_TO_SINGLE_CLIENT, static_cast<MessageType::Game>(1184));
EXPECT_EQ(MessageType::Game::UI_MESSAGE_SERVER_TO_ALL_CLIENTS, static_cast<MessageType::Game>(1185));
EXPECT_EQ(MessageType::Game::PET_TAMING_TRY_BUILD, static_cast<MessageType::Game>(1197));
EXPECT_EQ(MessageType::Game::REQUEST_SMASH_PLAYER, static_cast<MessageType::Game>(1202));
EXPECT_EQ(MessageType::Game::FIRE_EVENT_CLIENT_SIDE, static_cast<MessageType::Game>(1213));
EXPECT_EQ(MessageType::Game::TOGGLE_GM_INVIS, static_cast<MessageType::Game>(1218));
EXPECT_EQ(MessageType::Game::CHANGE_OBJECT_WORLD_STATE, static_cast<MessageType::Game>(1223));
EXPECT_EQ(MessageType::Game::VEHICLE_LOCK_INPUT, static_cast<MessageType::Game>(1230));
EXPECT_EQ(MessageType::Game::VEHICLE_UNLOCK_INPUT, static_cast<MessageType::Game>(1231));
EXPECT_EQ(MessageType::Game::RACING_RESET_PLAYER_TO_LAST_RESET, static_cast<MessageType::Game>(1252));
EXPECT_EQ(MessageType::Game::RACING_SERVER_SET_PLAYER_LAP_AND_PLANE, static_cast<MessageType::Game>(1253));
EXPECT_EQ(MessageType::Game::RACING_SET_PLAYER_RESET_INFO, static_cast<MessageType::Game>(1254));
EXPECT_EQ(MessageType::Game::RACING_PLAYER_INFO_RESET_FINISHED, static_cast<MessageType::Game>(1255));
EXPECT_EQ(MessageType::Game::LOCK_NODE_ROTATION, static_cast<MessageType::Game>(1260));
EXPECT_EQ(MessageType::Game::VEHICLE_SET_WHEEL_LOCK_STATE, static_cast<MessageType::Game>(1273));
EXPECT_EQ(MessageType::Game::NOTIFY_VEHICLE_OF_RACING_OBJECT, static_cast<MessageType::Game>(1276));
EXPECT_EQ(MessageType::Game::SET_NAME_BILLBOARD_STATE, static_cast<MessageType::Game>(1284));
EXPECT_EQ(MessageType::Game::PLAYER_REACHED_RESPAWN_CHECKPOINT, static_cast<MessageType::Game>(1296));
EXPECT_EQ(MessageType::Game::HANDLE_UGC_POST_DELETE_BASED_ON_EDIT_MODE, static_cast<MessageType::Game>(1300));
EXPECT_EQ(MessageType::Game::HANDLE_UGC_POST_CREATE_BASED_ON_EDIT_MODE, static_cast<MessageType::Game>(1301));
EXPECT_EQ(MessageType::Game::PROPERTY_CONTENTS_FROM_CLIENT, static_cast<MessageType::Game>(1305));
EXPECT_EQ(MessageType::Game::GET_MODELS_ON_PROPERTY, static_cast<MessageType::Game>(1306));
EXPECT_EQ(MessageType::Game::MATCH_REQUEST, static_cast<MessageType::Game>(1308));
EXPECT_EQ(MessageType::Game::MATCH_RESPONSE, static_cast<MessageType::Game>(1309));
EXPECT_EQ(MessageType::Game::MATCH_UPDATE, static_cast<MessageType::Game>(1310));
EXPECT_EQ(MessageType::Game::MODULE_ASSEMBLY_DB_DATA_FOR_CLIENT, static_cast<MessageType::Game>(1131));
EXPECT_EQ(MessageType::Game::MODULE_ASSEMBLY_QUERY_DATA, static_cast<MessageType::Game>(1132));
EXPECT_EQ(MessageType::Game::SHOW_BILLBOARD_INTERACT_ICON, static_cast<MessageType::Game>(1337));
EXPECT_EQ(MessageType::Game::CHANGE_IDLE_FLAGS, static_cast<MessageType::Game>(1338));
EXPECT_EQ(MessageType::Game::VEHICLE_ADD_PASSIVE_BOOST_ACTION, static_cast<MessageType::Game>(1340));
EXPECT_EQ(MessageType::Game::VEHICLE_REMOVE_PASSIVE_BOOST_ACTION, static_cast<MessageType::Game>(1341));
EXPECT_EQ(MessageType::Game::NOTIFY_SERVER_VEHICLE_ADD_PASSIVE_BOOST_ACTION, static_cast<MessageType::Game>(1342));
EXPECT_EQ(MessageType::Game::NOTIFY_SERVER_VEHICLE_REMOVE_PASSIVE_BOOST_ACTION, static_cast<MessageType::Game>(1343));
EXPECT_EQ(MessageType::Game::VEHICLE_ADD_SLOWDOWN_ACTION, static_cast<MessageType::Game>(1344));
EXPECT_EQ(MessageType::Game::VEHICLE_REMOVE_SLOWDOWN_ACTION, static_cast<MessageType::Game>(1345));
EXPECT_EQ(MessageType::Game::NOTIFY_SERVER_VEHICLE_ADD_SLOWDOWN_ACTION, static_cast<MessageType::Game>(1346));
EXPECT_EQ(MessageType::Game::NOTIFY_SERVER_VEHICLE_REMOVE_SLOWDOWN_ACTION, static_cast<MessageType::Game>(1347));
EXPECT_EQ(MessageType::Game::BUYBACK_FROM_VENDOR, static_cast<MessageType::Game>(1350));
EXPECT_EQ(MessageType::Game::SET_PROPERTY_ACCESS, static_cast<MessageType::Game>(1366));
EXPECT_EQ(MessageType::Game::ZONE_PROPERTY_MODEL_PLACED, static_cast<MessageType::Game>(1369));
EXPECT_EQ(MessageType::Game::ZONE_PROPERTY_MODEL_ROTATED, static_cast<MessageType::Game>(1370));
EXPECT_EQ(MessageType::Game::ZONE_PROPERTY_MODEL_REMOVED_WHILE_EQUIPPED, static_cast<MessageType::Game>(1371));
EXPECT_EQ(MessageType::Game::ZONE_PROPERTY_MODEL_EQUIPPED, static_cast<MessageType::Game>(1372));
EXPECT_EQ(MessageType::Game::ZONE_PROPERTY_MODEL_PICKED_UP, static_cast<MessageType::Game>(1373));
EXPECT_EQ(MessageType::Game::ZONE_PROPERTY_MODEL_REMOVED, static_cast<MessageType::Game>(1374));
EXPECT_EQ(MessageType::Game::NOTIFY_RACING_CLIENT, static_cast<MessageType::Game>(1390));
EXPECT_EQ(MessageType::Game::RACING_PLAYER_HACK_CAR, static_cast<MessageType::Game>(1391));
EXPECT_EQ(MessageType::Game::RACING_PLAYER_LOADED, static_cast<MessageType::Game>(1392));
EXPECT_EQ(MessageType::Game::RACING_CLIENT_READY, static_cast<MessageType::Game>(1393));
EXPECT_EQ(MessageType::Game::UPDATE_CHAT_MODE, static_cast<MessageType::Game>(1395));
EXPECT_EQ(MessageType::Game::VEHICLE_NOTIFY_FINISHED_RACE, static_cast<MessageType::Game>(1396));
EXPECT_EQ(MessageType::Game::SET_CONSUMABLE_ITEM, static_cast<MessageType::Game>(1409));
EXPECT_EQ(MessageType::Game::SET_STATUS_IMMUNITY, static_cast<MessageType::Game>(1435));
EXPECT_EQ(MessageType::Game::SET_PET_NAME_MODERATED, static_cast<MessageType::Game>(1448));
EXPECT_EQ(MessageType::Game::MODIFY_LEGO_SCORE, static_cast<MessageType::Game>(1459));
EXPECT_EQ(MessageType::Game::RESTORE_TO_POST_LOAD_STATS, static_cast<MessageType::Game>(1468));
EXPECT_EQ(MessageType::Game::SET_RAIL_MOVEMENT, static_cast<MessageType::Game>(1471));
EXPECT_EQ(MessageType::Game::START_RAIL_MOVEMENT, static_cast<MessageType::Game>(1472));
EXPECT_EQ(MessageType::Game::CANCEL_RAIL_MOVEMENT, static_cast<MessageType::Game>(1474));
EXPECT_EQ(MessageType::Game::CLIENT_RAIL_MOVEMENT_READY, static_cast<MessageType::Game>(1476));
EXPECT_EQ(MessageType::Game::PLAYER_RAIL_ARRIVED_NOTIFICATION, static_cast<MessageType::Game>(1477));
EXPECT_EQ(MessageType::Game::UPDATE_PLAYER_STATISTIC, static_cast<MessageType::Game>(1481));
EXPECT_EQ(MessageType::Game::MODULAR_ASSEMBLY_NIF_COMPLETED, static_cast<MessageType::Game>(1498));
EXPECT_EQ(MessageType::Game::NOTIFY_NOT_ENOUGH_INV_SPACE, static_cast<MessageType::Game>(1516));
EXPECT_EQ(MessageType::Game::TEAM_SET_LEADER, static_cast<MessageType::Game>(1557));
EXPECT_EQ(MessageType::Game::TEAM_INVITE_CONFIRM, static_cast<MessageType::Game>(1558));
EXPECT_EQ(MessageType::Game::TEAM_GET_STATUS_RESPONSE, static_cast<MessageType::Game>(1559));
EXPECT_EQ(MessageType::Game::TEAM_ADD_PLAYER, static_cast<MessageType::Game>(1562));
EXPECT_EQ(MessageType::Game::TEAM_REMOVE_PLAYER, static_cast<MessageType::Game>(1563));
EXPECT_EQ(MessageType::Game::START_CELEBRATION_EFFECT, static_cast<MessageType::Game>(1618));
EXPECT_EQ(MessageType::Game::ADD_BUFF, static_cast<MessageType::Game>(1647));
EXPECT_EQ(MessageType::Game::SERVER_DONE_LOADING_ALL_OBJECTS, static_cast<MessageType::Game>(1642));
EXPECT_EQ(MessageType::Game::PLACE_PROPERTY_MODEL, static_cast<MessageType::Game>(1170));
EXPECT_EQ(MessageType::Game::VEHICLE_NOTIFY_HIT_IMAGINATION_SERVER, static_cast<MessageType::Game>(1606));
EXPECT_EQ(MessageType::Game::ADD_RUN_SPEED_MODIFIER, static_cast<MessageType::Game>(1505));
EXPECT_EQ(MessageType::Game::GET_HOT_PROPERTY_DATA, static_cast<MessageType::Game>(1511));
EXPECT_EQ(MessageType::Game::SEND_HOT_PROPERTY_DATA, static_cast<MessageType::Game>(1510));
EXPECT_EQ(MessageType::Game::REMOVE_RUN_SPEED_MODIFIER, static_cast<MessageType::Game>(1506));
EXPECT_EQ(MessageType::Game::UPDATE_PROPERTY_PERFORMANCE_COST, static_cast<MessageType::Game>(1547));
EXPECT_EQ(MessageType::Game::PROPERTY_ENTRANCE_BEGIN, static_cast<MessageType::Game>(1553));
EXPECT_EQ(MessageType::Game::SET_RESURRECT_RESTORE_VALUES, static_cast<MessageType::Game>(1591));
EXPECT_EQ(MessageType::Game::VEHICLE_STOP_BOOST, static_cast<MessageType::Game>(1617));
EXPECT_EQ(MessageType::Game::REMOVE_BUFF, static_cast<MessageType::Game>(1648));
EXPECT_EQ(MessageType::Game::REQUEST_MOVE_ITEM_BETWEEN_INVENTORY_TYPES, static_cast<MessageType::Game>(1666));
EXPECT_EQ(MessageType::Game::RESPONSE_MOVE_ITEM_BETWEEN_INVENTORY_TYPES, static_cast<MessageType::Game>(1667));
EXPECT_EQ(MessageType::Game::PLAYER_SET_CAMERA_CYCLING_MODE, static_cast<MessageType::Game>(1676));
EXPECT_EQ(MessageType::Game::SET_MOUNT_INVENTORY_ID, static_cast<MessageType::Game>(1727));
EXPECT_EQ(MessageType::Game::NOTIFY_SERVER_LEVEL_PROCESSING_COMPLETE, static_cast<MessageType::Game>(1734));
EXPECT_EQ(MessageType::Game::NOTIFY_LEVEL_REWARDS, static_cast<MessageType::Game>(1735));
EXPECT_EQ(MessageType::Game::DISMOUNT_COMPLETE, static_cast<MessageType::Game>(1756));
EXPECT_EQ(MessageType::Game::MARK_INVENTORY_ITEM_AS_ACTIVE, static_cast<MessageType::Game>(1767));
}