fix: tell the player when the zone they go to gets no instance

The master server dropped a transfer request it started no instance
for, so the world server never heard back and the player waited. It
now answers the request with an empty address and the reason in place
of the port: no room for another instance (max_instances), a zone that
is not in the ZoneTable, or another reason. A request for a private
zone that does not exist is answered the same way.

The world server passes this on as a TRANSFER_TO_WORLD without an
address, which the client shows as a failed map change, and leaves the
character where it is. The auth server fails the login when there is
no character select to send the player to.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 16:06:31 -06:00
parent 24294561ae
commit ebcfd54915
16 changed files with 132 additions and 3 deletions

View File

@@ -746,7 +746,10 @@ namespace {
}
const auto& in = Game::im->GetInstance(zoneID, false, zoneClone);
if (!in) {
// An empty address tells the world server there is no instance, the port is the reason
const auto failure = InstanceLimits::TransferFailure(Game::im->CheckNewInstance(zoneID));
LOG("No instance for transfer request %llu to zone %i %i", requestID, zoneID, zoneClone);
InstanceManager::SendTransferFailure({ requestID, static_cast<bool>(mythranShift), sysAddr, stamps }, zoneID, zoneClone, failure);
return;
}
@@ -907,6 +910,8 @@ namespace {
LOG("Join private zone: %llu %d %p", requestID, mythranShift, instance.get());
if (instance == nullptr) {
// No private zone has this password, the player is told the transfer failed
InstanceManager::SendTransferFailure({ requestID, static_cast<bool>(mythranShift), sysAddr, {} }, 0, 0, eTransferFailure::Other);
return;
}