mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 23:08:31 +00:00
Consolidate serviceID enums into one enum (#1855)
* merge ServerType and ServiceID enums * rename eConnectionType to ServiceType in preparation for enum unification * unify ServiceID and ServiceType enums * shrink ServiceType to an 8-bit integer * fix linux compilation error and update gamemsg test * return to uint16_t * Update dNet/AuthPackets.cpp Use cast instead of padding Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> * Add default case to MasterServer.cpp * move ref back to type * Another formatting fix * Fix comment to be more accurate --------- Co-authored-by: jadebenn <9892985+jadebenn@users.noreply.github.com> Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include "EchoSyncSkill.h"
|
||||
#include "eMissionTaskType.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "eConnectionType.h"
|
||||
#include "ServiceType.h"
|
||||
#include "MessageType/Game.h"
|
||||
#include "ePlayerFlag.h"
|
||||
#include "dConfig.h"
|
||||
@@ -353,7 +353,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
|
||||
if (success) {
|
||||
//Broadcast our startSkill:
|
||||
RakNet::BitStream bitStreamLocal;
|
||||
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
|
||||
BitStreamUtils::WriteHeader(bitStreamLocal, ServiceType::CLIENT, MessageType::Client::GAME_MSG);
|
||||
bitStreamLocal.Write(entity->GetObjectID());
|
||||
|
||||
EchoStartSkill echoStartSkill;
|
||||
@@ -375,7 +375,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
|
||||
|
||||
case MessageType::Game::SYNC_SKILL: {
|
||||
RakNet::BitStream bitStreamLocal;
|
||||
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, MessageType::Client::GAME_MSG);
|
||||
BitStreamUtils::WriteHeader(bitStreamLocal, ServiceType::CLIENT, MessageType::Client::GAME_MSG);
|
||||
bitStreamLocal.Write(entity->GetObjectID());
|
||||
|
||||
SyncSkill sync = SyncSkill(inStream); // inStream replaced &bitStream
|
||||
|
@@ -40,7 +40,7 @@
|
||||
#include "eQuickBuildFailReason.h"
|
||||
#include "eControlScheme.h"
|
||||
#include "eStateChangeType.h"
|
||||
#include "eConnectionType.h"
|
||||
#include "ServiceType.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -2208,7 +2208,7 @@ void GameMessages::HandleUnUseModel(RakNet::BitStream& inStream, Entity* entity,
|
||||
|
||||
if (unknown) {
|
||||
CBITSTREAM;
|
||||
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::BLUEPRINT_SAVE_RESPONSE);
|
||||
BitStreamUtils::WriteHeader(bitStream, ServiceType::CLIENT, MessageType::Client::BLUEPRINT_SAVE_RESPONSE);
|
||||
bitStream.Write<LWOOBJID>(LWOOBJID_EMPTY); //always zero so that a check on the client passes
|
||||
bitStream.Write(eBlueprintSaveResponseType::PlacementFailed); // Sending a non-zero error code here prevents the client from deleting its in progress build for some reason?
|
||||
bitStream.Write<uint32_t>(0);
|
||||
@@ -2460,7 +2460,7 @@ void GameMessages::HandleBBBLoadItemRequest(RakNet::BitStream& inStream, Entity*
|
||||
|
||||
void GameMessages::SendBlueprintLoadItemResponse(const SystemAddress& sysAddr, bool success, LWOOBJID oldItemId, LWOOBJID newItemId) {
|
||||
CBITSTREAM;
|
||||
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::BLUEPRINT_LOAD_RESPONSE_ITEMID);
|
||||
BitStreamUtils::WriteHeader(bitStream, ServiceType::CLIENT, MessageType::Client::BLUEPRINT_LOAD_RESPONSE_ITEMID);
|
||||
bitStream.Write<uint8_t>(success);
|
||||
bitStream.Write<LWOOBJID>(oldItemId);
|
||||
bitStream.Write<LWOOBJID>(newItemId);
|
||||
@@ -2652,7 +2652,7 @@ void GameMessages::HandleBBBSaveRequest(RakNet::BitStream& inStream, Entity* ent
|
||||
uint32_t sd0Size{};
|
||||
for (const auto& chunk : newSd0) sd0Size += chunk.size();
|
||||
CBITSTREAM;
|
||||
BitStreamUtils::WriteHeader(bitStream, eConnectionType::CLIENT, MessageType::Client::BLUEPRINT_SAVE_RESPONSE);
|
||||
BitStreamUtils::WriteHeader(bitStream, ServiceType::CLIENT, MessageType::Client::BLUEPRINT_SAVE_RESPONSE);
|
||||
bitStream.Write(localId);
|
||||
bitStream.Write(eBlueprintSaveResponseType::EverythingWorked);
|
||||
bitStream.Write<uint32_t>(1);
|
||||
|
Reference in New Issue
Block a user