mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-07 11:14:11 +00:00
chore: cleanup LU(W)string writing (#1188)
* chore: cleanup LU(W)string writing and add methods for reading remove redunent "packet" from packet reading helpers move write header to bitstreamutils since it's not packet related add tests for reading/writing LU(W)Strings * remove un-needed function defintions in header * make reading and writing more efficient * p p * quotes * remove unneeded default --------- Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "GameMessageHandler.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "PacketUtils.h"
|
||||
#include "BitStreamUtils.h"
|
||||
#include "dServer.h"
|
||||
#include "../thirdparty/raknet/Source/RakNetworkFactory.h"
|
||||
#include <future>
|
||||
@@ -315,7 +315,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
|
||||
if (success) {
|
||||
//Broadcast our startSkill:
|
||||
RakNet::BitStream bitStreamLocal;
|
||||
PacketUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
bitStreamLocal.Write(entity->GetObjectID());
|
||||
|
||||
EchoStartSkill echoStartSkill;
|
||||
@@ -337,7 +337,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
|
||||
|
||||
case eGameMessageType::SYNC_SKILL: {
|
||||
RakNet::BitStream bitStreamLocal;
|
||||
PacketUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
BitStreamUtils::WriteHeader(bitStreamLocal, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
bitStreamLocal.Write(entity->GetObjectID());
|
||||
//bitStreamLocal.Write((unsigned short)eGameMessageType::ECHO_SYNC_SKILL);
|
||||
//bitStreamLocal.Write(inStream);
|
||||
|
Reference in New Issue
Block a user