[UCS] Auto Client Reconnection (#2154)

This commit is contained in:
Chris Miles
2022-05-07 22:24:11 -05:00
committed by GitHub
parent 9f9eaed983
commit 07b46ed445
4 changed files with 129 additions and 25 deletions
+6 -2
View File
@@ -659,7 +659,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (database.GetInstanceID(client->CharacterID(), ZoneID(szp->zone))) {
client->RemoveFromInstance(database.GetInstanceID(client->CharacterID(), ZoneID(szp->zone)));
}
client->AssignToInstance(szp->instance_id);
client->MovePC(ZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon);
}
@@ -1917,7 +1917,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
LogSys.LoadLogDatabaseSettings();
break;
}
case ServerOP_ReloadMerchants: {
case ServerOP_ReloadMerchants: {
zone->SendReloadMessage("Merchants");
entity_list.ReloadMerchants();
break;
@@ -2016,6 +2016,10 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (zone) {
zone->SetUCSServerAvailable((ucsss->available != 0), ucsss->timestamp);
LogInfo("UCS Server is now [{}]", (ucsss->available == 1 ? "online" : "offline"));
for (auto &e : entity_list.GetClientList()) {
e.second->ReconnectUCS();
}
}
break;
}