[bot] Implement CNetGame::Packet_ConnectionLost(...)

This commit is contained in:
RD42 2024-06-01 20:34:10 +08:00
parent 80c6ceb1fc
commit 509c89ca5f
2 changed files with 13 additions and 1 deletions

View File

@ -304,7 +304,9 @@ void CNetGame::UpdateNetwork()
case ID_DISCONNECTION_NOTIFICATION:
Packet_DisconnectionNotification(pkt);
break;
case ID_CONNECTION_LOST:
Packet_ConnectionLost(pkt);
break;
case ID_MODIFIED_PACKET:
Packet_ModifiedPacket(pkt);
break;
@ -425,6 +427,15 @@ void CNetGame::Packet_DisconnectionNotification(Packet* packet)
//----------------------------------------------------
void CNetGame::Packet_ConnectionLost(Packet* packet)
{
//logprintf("NPC: Lost connection to the server.");
m_pRakClient->Disconnect(0);
exit(1);
}
//----------------------------------------------------
void CNetGame::Packet_ModifiedPacket(Packet* packet)
{
}

View File

@ -30,6 +30,7 @@ private:
void Packet_ConnectionRequestAccepted(Packet* packet);
void Packet_NoFreeIncomingConnections(Packet* packet);
void Packet_DisconnectionNotification(Packet* packet);
void Packet_ConnectionLost(Packet* packet);
void Packet_ModifiedPacket(Packet* packet);
void Packet_ConnectAttemptFailed(Packet* packet);
void Packet_TrailerSync(Packet *p);