Remove deps from dNet (#1401)

This commit is contained in:
David Markowitz
2024-01-06 23:05:57 -08:00
committed by GitHub
parent 14c20fbd62
commit b683413a60
11 changed files with 411 additions and 496 deletions

View File

@@ -6,13 +6,31 @@
#ifndef CLIENTPACKETS_H
#define CLIENTPACKETS_H
#include "RakNetTypes.h"
#include <cstdint>
#include <string>
class PositionUpdate;
struct Packet;
struct ChatMessage {
uint8_t chatChannel = 0;
uint16_t unknown = 0;
std::u16string message;
};
struct ChatModerationRequest {
uint8_t chatLevel = 0;
uint8_t requestID = 0;
std::string receiver;
std::string message;
};
namespace ClientPackets {
void HandleChatMessage(const SystemAddress& sysAddr, Packet* packet);
void HandleClientPositionUpdate(const SystemAddress& sysAddr, Packet* packet);
void HandleChatModerationRequest(const SystemAddress& sysAddr, Packet* packet);
void SendTop5HelpIssues(Packet* packet);
ChatMessage HandleChatMessage(Packet* packet);
PositionUpdate HandleClientPositionUpdate(Packet* packet);
ChatModerationRequest HandleChatModerationRequest(Packet* packet);
int32_t SendTop5HelpIssues(Packet* packet);
};
#endif // CLIENTPACKETS_H