Added two other commands to let you do shared reloading on your own without the hotfix command. Also changed how world determines a zone's address

This commit is contained in:
KimLS
2015-07-16 01:51:10 -07:00
parent 9f1f36cca6
commit b7cd0b223f
9 changed files with 98 additions and 79 deletions
+14 -3
View File
@@ -57,6 +57,7 @@ ZoneServer::ZoneServer(EmuTCPConnection* itcpc)
instanceID = 0;
memset(clientaddress, 0, sizeof(clientaddress));
memset(clientlocaladdress, 0, sizeof(clientlocaladdress));
clientport = 0;
BootingUp = false;
authenticated = false;
@@ -581,7 +582,7 @@ bool ZoneServer::Process() {
ServerConnectInfo* sci = (ServerConnectInfo*) pack->pBuffer;
if (!sci->port) {
clientport=zoneserver_list.GetAvailableZonePort();
clientport = zoneserver_list.GetAvailableZonePort();
ServerPacket p(ServerOP_SetConnectInfo, sizeof(ServerConnectInfo));
memset(p.pBuffer,0,sizeof(ServerConnectInfo));
@@ -590,8 +591,18 @@ bool ZoneServer::Process() {
SendPacket(&p);
Log.Out(Logs::Detail, Logs::World_Server,"Auto zone port configuration. Telling zone to use port %d",clientport);
} else {
clientport=sci->port;
Log.Out(Logs::Detail, Logs::World_Server,"Zone specified port %d, must be a previously allocated zone reconnecting.",clientport);
clientport = sci->port;
Log.Out(Logs::Detail, Logs::World_Server,"Zone specified port %d.",clientport);
}
if(sci->address[0]) {
strn0cpy(clientaddress, sci->address, 250);
Log.Out(Logs::Detail, Logs::World_Server, "Zone specified address %s.", sci->address);
}
if(sci->local_address[0]) {
strn0cpy(clientlocaladdress, sci->local_address, 250);
Log.Out(Logs::Detail, Logs::World_Server, "Zone specified local address %s.", sci->address);
}
}