mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 17:55:27 +00:00
feat(world): the game client's level editor packets
A world server answers the client's level editor: it remembers per connection whether the editor is on (and never sends such a client a zone load), takes and gives up the zone's lock, says whether files may be sent, takes them, sends the zone's files, and reloads the zone. Who may is the same as for the dashboard's zone file API: the account's editor level against zone_publish_gm_level, the zone's editors or an admin, and the lock's holder to send files. Files are unpacked, checked, written and packed on a worker thread, and every request is in the audit log. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,10 @@ json ToJson(const ClientPackets::GuildRemovePlayer& m);
|
||||
json ToJson(const ClientPackets::GuildLoginLogout& m);
|
||||
json ToJson(const ClientPackets::GuildData& m);
|
||||
json ToJson(const ClientPackets::GuildData::Member& m);
|
||||
json ToJson(const ClientPackets::ImpendingReloadNotify& m);
|
||||
json ToJson(const ClientPackets::SlashPushMapResponse& m);
|
||||
json ToJson(const ClientPackets::SlashPullMapResponse& m);
|
||||
json ToJson(const ClientPackets::SlashLockMapResponse& m);
|
||||
json ToJson(const CommonPackets::ClientVersionConfirm& m);
|
||||
json ToJson(const CommonPackets::ServerVersionConfirm& m);
|
||||
json ToJson(const CommonPackets::DisconnectNotify& m);
|
||||
@@ -141,6 +145,12 @@ json ToJson(const WorldPackets::HandleFunness& m);
|
||||
json ToJson(const WorldPackets::RequestUgcManifestInfo& m);
|
||||
json ToJson(const WorldPackets::UgcDownloadFailed& m);
|
||||
json ToJson(const WorldPackets::UIHelpTop5& m);
|
||||
json ToJson(const WorldPackets::HappyFlowerModeNotify& m);
|
||||
json ToJson(const WorldPackets::SlashReloadMap& m);
|
||||
json ToJson(const WorldPackets::SlashPushMapRequest& m);
|
||||
json ToJson(const WorldPackets::SlashPushMap& m);
|
||||
json ToJson(const WorldPackets::SlashPullMap& m);
|
||||
json ToJson(const WorldPackets::LockMapRequest& m);
|
||||
json ToJson(const ChatPackets::WorldRoutePacket& m);
|
||||
json ToJson(const CDClientReload& m);
|
||||
json ToJson(const PlayerPositions& m);
|
||||
@@ -909,6 +919,32 @@ json ToJson(const ClientPackets::GuildData::Member& m) {
|
||||
j["name"] = ToJson(m.name);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const ClientPackets::ImpendingReloadNotify& m) {
|
||||
json j = json::object();
|
||||
return j;
|
||||
}
|
||||
json ToJson(const ClientPackets::SlashPushMapResponse& m) {
|
||||
json j = json::object();
|
||||
j["result"] = ToJson(m.result);
|
||||
j["fileType"] = ToJson(m.fileType);
|
||||
j["levelFileId"] = ToJson(m.levelFileId);
|
||||
j["lockedBy"] = ToJson(m.lockedBy);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const ClientPackets::SlashPullMapResponse& m) {
|
||||
json j = json::object();
|
||||
j["fileType"] = ToJson(m.fileType);
|
||||
j["levelFileId"] = ToJson(m.levelFileId);
|
||||
j["packedFiles"] = ToJson(m.packedFiles);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const ClientPackets::SlashLockMapResponse& m) {
|
||||
json j = json::object();
|
||||
j["result"] = ToJson(m.result);
|
||||
j["lockedBy"] = ToJson(m.lockedBy);
|
||||
j["locked"] = ToJson(m.locked);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const CommonPackets::ClientVersionConfirm& m) {
|
||||
json j = json::object();
|
||||
j["netVersion"] = ToJson(m.netVersion);
|
||||
@@ -1254,6 +1290,39 @@ json ToJson(const WorldPackets::UIHelpTop5& m) {
|
||||
j["language"] = ToJson(m.language);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const WorldPackets::HappyFlowerModeNotify& m) {
|
||||
json j = ToJson(static_cast<const WorldPackets::WorldLUBitStream&>(m));
|
||||
j["on"] = ToJson(m.on);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const WorldPackets::SlashReloadMap& m) {
|
||||
json j = ToJson(static_cast<const WorldPackets::WorldLUBitStream&>(m));
|
||||
return j;
|
||||
}
|
||||
json ToJson(const WorldPackets::SlashPushMapRequest& m) {
|
||||
json j = ToJson(static_cast<const WorldPackets::WorldLUBitStream&>(m));
|
||||
j["fileType"] = ToJson(m.fileType);
|
||||
j["levelFileId"] = ToJson(m.levelFileId);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const WorldPackets::SlashPushMap& m) {
|
||||
json j = ToJson(static_cast<const WorldPackets::WorldLUBitStream&>(m));
|
||||
j["fileType"] = ToJson(m.fileType);
|
||||
j["levelFileId"] = ToJson(m.levelFileId);
|
||||
j["packedFiles"] = ToJson(m.packedFiles);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const WorldPackets::SlashPullMap& m) {
|
||||
json j = ToJson(static_cast<const WorldPackets::WorldLUBitStream&>(m));
|
||||
j["fileType"] = ToJson(m.fileType);
|
||||
j["levelFileId"] = ToJson(m.levelFileId);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const WorldPackets::LockMapRequest& m) {
|
||||
json j = ToJson(static_cast<const WorldPackets::WorldLUBitStream&>(m));
|
||||
j["lock"] = ToJson(m.lock);
|
||||
return j;
|
||||
}
|
||||
json ToJson(const ChatPackets::WorldRoutePacket& m) {
|
||||
json j = json::object();
|
||||
j["targetID"] = ToJson(m.targetID);
|
||||
@@ -1873,6 +1942,10 @@ const std::vector<Entry>& Entries() {
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::GUILD_REMOVE_PLAYER), "GuildRemovePlayer", false, &ReadWith<ClientPackets::GuildRemovePlayer> },
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::GUILD_LOGIN_LOGOUT), "GuildLoginLogout", false, &ReadWith<ClientPackets::GuildLoginLogout> },
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::GUILD_DATA), "GuildData", false, &ReadWith<ClientPackets::GuildData> },
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::IMPENDING_RELOAD_NOTIFY), "ImpendingReloadNotify", false, &ReadWith<ClientPackets::ImpendingReloadNotify> },
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::SLASH_PUSH_MAP_RESPONSE), "SlashPushMapResponse", false, &ReadWith<ClientPackets::SlashPushMapResponse> },
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::SLASH_PULL_MAP_RESPONSE), "SlashPullMapResponse", false, &ReadWith<ClientPackets::SlashPullMapResponse> },
|
||||
{ ServiceType::CLIENT, static_cast<uint32_t>(MessageType::Client::SLASH_LOCK_MAP_RESPONSE), "SlashLockMapResponse", false, &ReadWith<ClientPackets::SlashLockMapResponse> },
|
||||
{ ServiceType::COMMON, static_cast<uint32_t>(MessageType::Server::VERSION_CONFIRM), "ClientVersionConfirm", true, &ReadWith<CommonPackets::ClientVersionConfirm> },
|
||||
{ ServiceType::COMMON, static_cast<uint32_t>(MessageType::Server::VERSION_CONFIRM), "ServerVersionConfirm", false, &ReadWith<CommonPackets::ServerVersionConfirm> },
|
||||
{ ServiceType::COMMON, static_cast<uint32_t>(MessageType::Server::DISCONNECT_NOTIFY), "DisconnectNotify", false, &ReadWith<CommonPackets::DisconnectNotify> },
|
||||
@@ -1920,6 +1993,12 @@ const std::vector<Entry>& Entries() {
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::REQUEST_UGC_MANIFEST_INFO), "RequestUgcManifestInfo", false, &ReadWith<WorldPackets::RequestUgcManifestInfo> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::UGC_DOWNLOAD_FAILED), "UgcDownloadFailed", false, &ReadWith<WorldPackets::UgcDownloadFailed> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::UI_HELP_TOP_5), "UIHelpTop5", false, &ReadWith<WorldPackets::UIHelpTop5> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::HAPPY_FLOWER_MODE_NOTIFY), "HappyFlowerModeNotify", false, &ReadWith<WorldPackets::HappyFlowerModeNotify> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::SLASH_RELOAD_MAP), "SlashReloadMap", false, &ReadWith<WorldPackets::SlashReloadMap> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::SLASH_PUSH_MAP_REQUEST), "SlashPushMapRequest", false, &ReadWith<WorldPackets::SlashPushMapRequest> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::SLASH_PUSH_MAP), "SlashPushMap", false, &ReadWith<WorldPackets::SlashPushMap> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::SLASH_PULL_MAP), "SlashPullMap", false, &ReadWith<WorldPackets::SlashPullMap> },
|
||||
{ ServiceType::WORLD, static_cast<uint32_t>(MessageType::World::LOCK_MAP_REQUEST), "LockMapRequest", false, &ReadWith<WorldPackets::LockMapRequest> },
|
||||
{ ServiceType::CHAT, static_cast<uint32_t>(MessageType::Chat::WORLD_ROUTE_PACKET), "WorldRoutePacket", false, &ReadWith<ChatPackets::WorldRoutePacket> },
|
||||
{ ServiceType::MASTER, static_cast<uint32_t>(MessageType::Master::CDCLIENT_RELOAD), "CDClientReload", false, &ReadWith<CDClientReload> },
|
||||
{ ServiceType::MASTER, static_cast<uint32_t>(MessageType::Master::PLAYER_POSITIONS), "PlayerPositions", false, &ReadWith<PlayerPositions> },
|
||||
|
||||
Reference in New Issue
Block a user