Working on stuck behavior handler, fix for world crash when you can't connect to a login server.

This commit is contained in:
KimLS
2018-11-09 18:30:05 -08:00
parent 8f0051db8d
commit 81b409a2e4
4 changed files with 80 additions and 17 deletions
+30
View File
@@ -306,6 +306,20 @@ void LoginServer::SendStatus() {
delete pack;
}
void LoginServer::SendPacket(ServerPacket *pack)
{
if (IsLegacy) {
if (legacy_client) {
legacy_client->SendPacket(pack);
}
}
else {
if (client) {
client->SendPacket(pack);
}
}
}
void LoginServer::SendAccountUpdate(ServerPacket* pack) {
ServerLSAccountUpdate_Struct* s = (ServerLSAccountUpdate_Struct *)pack->pBuffer;
if (CanUpdate()) {
@@ -315,3 +329,19 @@ void LoginServer::SendAccountUpdate(ServerPacket* pack) {
SendPacket(pack);
}
}
bool LoginServer::Connected()
{
if (IsLegacy) {
if (legacy_client) {
return legacy_client->Connected();
}
}
else {
if (client) {
return client->Connected();
}
}
return false;
}