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

This commit is contained in:
RD42 2024-06-01 20:35:12 +08:00
parent 509c89ca5f
commit ed70116c80
2 changed files with 13 additions and 0 deletions

View File

@ -307,6 +307,9 @@ void CNetGame::UpdateNetwork()
case ID_CONNECTION_LOST:
Packet_ConnectionLost(pkt);
break;
case ID_INVALID_PASSWORD:
Packet_InvalidPassword(pkt);
break;
case ID_MODIFIED_PACKET:
Packet_ModifiedPacket(pkt);
break;
@ -436,6 +439,15 @@ void CNetGame::Packet_ConnectionLost(Packet* packet)
//----------------------------------------------------
void CNetGame::Packet_InvalidPassword(Packet* packet)
{
//logprintf("NPC: Wrong server password.");
m_pRakClient->Disconnect(0);
exit(1);
}
//----------------------------------------------------
void CNetGame::Packet_ModifiedPacket(Packet* packet)
{
}

View File

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