From f2c9135f5ab79a6111794840e1d00a34f31ad803 Mon Sep 17 00:00:00 2001 From: Jordan Conner <321j.con@gmail.com> Date: Tue, 7 Oct 2025 23:14:59 -0400 Subject: [PATCH] Update client.cpp HandleEnterWorldPacket for UCS Local Address world/client.cpp's EnterWorld will correctly serve a LAN client the eqemu_config.json.world.localaddress based off IsLocalClient. It will then serve a non-LAN client the world.address value. This concept needs to be applied to UCS as that system also receives direct client connections. Inside world/client.cpp HandleEnterWorldPacket is where world sends the client info about UCS connection. This fix specifically handles the issue when you have a server on LAN and want to connect to it via another LAN computer + you have external clients. --- world/client.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/world/client.cpp b/world/client.cpp index a2d35a485..674d09639 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -1019,8 +1019,16 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { break; } + std::string ucs_addr = config->GetUCSHost(); + if (cle && cle->IsLocalClient()) { + const char* local_addr = config->LocalAddress.c_str(); + if (local_addr[0]) { + ucs_addr = local_addr; + } + } + buffer = fmt::format("{},{},{}.{},{}{:08X}", - config->GetUCSHost(), + ucs_addr, config->GetUCSPort(), config->ShortName, GetCharName(), @@ -1046,7 +1054,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { } buffer = fmt::format("{},{},{}.{},{}{:08X}", - config->GetUCSHost(), + ucs_addr, config->GetUCSPort(), config->ShortName, GetCharName(),