// *************************************************************** // Function: ClientSeed.cpp // *************************************************************** #include "Main.h" #include "LocalData.h" //************************************ // Name: HandleOpcode_CLIENT_SEED // // Handles the client seed packet. Will be used for encryption key generation at some point. Sets the player's encrypted connection status to true. // // Parameters: // pData - Network data // pLir - Player's data // // Return: // Size of packet //************************************ int HandleOpcode_CLIENT_SEED(NetMessage* pData, LOCAL_DATA* pLir) { CompiledPacket pck; pck.AddShort(ServerOpcode(2)); pck.Fill(0, 20); NetMessage s; s.networkId=pData->networkId; s.pData=pck.GetString(&s.dataSize); BIT_SET(s.flags, NETMESS_BOOL_DEL); gpLoginServer->SendData(&s); pck.Clear(); //enable cryptography BIT_SET(pLir->bitfield, LD_ESTABLISHED_ENCRYPTED_CONNECTION); return 66; }