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

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

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

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

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

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

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

Loading…
Cancel
Save