本文整理汇总了C++中MMatchObject::CheckNewbie方法的典型用法代码示例。如果您正苦于以下问题:C++ MMatchObject::CheckNewbie方法的具体用法?C++ MMatchObject::CheckNewbie怎么用?C++ MMatchObject::CheckNewbie使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MMatchObject
的用法示例。
在下文中一共展示了MMatchObject::CheckNewbie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAsyncGetAccountCharList
void MMatchServer::OnAsyncGetAccountCharList(MAsyncJob* pJobResult)
{
MAsyncDBJob_GetAccountCharList* pJob = (MAsyncDBJob_GetAccountCharList*)pJobResult;
if (pJob->GetResult() != MASYNC_RESULT_SUCCEED) {
char szTime[128]="";
_strtime(szTime);
mlog("[%s] Async DB Query(ResponseAccountCharList) Failed\n", szTime);
return;
}
MMatchObject* pObj = GetObject(pJob->GetUID());
if (pObj == NULL)
return;
const int nCharCount = pJob->GetCharCount();
const MTD_AccountCharInfo * pCharList = pJob->GetCharList();
MTD_AccountCharInfo* pTransCharInfo = NULL;
int nCharMaxLevel = 0;
MCommand* pNewCmd = CreateCommand(MC_MATCH_RESPONSE_ACCOUNT_CHARLIST, MUID(0,0));
void* pCharArray = MMakeBlobArray(sizeof(MTD_AccountCharInfo), nCharCount);
for (int i = 0; i < nCharCount; i++)
{
pTransCharInfo = (MTD_AccountCharInfo*)MGetBlobArrayElement(pCharArray, i);
memcpy(pTransCharInfo, &pCharList[i], sizeof(MTD_AccountCharInfo));
nCharMaxLevel = max(nCharMaxLevel, pTransCharInfo->nLevel);
}
pObj->CheckNewbie( nCharMaxLevel );
pNewCmd->AddParameter(new MCommandParameterBlob(pCharArray, MGetBlobArraySize(pCharArray)));
MEraseBlobArray(pCharArray);
RouteToListener( pObj, pNewCmd );
}