mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Make PacketUtils only for packetAdd BitstreamUtils and make better read/writesupdate
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "eGameActivity.h"
|
||||
|
||||
#include "dServer.h"
|
||||
#include "PacketUtils.h"
|
||||
#include "Spawner.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "Preconditions.h"
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include <iomanip>
|
||||
|
||||
#include "Entity.h"
|
||||
#include "PacketUtils.h"
|
||||
|
||||
#include "CDClientManager.h"
|
||||
#include "GameMessages.h"
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include "PropertyEntranceComponent.h"
|
||||
#include "RocketLaunchLupComponent.h"
|
||||
#include "dServer.h"
|
||||
#include "PacketUtils.h"
|
||||
#include "BitstreamUtils.h"
|
||||
#include "eObjectWorldState.h"
|
||||
#include "eConnectionType.h"
|
||||
#include "eMasterMessageType.h"
|
||||
@@ -137,7 +137,7 @@ LWOCLONEID RocketLaunchpadControlComponent::GetSelectedCloneId(LWOOBJID player)
|
||||
|
||||
void RocketLaunchpadControlComponent::TellMasterToPrepZone(int zoneID) {
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::PREP_ZONE);
|
||||
BitstreamUtils::WriteHeader(bitStream, eConnectionType::MASTER, eMasterMessageType::PREP_ZONE);
|
||||
bitStream.Write(zoneID);
|
||||
Game::server->SendToMaster(&bitStream);
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "Player.h"
|
||||
#include "PacketUtils.h"
|
||||
#include "BitstreamUtils.h"
|
||||
#include "dServer.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "dZoneManager.h"
|
||||
@@ -516,7 +516,7 @@ void ActivityInstance::StartZone() {
|
||||
// only make a team if we have more than one participant
|
||||
if (participants.size() > 1) {
|
||||
CBITSTREAM;
|
||||
PacketUtils::WriteHeader(bitStream, eConnectionType::CHAT_INTERNAL, eChatInternalMessageType::CREATE_TEAM);
|
||||
BitstreamUtils::WriteHeader(bitStream, eConnectionType::CHAT_INTERNAL, eChatInternalMessageType::CREATE_TEAM);
|
||||
|
||||
bitStream.Write(leader->GetObjectID());
|
||||
bitStream.Write(m_Participants.size());
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include "dServer.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Game.h"
|
||||
#include "PacketUtils.h"
|
||||
#include "BitstreamUtils.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "ScriptComponent.h"
|
||||
#include "BuffComponent.h"
|
||||
@@ -304,7 +304,7 @@ SkillExecutionResult SkillComponent::CalculateBehavior(const uint32_t skillId, c
|
||||
// Write message
|
||||
RakNet::BitStream message;
|
||||
|
||||
PacketUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
BitstreamUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
message.Write(this->m_Parent->GetObjectID());
|
||||
start.Serialize(&message);
|
||||
|
||||
@@ -437,7 +437,7 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
|
||||
|
||||
RakNet::BitStream message;
|
||||
|
||||
PacketUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
BitstreamUtils::WriteHeader(message, eConnectionType::CLIENT, eClientMessageType::GAME_MSG);
|
||||
message.Write(this->m_Parent->GetObjectID());
|
||||
projectileImpact.Serialize(&message);
|
||||
|
||||
|
Reference in New Issue
Block a user