本文整理汇总了C++中CNetMsg类的典型用法代码示例。如果您正苦于以下问题:C++ CNetMsg类的具体用法?C++ CNetMsg怎么用?C++ CNetMsg使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CNetMsg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StashSealMsg
void StashSealMsg(CNetMsg &m_msg, int m1, int m2, char m3) // CHECKED
{
m_msg.Init(112);
m_msg.__ls((unsigned char)14);
m_msg.__ls((int)m1);
m_msg.__ls((int)m2);
m_msg.__ls((char)m3);
}
示例2: PreopenGiftErrorMsg
void PreopenGiftErrorMsg(CNetMsg &m_msg, int m1, int m2, _tagMsgConnErrorCode m3) // CHECKED
{
m_msg.Init(112);
m_msg.__ls((unsigned char)9);
m_msg.__ls((int)m1);
m_msg.__ls((int)m2);
m_msg.__ls((char)m3);
}
示例3: do_Pulse
void do_Pulse(CPC *a1, CNetMsg &a2) // Y U NO BOOL?
{
int dest; // [sp+14h] [bp-4h]@1
a2.MoveFirst();
a2.__rs(dest); // (int &) CHECKED
a1->Unk768->CheckHackPulse(dest); // return skipped
}
示例4: ConnCashItemPurchaseHistoryRep
void ConnCashItemPurchaseHistoryRep(CNetMsg::SP& msg, int userindex, int charindex, int y, int m, int d)
{
CLCString sql(4096);
int ctid = -1, preCtid = -1, i;
sql.Format("select * from t_purchase0%d where a_user_idx = %d and a_server = %d "
"and year(a_pdate) = %d and month(a_pdate) = %d and dayofmonth(a_pdate) = %d order by a_ctid ", userindex % 10, userindex, gserver.m_serverno, y, m, d);
CDBCmd cmd;
cmd.Init(&gserver.m_dbuser);
cmd.SetQuery(sql);
msg->Init(MSG_CONN_REP);
RefMsg(msg) << (unsigned char) MSG_CONN_CASHITEM_PURCHASEHISTORY_REP;
i = 0;
if( !cmd.Open() )
{
RefMsg(msg) << charindex
<< (unsigned char) MSG_EX_CASHITEM_ERROR_CONN << i;
return;
}
if( !cmd.MoveFirst() )
{
RefMsg(msg) << charindex
<< (unsigned char) MSG_EX_CASHITEM_ERROR_SUCCESS << i;
return;
}
CNetMsg ctmsg;
ctmsg.Init();
int j = 1;
do
{
cmd.GetRec("a_ctid", ctid);
if( preCtid != -1 && preCtid != ctid )
{
ctmsg << i
<< preCtid;
i = 0;
j++;
}
preCtid = ctid;
i++;
}
while(cmd.MoveNext() );
ctmsg << i << ctid;
RefMsg(msg) << charindex
<< (unsigned char) MSG_EX_CASHITEM_ERROR_SUCCESS << j << ctmsg;
}
示例5: StashCheckPasswordMsg
void StashCheckPasswordMsg(CNetMsg &m_msg, int m1, int m2, char m3) // CHECKED
{
m_msg.Init(112);
m_msg.__ls((char)12);
m_msg.__ls((int)m1);
m_msg.__ls((int)m2);
m_msg.__ls((char const *)"");
m_msg.__ls((char)m3);
}
示例6: StashChangePasswordMsg
void StashChangePasswordMsg(CNetMsg &m_msg, int m1, int m2, char const *m3, char m4) // CHECKED
{
m_msg.Init(112);
m_msg.__ls((unsigned char)13);
m_msg.__ls((int)m1);
m_msg.__ls((int)m2);
m_msg.__ls((char const *)"");
m_msg.__ls((char const *)m3);
m_msg.__ls((char)m4);
}
示例7: GetBroadcastResponse
//Gets
CNetMsg CServer::GetBroadcastResponse(void) const
{
//NOTE: This is not tested, I am unsure if this memory will need to be deleted
char* pBuffer = NULL;
uint uiLen = 0;
this->m_pRak->GetOfflinePingResponse(&pBuffer, &uiLen);
CNetMsg ret;
ret.WriteRaw(pBuffer, uiLen);
return ret;
}
示例8: MsgrWhisperNotfoundMsg
void MsgrWhisperNotfoundMsg(CNetMsg &netmsg, int a2, int a3, int a4, int a5, int a6, const char *a7)
{
netmsg.Init(102);
netmsg.__ls(a2);
netmsg.__ls(a3);
netmsg.__ls(a4);
netmsg.__ls(5);
netmsg.__ls(3);
netmsg.__ls(a6);
netmsg.__ls(a7);
}
示例9: MsgrLogoutRepMsg
void MsgrLogoutRepMsg(CNetMsg &netmsg, int a2, int a3, int a4, int a5, char a6, const char *a7)
{
netmsg.Init(102);
netmsg.__ls(a2);
netmsg.__ls(a3);
netmsg.__ls(a4);
netmsg.__ls(a5);
netmsg.__ls(9);
netmsg.__ls(a6);
netmsg.__ls(a7);
}
示例10: SetBroadcastResponse
bool CServer::SetBroadcastResponse(CNetMsg& msg)
{
//Early Out
if (this->m_pRak == NULL)
return false;
//Response can't be over 400 bytes
if (msg.GetWrite() > 400)
return false;
this->m_pRak->SetOfflinePingResponse(msg.GetData(), msg.GetWrite());
return true;
}
示例11: UserRegRepMsg
void UserRegRepMsg(CNetMsg& msg, int subno, int userindex, BM_USER_REG_ERROR_TYPE errcode)
{
msg.Init(BM_USER_REG_REP);
msg << subno
<< userindex
<< errcode;
}
示例12: SupItemRepMsg
void SupItemRepMsg(CNetMsg& rmsg, int charindex, bool isstart, CSupItem ** supItem )
{
// listmsg
// listflag userindex charindex count a_index itemindex itemflag itemplus itemcount
int listflag = 0, userindex;
if(isstart)
listflag |= (1 << 0);
userindex = (*supItem)->userId();
rmsg.Init(BM_ITEM_REP);
CNetMsg temp;
temp.Init();
for(int i = 0; i < 20 && (*supItem); i++)
{
temp << (*supItem)->index()
<< (*supItem)->itemIndex()
<< (*supItem)->itemFlag()
<< (*supItem)->itemPlus()
<< (*supItem)->itemCount();
GAMELOG << init("BillItem_List");
GAMELOG << (*supItem)->index() << delim
<< (*supItem)->catalId() << delim
<< (*supItem)->server() << delim
<< (*supItem)->userId() << delim
<< (*supItem)->itemIndex() << delim
<< (*supItem)->itemFlag() << delim
<< (*supItem)->itemPlus() << delim
<< (*supItem)->itemCount() << delim
<< i
<< end;
(*supItem) = (*supItem)->next();
}
if( !(*supItem) ) listflag |= (1 << 1);
rmsg << listflag
<< userindex
<< charindex;
rmsg << i << temp;
}
示例13: SetItemRepMsg
void SetItemRepMsg(CNetMsg& rmsg, int userindex, int subno, int charindex, MSG_BBILLINFO_ITEM_ERROR_TYPE subtype)
{
rmsg.Init(BM_SET_ITEM_REP);
rmsg << userindex
<< subno
<< charindex
<< (char) subtype;
}
示例14: CashBalanceRepMsg
void CashBalanceRepMsg(CNetMsg& msg, BILL_ERROR_MESSAGE_TYPE errcode, char gameID, int userindex, int cpID, int balance)
{
msg.Init(MSG_BILLITEM_CASHBALANCE_REP);
msg << (unsigned char) errcode
<< gameID
<< userindex
<< cpID
<< balance;
}
示例15: do_UseStatPoint
void do_UseStatPoint(CPC *a1, CNetMsg &a2)
{
short v4; // [sp+Eh] [bp-1Ah]@7
_tagStatPointUseType v6; // [sp+26h] [bp-2h]@1
unsigned char dest; // [sp+27h] [bp-1h]@1
CNetMsg v5;
a2.MoveFirst();
a2.__rs(dest); // (unsigned char &) CHECKED
a2.__rs(v6); // (unsigned char &) CHECKED
if(dest != 1)
return;
if(a1->Unk740 <= 0)
{
StatPointErrorMsg(v5, 0);
if(a1->Unk768)
a1->Unk768->WriteToOutput(v5);
return;
}
if(a1->UseStatPoint(v6, &v4))
{
StatPointUseMsg(v5, a1, v6, v4);
if(a1->Unk768)
a1->Unk768->WriteToOutput(v5);
return;
}
StatPointErrorMsg(v5, 1);
if(a1->Unk768)
a1->Unk768->WriteToOutput(v5);
return;
}