Welp, ended up doing client as well since world and client are in the wroing places.

This commit is contained in:
Aronwk
2025-05-16 00:10:00 -05:00
parent e42df5b02e
commit 3e8a417f62
15 changed files with 459 additions and 319 deletions

View File

@@ -2,40 +2,30 @@
#define WORLDPACKETS_H
#include "dCommonVars.h"
#include <vector>
#include <string>
#include "BitStreamUtils.h"
#include "MessageType/World.h"
class User;
struct SystemAddress;
enum class eGameMasterLevel : uint8_t;
enum class eCharacterCreationResponse : uint8_t;
enum class eRenameResponse : uint8_t;
namespace RakNet {
class BitStream;
};
struct HTTPMonitorInfo {
uint16_t port = 80;
bool openWeb = false;
bool supportsSum = false;
bool supportsDetail = false;
bool supportsWho = false;
bool supportsObjects = false;
void Serialize(RakNet::BitStream &bitstream) const;
class Entity;
enum class eLanguageCodeID : int32_t {
EN_US = 0,
PL_US = 1,
DE_DE = 2,
EN_GB = 3
};
namespace WorldPackets {
void SendLoadStaticZone(const SystemAddress& sysAddr, float x, float y, float z, uint32_t checksum, LWOZONEID zone);
void SendCharacterCreationResponse(const SystemAddress& sysAddr, eCharacterCreationResponse response);
void SendCharacterRenameResponse(const SystemAddress& sysAddr, eRenameResponse response);
void SendCharacterDeleteResponse(const SystemAddress& sysAddr, bool response);
void SendTransferToWorld(const SystemAddress& sysAddr, const std::string& serverIP, uint32_t serverPort, bool mythranShift);
void SendServerState(const SystemAddress& sysAddr);
void SendCreateCharacter(const SystemAddress& sysAddr, int64_t reputation, LWOOBJID player, const std::string& xmlData, const std::u16string& username, eGameMasterLevel gm);
void SendChatModerationResponse(const SystemAddress& sysAddr, bool requestAccepted, uint32_t requestID, const std::string& receiver, std::set<std::pair<uint8_t, uint8_t>> unacceptedItems);
void SendGMLevelChange(const SystemAddress& sysAddr, bool success, eGameMasterLevel highestLevel, eGameMasterLevel prevLevel, eGameMasterLevel newLevel);
void SendHTTPMonitorInfo(const SystemAddress& sysAddr, const HTTPMonitorInfo& info);
void SendDebugOuput(const SystemAddress& sysAddr, const std::string& data);
struct UIHelpTop5: public LUBitStream {
eLanguageCodeID languageCode = eLanguageCodeID::EN_US;
// should these be shoved up to the base class?
SystemAddress sysAddr = UNASSIGNED_SYSTEM_ADDRESS;
Entity* player = nullptr;
UIHelpTop5() : LUBitStream(eConnectionType::WORLD, MessageType::World::UI_HELP_TOP_5) {};
bool Deserialize(RakNet::BitStream& bitStream) override;
void Handle() override;
};
}
#endif // WORLDPACKETS_H