mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-10 15:51:29 +00:00
Update client.cpp HandleEnterWorldPacket for UCS Local Address (#5020)
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.
This commit is contained in:
parent
ecc0d4b5c0
commit
eb4e7d694c
@ -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(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user