[bot] Implement RegisterRPCs and UnRegisterRPCs

This commit is contained in:
RD42 2024-01-14 22:51:51 +08:00
parent b35478354a
commit 9f3ed4158d
4 changed files with 267 additions and 0 deletions

View File

@ -119,6 +119,12 @@
<File
RelativePath=".\net\netgame.h">
</File>
<File
RelativePath=".\net\netrpc.cpp">
</File>
<File
RelativePath=".\net\netrpc.h">
</File>
<File
RelativePath=".\net\playerpool.cpp">
</File>
@ -132,6 +138,85 @@
RelativePath=".\net\vehiclepool.h">
</File>
</Filter>
<Filter
Name="raknet"
Filter="">
<File
RelativePath="..\raknet\BitStream.cpp">
</File>
<File
RelativePath="..\raknet\BitStream.h">
</File>
<File
RelativePath="..\raknet\NetworkTypes.cpp">
</File>
<File
RelativePath="..\raknet\NetworkTypes.h">
</File>
<File
RelativePath="..\raknet\RakClient.cpp">
</File>
<File
RelativePath="..\raknet\RakClient.h">
</File>
<File
RelativePath="..\raknet\RakClientInterface.h">
</File>
<File
RelativePath="..\raknet\RakNetStatistics.cpp">
</File>
<File
RelativePath="..\raknet\RakNetStatistics.h">
</File>
<File
RelativePath="..\raknet\RakNetworkFactory.cpp">
</File>
<File
RelativePath="..\raknet\RakNetworkFactory.h">
</File>
<File
RelativePath="..\raknet\RakPeer.cpp">
</File>
<File
RelativePath="..\raknet\RakPeer.h">
</File>
<File
RelativePath="..\raknet\RakPeerInterface.h">
</File>
<File
RelativePath="..\raknet\RakServer.cpp">
</File>
<File
RelativePath="..\raknet\RakServer.h">
</File>
<File
RelativePath="..\raknet\RakServerInterface.h">
</File>
<File
RelativePath="..\raknet\RakSleep.cpp">
</File>
<File
RelativePath="..\raknet\RakSleep.h">
</File>
<File
RelativePath="..\raknet\RPCMap.cpp">
</File>
<File
RelativePath="..\raknet\RPCMap.h">
</File>
<File
RelativePath="..\raknet\RPCNode.h">
</File>
<File
RelativePath="..\raknet\SAMPRPC.h">
</File>
<File
RelativePath="..\raknet\SimpleMutex.cpp">
</File>
<File
RelativePath="..\raknet\SimpleMutex.h">
</File>
</Filter>
</Filter>
<File
RelativePath=".\bot.rc">

View File

