From 271fa1844e4af51400a6f2e3dc565f469d5ddb98 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 1 Jun 2024 17:52:11 +0800 Subject: [PATCH] [bot] Implement `SvrStats(...)` --- bot/net/netrpc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/net/netrpc.cpp b/bot/net/netrpc.cpp index b9bf0dd..a942778 100644 --- a/bot/net/netrpc.cpp +++ b/bot/net/netrpc.cpp @@ -9,9 +9,14 @@ void Unk26(RPCParameters *rpcParams) {} void Unk27(RPCParameters *rpcParams) {} void UpdateScoresPingsIPs(RPCParameters *rpcParams) {} +RakNetStatisticsStruct RakServerStats; + void SvrStats(RPCParameters *rpcParams) { - // TODO: SvrStats + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + bsData.Read((char *)&RakServerStats,sizeof(RakNetStatisticsStruct)); } void Unk28(RPCParameters *rpcParams)