Browse Source

Stub out the Auth2Cli ServerCaps message

This allows an OpenUru client to connect to a DIRTSAND server for
testing.

Co-Authored-By: Adam Johnson <AdamJohnso@gmail.com>
ticket/56
Darryl Pogue 5 months ago
parent
commit
101ebbd717
  1. 6
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.cpp
  2. 10
      Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.h
  3. 12
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

6
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.cpp

@ -617,6 +617,11 @@ static const NetMsgField kScoreGetRanksReplyFields[] = {
NET_MSG_FIELD_VAR_PTR(), // nodeBuffer NET_MSG_FIELD_VAR_PTR(), // nodeBuffer
}; };
static const NetMsgField kServerCapsFields[] = {
NET_MSG_FIELD_VAR_COUNT(1, 1024 * 1024), // capsBytes
NET_MSG_FIELD_VAR_PTR(), // capsBuffer
};
} using namespace Cli2Auth; } using namespace Cli2Auth;
@ -719,3 +724,4 @@ const NetMsg kNetMsg_Auth2Cli_ScoreAddPointsReply = NET_MSG(kAuth2Cli_ScoreAddP
const NetMsg kNetMsg_Auth2Cli_ScoreTransferPointsReply = NET_MSG(kAuth2Cli_ScoreTransferPointsReply, kScoreTransferPointsReplyFields); const NetMsg kNetMsg_Auth2Cli_ScoreTransferPointsReply = NET_MSG(kAuth2Cli_ScoreTransferPointsReply, kScoreTransferPointsReplyFields);
const NetMsg kNetMsg_Auth2Cli_ScoreSetPointsReply = NET_MSG(kAuth2Cli_ScoreSetPointsReply, kScoreSetPointsReplyFields); const NetMsg kNetMsg_Auth2Cli_ScoreSetPointsReply = NET_MSG(kAuth2Cli_ScoreSetPointsReply, kScoreSetPointsReplyFields);
const NetMsg kNetMsg_Auth2Cli_ScoreGetRanksReply = NET_MSG(kAuth2Cli_ScoreGetRanksReply, kScoreGetRanksReplyFields); const NetMsg kNetMsg_Auth2Cli_ScoreGetRanksReply = NET_MSG(kAuth2Cli_ScoreGetRanksReply, kScoreGetRanksReplyFields);
const NetMsg kNetMsg_Auth2Cli_ServerCaps = NET_MSG(kAuth2Cli_ServerCaps, kServerCapsFields);

10
Sources/Plasma/NucleusLib/pnNetProtocol/Private/Protocols/Cli2Auth/pnNpCli2Auth.h

@ -210,6 +210,8 @@ enum {
kAuth2Cli_AccountExistsReply, kAuth2Cli_AccountExistsReply,
kAuth2Cli_ServerCaps = 0x1002,
kNumAuth2CliMessages kNumAuth2CliMessages
}; };
COMPILER_ASSERT_HEADER(Cli2Auth, kNumAuth2CliMessages <= (word)-1); COMPILER_ASSERT_HEADER(Cli2Auth, kNumAuth2CliMessages <= (word)-1);
@ -1043,6 +1045,14 @@ struct Auth2Cli_ScoreGetRanksReply {
// no more fields // no more fields
}; };
// ServerCaps
extern const NetMsg kNetMsg_Auth2Cli_ServerCaps;
struct Auth2Cli_ServerCaps {
dword messageId;
dword byteCount;
byte buffer[1]; // [byteCount], actually
};
//============================================================================ //============================================================================
// END PACKED DATA STRUCTURES // END PACKED DATA STRUCTURES
//============================================================================ //============================================================================

12
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -2370,6 +2370,17 @@ static bool Recv_ScoreGetRanksReply (
return true; return true;
} }
//============================================================================
static bool Recv_ServerCaps(
const byte msg[],
unsigned bytes,
void *
) {
// Ignore the message
return true;
}
/***************************************************************************** /*****************************************************************************
* *
* Cli2Auth protocol * Cli2Auth protocol
@ -2473,6 +2484,7 @@ static NetMsgInitRecv s_recv[] = {
{ MSG(ScoreSetPointsReply) }, { MSG(ScoreSetPointsReply) },
{ MSG(ScoreGetRanksReply) }, { MSG(ScoreGetRanksReply) },
{ MSG(AccountExistsReply) }, { MSG(AccountExistsReply) },
{ MSG(ServerCaps) },
}; };
#undef MSG #undef MSG

Loading…
Cancel
Save