Browse Source

Convert public age list request to plString

Adam Johnson 10 years ago
parent
commit
bb09ad82fd
  1. 6
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp
  2. 2
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.h
  3. 14
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  4. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.h

6
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

@ -1168,7 +1168,7 @@ void NetCommDeletePlayer ( // --> plNetCommDeletePlayerMsg
//============================================================================ //============================================================================
void NetCommGetPublicAgeList (//-> plNetCommPublicAgeListMsg void NetCommGetPublicAgeList (//-> plNetCommPublicAgeListMsg
const char ageName[], const plString& ageName,
void * param, void * param,
plNetCommReplyMsg::EParamType ptype plNetCommReplyMsg::EParamType ptype
) { ) {
@ -1176,10 +1176,8 @@ void NetCommGetPublicAgeList (//-> plNetCommPublicAgeListMsg
cp->param = param; cp->param = param;
cp->type = ptype; cp->type = ptype;
wchar_t wStr[MAX_PATH];
StrToUnicode(wStr, ageName, arrsize(wStr));
NetCliAuthGetPublicAgeList( NetCliAuthGetPublicAgeList(
wStr, ageName,
INetCliAuthGetPublicAgeListCallback, INetCliAuthGetPublicAgeListCallback,
cp cp
); );

2
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.h

@ -219,7 +219,7 @@ void NetCommDeletePlayer ( // --> plNetCommDeletePlayerMsg
void * param void * param
); );
void NetCommGetPublicAgeList (//-> plNetCommPublicAgeListMsg void NetCommGetPublicAgeList (//-> plNetCommPublicAgeListMsg
const char ageName[], const plString& ageName,
void * param, void * param,
plNetCommReplyMsg::EParamType ptype = plNetCommReplyMsg::kParamTypeOther plNetCommReplyMsg::EParamType ptype = plNetCommReplyMsg::kParamTypeOther
); );

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

@ -427,13 +427,13 @@ struct GetPublicAgeListTrans : NetAuthTrans {
void * m_param; void * m_param;
// send // send
wchar_t m_ageName[MAX_PATH]; plString m_ageName;
// recv // recv
ARRAY(NetAgeInfo) m_ages; ARRAY(NetAgeInfo) m_ages;
GetPublicAgeListTrans ( GetPublicAgeListTrans (
const wchar_t ageName[], const plString& ageName,
FNetCliAuthGetPublicAgeListCallback callback, FNetCliAuthGetPublicAgeListCallback callback,
void * param void * param
); );
@ -3218,14 +3218,14 @@ bool AccountChangePasswordRequestTrans::Recv (
//============================================================================ //============================================================================
GetPublicAgeListTrans::GetPublicAgeListTrans ( GetPublicAgeListTrans::GetPublicAgeListTrans (
const wchar_t ageName[], const plString& ageName,
FNetCliAuthGetPublicAgeListCallback callback, FNetCliAuthGetPublicAgeListCallback callback,
void * param void * param
) : NetAuthTrans(kGetPublicAgeListTrans) ) : NetAuthTrans(kGetPublicAgeListTrans)
, m_ageName(ageName)
, m_callback(callback) , m_callback(callback)
, m_param(param) , m_param(param)
{ {
StrCopy(m_ageName, ageName, arrsize(m_ageName));
} }
//============================================================================ //============================================================================
@ -3233,10 +3233,12 @@ bool GetPublicAgeListTrans::Send () {
if (!AcquireConn()) if (!AcquireConn())
return false; return false;
plStringBuffer<uint16_t> ageName = m_ageName.ToUtf16();
const uintptr_t msg[] = { const uintptr_t msg[] = {
kCli2Auth_GetPublicAgeList, kCli2Auth_GetPublicAgeList,
m_transId, m_transId,
(uintptr_t) &m_ageName, (uintptr_t) ageName.GetData(),
}; };
m_conn->Send(msg, arrsize(msg)); m_conn->Send(msg, arrsize(msg));
@ -5414,7 +5416,7 @@ void NetCliAuthSetAgePublic (
//============================================================================ //============================================================================
void NetCliAuthGetPublicAgeList ( void NetCliAuthGetPublicAgeList (
const wchar_t ageName[], const plString& ageName,
FNetCliAuthGetPublicAgeListCallback callback, FNetCliAuthGetPublicAgeListCallback callback,
void * param void * param
) { ) {

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.h

@ -258,7 +258,7 @@ typedef void (*FNetCliAuthGetPublicAgeListCallback)(
const ARRAY(NetAgeInfo) & ages const ARRAY(NetAgeInfo) & ages
); );
void NetCliAuthGetPublicAgeList ( void NetCliAuthGetPublicAgeList (
const wchar_t ageName[], const plString& ageName,
FNetCliAuthGetPublicAgeListCallback callback, FNetCliAuthGetPublicAgeListCallback callback,
void * param void * param
); );

Loading…
Cancel
Save