[bot] Implement ScrDisplayGameText(...)

This commit is contained in:
RD42 2024-06-02 22:21:36 +08:00
parent 7714efcbee
commit 1b58865926
3 changed files with 27 additions and 8 deletions

View File

@ -30,9 +30,28 @@ void ScrUnk47(RPCParameters *rpcParams)
void ScrUnk48(RPCParameters *rpcParams) {} void ScrUnk48(RPCParameters *rpcParams) {}
void ScrUnk49(RPCParameters *rpcParams) void ScrDisplayGameText(RPCParameters *rpcParams)
{ {
// TODO: ScrUnk49 PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
int iBitLength = rpcParams->numberOfBitsOfData;
PlayerID sender = rpcParams->sender;
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
char szMessage[512];
int iType;
int iTime;
int iLength;
bsData.Read(iType);
bsData.Read(iTime);
bsData.Read(iLength);
if(iLength > 512) return;
bsData.Read(szMessage,iLength);
szMessage[iLength] = '\0';
//OutputDebugString(szMessage);
} }
void ScrUnk9C(RPCParameters *rpcParams) {} void ScrUnk9C(RPCParameters *rpcParams) {}
@ -112,7 +131,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk46); REGISTER_STATIC_RPC(pRakClient, ScrUnk46);
REGISTER_STATIC_RPC(pRakClient, ScrUnk47); REGISTER_STATIC_RPC(pRakClient, ScrUnk47);
REGISTER_STATIC_RPC(pRakClient, ScrUnk48); REGISTER_STATIC_RPC(pRakClient, ScrUnk48);
REGISTER_STATIC_RPC(pRakClient, ScrUnk49); REGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
REGISTER_STATIC_RPC(pRakClient, ScrUnk9C); REGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
REGISTER_STATIC_RPC(pRakClient, ScrUnk9D); REGISTER_STATIC_RPC(pRakClient, ScrUnk9D);
REGISTER_STATIC_RPC(pRakClient, ScrUnk9E); REGISTER_STATIC_RPC(pRakClient, ScrUnk9E);
@ -186,7 +205,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk47); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk47);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk48); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk48);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk49); UNREGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9C); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9D); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9D);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9E); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9E);

View File

@ -133,7 +133,7 @@
#define RPC_ScrUnk46 "\x46" #define RPC_ScrUnk46 "\x46"
#define RPC_ScrUnk47 "\x47" #define RPC_ScrUnk47 "\x47"
#define RPC_ScrUnk48 "\x48" #define RPC_ScrUnk48 "\x48"
#define RPC_ScrUnk49 "\x49" #define RPC_ScrDisplayGameText "\x49"
#define RPC_ScrUnk9C "\x9C" #define RPC_ScrUnk9C "\x9C"
#define RPC_ScrUnk9D "\x9D" #define RPC_ScrUnk9D "\x9D"
#define RPC_ScrUnk9E "\x9E" #define RPC_ScrUnk9E "\x9E"

View File

@ -60,7 +60,7 @@ void ScrUnk0E(RPCParameters *rpcParams) {}
void ScrUnk46(RPCParameters *rpcParams) {} void ScrUnk46(RPCParameters *rpcParams) {}
void ScrUnk47(RPCParameters *rpcParams) {} void ScrUnk47(RPCParameters *rpcParams) {}
void ScrUnk48(RPCParameters *rpcParams) {} void ScrUnk48(RPCParameters *rpcParams) {}
void ScrUnk49(RPCParameters *rpcParams) {} void ScrDisplayGameText(RPCParameters *rpcParams) {}
void ScrUnk9C(RPCParameters *rpcParams) {} void ScrUnk9C(RPCParameters *rpcParams) {}
void ScrUnk9D(RPCParameters *rpcParams) {} void ScrUnk9D(RPCParameters *rpcParams) {}
void ScrUnk9E(RPCParameters *rpcParams) {} void ScrUnk9E(RPCParameters *rpcParams) {}
@ -160,7 +160,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk46); REGISTER_STATIC_RPC(pRakClient, ScrUnk46);
REGISTER_STATIC_RPC(pRakClient, ScrUnk47); REGISTER_STATIC_RPC(pRakClient, ScrUnk47);
REGISTER_STATIC_RPC(pRakClient, ScrUnk48); REGISTER_STATIC_RPC(pRakClient, ScrUnk48);
REGISTER_STATIC_RPC(pRakClient, ScrUnk49); REGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
REGISTER_STATIC_RPC(pRakClient, ScrUnk9C); REGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
REGISTER_STATIC_RPC(pRakClient, ScrUnk9D); REGISTER_STATIC_RPC(pRakClient, ScrUnk9D);
REGISTER_STATIC_RPC(pRakClient, ScrUnk9E); REGISTER_STATIC_RPC(pRakClient, ScrUnk9E);
@ -268,7 +268,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk47); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk47);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk48); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk48);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk49); UNREGISTER_STATIC_RPC(pRakClient, ScrDisplayGameText);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9C); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9C);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9D); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9D);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9E); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk9E);