From d5723696f482b7623467dcb32d94474f263fa2c2 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 10 Nov 2026 16:12:39 -0600 Subject: [PATCH] fix: adapt the transfers of a match, a rescue and a property reload to a failed transfer The chat server passes the master server's answer for a match on to the world servers as it is, and a world server tells each player of the match that the map change failed. A player moved from the dashboard and the players of a property that loads again are told the same, and their characters stay in the zone they are in. Co-Authored-By: Claude Fable 5.2 --- dGame/dComponents/Activity/ActivityComponent.cpp | 4 ++++ dGame/dUtilities/DashboardActions.cpp | 2 ++ dGame/dUtilities/UgcManifest.cpp | 2 ++ 3 files changed, 8 insertions(+) diff --git a/dGame/dComponents/Activity/ActivityComponent.cpp b/dGame/dComponents/Activity/ActivityComponent.cpp index 8279d201a..a0fbc517d 100644 --- a/dGame/dComponents/Activity/ActivityComponent.cpp +++ b/dGame/dComponents/Activity/ActivityComponent.cpp @@ -1,4 +1,5 @@ #include "ActivityComponent.h" +#include "WorldPackets.h" #include "ChatServerLink.h" #include "ChatPackets.h" #include "GameMessages.h" @@ -303,6 +304,9 @@ void ActivityInstance::TransferParticipants(const ChatPackets::MatchTransfer& tr const auto zoneInstance = transfer.zoneID.GetInstanceID(); const auto zoneClone = transfer.zoneID.GetCloneID(); for (Entity* player : GetParticipants()) { + // The match got no instance: the players stay, and each is told the map change failed + if (WorldPackets::SendIfTransferFailed(player->GetSystemAddress(), transfer.serverIP, transfer.serverPort)) continue; + LOG("Transferring %s to Zone %i (Instance %i | Clone %i | Mythran Shift: %s) with IP %s and Port %i", player->GetCharacter()->GetName().c_str(), zoneID, zoneInstance, zoneClone, transfer.mythranShift == true ? "true" : "false", transfer.serverIP.c_str(), transfer.serverPort); if (player->GetCharacter()) { auto* characterComponent = player->GetComponent(); diff --git a/dGame/dUtilities/DashboardActions.cpp b/dGame/dUtilities/DashboardActions.cpp index 79e75545a..61a97dbf2 100644 --- a/dGame/dUtilities/DashboardActions.cpp +++ b/dGame/dUtilities/DashboardActions.cpp @@ -1,4 +1,5 @@ #include "DashboardActions.h" +#include "WorldPackets.h" #include "master/PlayerAction.h" #include "Game.h" @@ -144,6 +145,7 @@ namespace { [objectId, spawnPoint](bool mythranShift, uint32_t zoneID, uint32_t zoneInstance, uint32_t zoneClone, std::string serverIP, uint16_t serverPort) { auto* entity = Game::entityManager->GetEntity(objectId); if (!entity || !entity->GetCharacter()) return; + if (WorldPackets::SendIfTransferFailed(entity->GetSystemAddress(), serverIP, serverPort)) return; auto* character = entity->GetCharacter(); if (auto* characterComponent = entity->GetComponent()) { diff --git a/dGame/dUtilities/UgcManifest.cpp b/dGame/dUtilities/UgcManifest.cpp index 01055e7e2..8fe0a4ead 100644 --- a/dGame/dUtilities/UgcManifest.cpp +++ b/dGame/dUtilities/UgcManifest.cpp @@ -1,4 +1,5 @@ #include "UgcManifest.h" +#include "WorldPackets.h" #include #include @@ -331,6 +332,7 @@ namespace { [objectId](bool mythranShift, uint32_t zoneID, uint32_t zoneInstance, uint32_t zoneClone, std::string serverIP, uint16_t serverPort) { auto* const entity = Game::entityManager->GetEntity(objectId); if (!entity || !entity->GetCharacter()) return; + if (WorldPackets::SendIfTransferFailed(entity->GetSystemAddress(), serverIP, serverPort)) return; auto* const character = entity->GetCharacter(); character->SetZoneID(zoneID); character->SetZoneInstance(zoneInstance);