@ -26,9 +26,14 @@ typedef struct _GAME_SETTINGS {
#include <stdio.h>
#include <stdlib.h>
#include "../raknet/RakClientInterface.h"
#include "../raknet/RakNetworkFactory.h"
#include "../raknet/PacketEnumerations.h"
#include "../raknet/SAMPRPC.h"
#include "scrtimers.h"
#include "npcmode.h"
#include "net/netrpc.h"
#include "net/playerpool.h"
#include "net/vehiclepool.h"
#include "net/netgame.h"

168
bot/net/netrpc.cpp Normal file
View File

@ -0,0 +1,168 @@
#include "../main.h"
void Unk1A(RPCParameters *rpcParams) {}
void Unk9A(RPCParameters *rpcParams) {}
void Unk6B(RPCParameters *rpcParams) {}
void Unk25(RPCParameters *rpcParams) {}
void Unk26(RPCParameters *rpcParams) {}
void Unk27(RPCParameters *rpcParams) {}
void Unk9B(RPCParameters *rpcParams) {}
void Unk66(RPCParameters *rpcParams)
{
// TODO: Unk66
}
void Unk28(RPCParameters *rpcParams)
{
// TODO: Unk28
}
void Unk82(RPCParameters *rpcParams)
{
// TODO: Unk82
}
void Unk5D(RPCParameters *rpcParams)
{
// TODO: Unk5D
}
void Unk5E(RPCParameters *rpcParams) {}
void Unk5F(RPCParameters *rpcParams) {}
void Unk3F(RPCParameters *rpcParams) {}
void Unk97(RPCParameters *rpcParams) {}
void Unk60(RPCParameters *rpcParams) {}
void Unk98(RPCParameters *rpcParams) {}
void Unk1D(RPCParameters *rpcParams) {}
void Unk1E(RPCParameters *rpcParams) {}
void Unk89(RPCParameters *rpcParams)
{
// TODO: Unk89
}
void Unk8A(RPCParameters *rpcParams)
{
// TODO: Unk8A
}
void Unk8B(RPCParameters *rpcParams)
{
// TODO: Unk8B
}
void Unk65(RPCParameters *rpcParams)
{
// TODO: Unk65
}
void Unk80(RPCParameters *rpcParams)
{
// TODO: Unk80
}
void Unk81(RPCParameters *rpcParams)
{
// TODO: Unk81
}
void Unk20(RPCParameters *rpcParams)
{
// TODO: Unk20
}
void UnkA6(RPCParameters *rpcParams)
{
// TODO: UnkA6
}
void UnkA3(RPCParameters *rpcParams)
{
// TODO: UnkA3
}
void UnkA4(RPCParameters *rpcParams)
{
// TODO: UnkA4
}
void UnkA5(RPCParameters *rpcParams)
{
// TODO: UnkA5
}
//----------------------------------------------------
void RegisterRPCs(RakClientInterface * pRakClient)
{
REGISTER_STATIC_RPC(pRakClient,Unk1A);
REGISTER_STATIC_RPC(pRakClient,Unk9A);
REGISTER_STATIC_RPC(pRakClient,Unk6B);
REGISTER_STATIC_RPC(pRakClient,Unk25);
REGISTER_STATIC_RPC(pRakClient,Unk26);
REGISTER_STATIC_RPC(pRakClient,Unk27);
REGISTER_STATIC_RPC(pRakClient,Unk9B);
REGISTER_STATIC_RPC(pRakClient,Unk66);
REGISTER_STATIC_RPC(pRakClient,Unk28);
REGISTER_STATIC_RPC(pRakClient,Unk82);
REGISTER_STATIC_RPC(pRakClient,Unk5D);
REGISTER_STATIC_RPC(pRakClient,Unk5E);
REGISTER_STATIC_RPC(pRakClient,Unk5F);
REGISTER_STATIC_RPC(pRakClient,Unk3F);
REGISTER_STATIC_RPC(pRakClient,Unk97);
REGISTER_STATIC_RPC(pRakClient,Unk60);
REGISTER_STATIC_RPC(pRakClient,Unk98);
REGISTER_STATIC_RPC(pRakClient,Unk1D);
REGISTER_STATIC_RPC(pRakClient,Unk1E);
REGISTER_STATIC_RPC(pRakClient,Unk89);
REGISTER_STATIC_RPC(pRakClient,Unk8A);
REGISTER_STATIC_RPC(pRakClient,Unk8B);
REGISTER_STATIC_RPC(pRakClient,Unk65);
REGISTER_STATIC_RPC(pRakClient,Unk80);
REGISTER_STATIC_RPC(pRakClient,Unk81);
REGISTER_STATIC_RPC(pRakClient,Unk20);
REGISTER_STATIC_RPC(pRakClient,UnkA6);
REGISTER_STATIC_RPC(pRakClient,UnkA3);
REGISTER_STATIC_RPC(pRakClient,UnkA4);
REGISTER_STATIC_RPC(pRakClient,UnkA5);
}
//----------------------------------------------------
void UnRegisterRPCs(RakClientInterface * pRakClient)
{
UNREGISTER_STATIC_RPC(pRakClient,Unk1A);
UNREGISTER_STATIC_RPC(pRakClient,Unk9A);
UNREGISTER_STATIC_RPC(pRakClient,Unk6B);
UNREGISTER_STATIC_RPC(pRakClient,Unk25);
UNREGISTER_STATIC_RPC(pRakClient,Unk26);
UNREGISTER_STATIC_RPC(pRakClient,Unk27);
UNREGISTER_STATIC_RPC(pRakClient,Unk9B);
UNREGISTER_STATIC_RPC(pRakClient,Unk66);
UNREGISTER_STATIC_RPC(pRakClient,Unk28);
UNREGISTER_STATIC_RPC(pRakClient,Unk82);
UNREGISTER_STATIC_RPC(pRakClient,Unk5D);
UNREGISTER_STATIC_RPC(pRakClient,Unk5E);
UNREGISTER_STATIC_RPC(pRakClient,Unk5F);
UNREGISTER_STATIC_RPC(pRakClient,Unk3F);
UNREGISTER_STATIC_RPC(pRakClient,Unk97);
UNREGISTER_STATIC_RPC(pRakClient,Unk60);
UNREGISTER_STATIC_RPC(pRakClient,Unk98);
UNREGISTER_STATIC_RPC(pRakClient,Unk1D);
UNREGISTER_STATIC_RPC(pRakClient,Unk1E);
UNREGISTER_STATIC_RPC(pRakClient,Unk20);
UNREGISTER_STATIC_RPC(pRakClient,UnkA6);
UNREGISTER_STATIC_RPC(pRakClient,UnkA3);
UNREGISTER_STATIC_RPC(pRakClient,UnkA4);
UNREGISTER_STATIC_RPC(pRakClient,UnkA5);
UNREGISTER_STATIC_RPC(pRakClient,Unk89);
UNREGISTER_STATIC_RPC(pRakClient,Unk8A);
UNREGISTER_STATIC_RPC(pRakClient,Unk8B);
UNREGISTER_STATIC_RPC(pRakClient,Unk65);
UNREGISTER_STATIC_RPC(pRakClient,Unk80);
UNREGISTER_STATIC_RPC(pRakClient,Unk81);
}
//----------------------------------------------------

9
bot/net/netrpc.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
//----------------------------------------------------
void RegisterRPCs(RakClientInterface *);
void UnRegisterRPCs(RakClientInterface *);
//----------------------------------------------------