feat(master): an edit mode flag on a private instance, down to its world server

CreatePrivateZone carries editMode as one more byte, written only when set, so
a plain private zone is sent as before. Master keeps it on the instance, starts
the world server with -editmode 1, and gives a private instance's replacement
(a reload or a live update) the same flag. Nothing sets it yet.

A capped string now skips the characters it cut, so what follows it is read
from the right place. A request to join a private instance that is still
starting is answered once its world server is ready, instead of at once with
an address nothing listens on yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 17:34:13 -06:00
parent 78b2c0f406
commit 4cf0909d52
12 changed files with 68 additions and 14 deletions

View File

@@ -35,11 +35,12 @@ void ZoneInstanceManager::HandleRequestZoneTransferResponse(const MasterPackets:
}
}
void ZoneInstanceManager::CreatePrivateZone(dServer* server, uint32_t zoneID, uint32_t zoneClone, const std::string& password) {
void ZoneInstanceManager::CreatePrivateZone(dServer* server, uint32_t zoneID, uint32_t zoneClone, const std::string& password, const bool editMode) {
MasterPackets::CreatePrivateZone request;
request.zoneID = zoneID;
request.cloneID = zoneClone;
request.password = password;
request.editMode = editMode ? 1 : 0;
MasterPackets::SendToMaster(request, server);
}