本文整理汇总了C++中LOG_PROCESS_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_PROCESS_ERROR函数的具体用法?C++ LOG_PROCESS_ERROR怎么用?C++ LOG_PROCESS_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG_PROCESS_ERROR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LOG_PROCESS_ERROR
VOID KRankHandler::OnSwapRankRequest(BYTE* pbyData, size_t uDataLen, int nConnIndex)
{
BOOL bRetCode = FALSE;
BOOL bSucceed = FALSE;
DWORD dwId = 0;
S2R_SWAP_RANK_REQUEST* pRequest = (S2R_SWAP_RANK_REQUEST*)pbyData;
KRankPool* pRankPool = NULL;
KRole* pRole = NULL;
pRankPool = g_pGameCenter->m_RankManager.GetRankPool(pRequest->byRankId);
LOG_PROCESS_ERROR(pRankPool);
bSucceed = pRankPool->SwapRank(pRequest->dwSrcId, pRequest->dwDstId);
LOG_PROCESS_ERROR(bSucceed);
// 交换双方都发下
bRetCode = DoSwapRankRespond(nConnIndex, pRequest->byRankId, pRequest->dwSrcId, pRankPool->GetIdxById(pRequest->dwSrcId), pRequest->dwDstId, pRankPool->GetIdxById(pRequest->dwDstId), bSucceed);
LOG_PROCESS_ERROR(bRetCode);
pRole = g_pGameCenter->m_RoleManager.GetRole(pRequest->dwDstId);
if (pRole != NULL && pRole->m_nConnIndex != nConnIndex) // 在目标玩家和源玩家不在同一个gs的情况下,给目标玩家也发一次,以便更新目标玩家的竞技场信息
{
bRetCode = DoSwapRankRespond(pRole->m_nConnIndex, pRequest->byRankId, pRequest->dwSrcId, pRankPool->GetIdxById(pRequest->dwSrcId), pRequest->dwDstId, pRankPool->GetIdxById(pRequest->dwDstId), bSucceed);
LOG_PROCESS_ERROR(bRetCode);
}
EXIT0:
return;
}
示例2: QCreateMemBlock
BOOL KRankHandler::DoGetRankIdxRespond(INT nConnIndex, INT nRankId, DWORD dwSrcId, DWORD dwId, INT nRankIdx)
{
BOOL bRetCode = FALSE;
BOOL bResult = FALSE;
R2S_GET_RANK_IDX_RESPOND* pRespond = NULL;
IMemBlock* piPackage = NULL;
piPackage = QCreateMemBlock(sizeof(R2S_GET_RANK_IDX_RESPOND));
pRespond = (R2S_GET_RANK_IDX_RESPOND*)piPackage->GetData();
LOG_PROCESS_ERROR(pRespond);
pRespond->wProtocolID = r2s_get_rank_idx_respond;
pRespond->nRankId = nRankId;
pRespond->nRankIdx = nRankIdx;
pRespond->dwSrcId = dwSrcId;
pRespond->dwId = dwId;
bRetCode = Send(nConnIndex, piPackage);
LOG_PROCESS_ERROR(bRetCode);
bResult = TRUE;
EXIT0:
SAFE_RELEASE(piPackage);
return bResult;
}
示例3: PROCESS_ERROR
BOOL KRankHandler::DoSwapRankRespond(INT nConnIndex, INT nRankId, DWORD dwSrcId, INT nSrcRank, DWORD dwDestId, INT nDestRank, BOOL bSucceed)
{
BOOL bRetCode = FALSE;
BOOL bResult = FALSE;
R2S_SWAP_RANK_RESPOND* pRespond = NULL;
IMemBlock* piPackage = NULL;
KRole* pRole = g_pGameCenter->m_RoleManager.GetRole(dwSrcId);
PROCESS_ERROR(pRole);
piPackage = QCreateMemBlock(sizeof(R2S_SWAP_RANK_RESPOND));
pRespond = (R2S_SWAP_RANK_RESPOND*)piPackage->GetData();
LOG_PROCESS_ERROR(pRespond);
pRespond->wProtocolID = r2s_swap_rank_respond;
pRespond->nRankId = nRankId;
strcpy(pRespond->szSrcPlayerName, pRole->getName()); ;
pRespond->nSrcRank = nSrcRank;
pRespond->dwDestId = dwDestId;
pRespond->nDestRank = nDestRank;
pRespond->bSucceed = bSucceed;
bRetCode = Send(nConnIndex, piPackage);
LOG_PROCESS_ERROR(bRetCode);
bResult = TRUE;
EXIT0:
SAFE_RELEASE(piPackage);
return bResult;
}
示例4: assert
BOOL KSndaAgency::DoTokenVerifyRequest(KPlayerAgency* pPlayer)
{
BOOL bResult = false;
#ifdef USE_SDOA
int nRetCode = 0;
const char* pszIP = NULL;
struct in_addr RemoteIP;
u_short uRemotePort;
assert(pPlayer);
LOG_PROCESS_ERROR(m_piUserInfoAuthen);
LOG_PROCESS_ERROR(pPlayer->piSocket);
nRetCode = pPlayer->piSocket->GetRemoteAddress(&RemoteIP, &uRemotePort);
LOG_PROCESS_ERROR(nRetCode);
pszIP = inet_ntoa(RemoteIP);
LOG_PROCESS_ERROR(pszIP);
nRetCode = m_piUserInfoAuthen->AsyncGetUserInfo(pPlayer->szSndaToken, pszIP, (unsigned long)pPlayer->nIndex);
if (nRetCode != 0)
{
QLogPrintf(LOG_DEBUG, "[SDOA] AsyncGetUserInfo failed! RetCode = %d", nRetCode);
goto EXIT0;
}
bResult = true;
EXIT0:
#endif // USE_SDOA
return bResult;
}
示例5: QCONFIRM_RET_FALSE
BOOL KPurseModule::ProcessProtocol(INT nPlayerIndex, LPCBYTE pbData, UINT uDataLen)
{
QCONFIRM_RET_FALSE(nPlayerIndex > 0);
QCONFIRM_RET_FALSE(pbData != NULL && uDataLen > 0);
KPlayer* pPlayer = g_cPlayerMgr.GetByIndex(nPlayerIndex);
QCONFIRM_RET_FALSE(NULL != pPlayer);
KPlayerPurse* pPlayerPurse = pPlayer->GetCtrl<KPlayerPurse>();
QCONFIRM_RET_FALSE(NULL != pPlayerPurse);
KPTC_HEADER_BASE *pData = (KPTC_HEADER_BASE*)pbData;
switch (pData->byProtocol)
{
case emPURSE_PTC_C2S_SYNC_AL_CHEMY:
KPlayer* pPlayer = g_cPlayerMgr.GetByIndex(nPlayerIndex);
LOG_PROCESS_ERROR(pPlayer);
KPlayerPurse* pPlayerPurse = pPlayer->GetCtrl<KPlayerPurse>();
LOG_PROCESS_ERROR(pPlayerPurse);
// ×ö³ö´ðÌâÑ¡Ôñ
C2S_PURSE_SYNC_AL_CHEMY* ptcAward = (C2S_PURSE_SYNC_AL_CHEMY*)pData;
pPlayerPurse->SyncBowlData(ptcAward->nRefresh);
break;
}
EXIT0:
return TRUE;
}
示例6: g_OpenIniFile
BOOL KSndaAgency::LoadConfig()
{
BOOL bResult = false;
BOOL bRetCode = false;
IIniFile* piIniFile = NULL;
piIniFile = g_OpenIniFile(GATEWAY_CONFIG_FILE);
LOG_PROCESS_ERROR(piIniFile);
m_bOpen = true;
bRetCode = piIniFile->IsSectionExist("SDOA");
if (!bRetCode)
{
m_bOpen = false;
goto EXIT1;
}
bRetCode = piIniFile->GetString("SDOA", "AdultIDCard", "not configed", m_szAdultIDCard, sizeof(m_szAdultIDCard));
LOG_PROCESS_ERROR(bRetCode);
EXIT1:
bResult = true;
EXIT0:
SAFE_RELEASE(piIniFile);
return bResult;
}
示例7: QCreateMemBlock
BOOL KQueueSlave::DoCreateOverallTeamRequest(INT nPlayerId, LPCTSTR szPlayerName, BYTE byPlayerLevel, BYTE byPlayerSex, INT nFightScore, INT nMapId, INT nRequireFightScore)
{
BOOL bResult = false;
BOOL bRetCode = false;
IMemBlock* piPackage = NULL;
R2M_OVERALL_CREATE_TEAM_REQUEST* pRequest = NULL;
INT nConnIndex = 0;
piPackage = QCreateMemBlock(sizeof(R2M_OVERALL_CREATE_TEAM_REQUEST));
LOG_PROCESS_ERROR(piPackage);
pRequest = (R2M_OVERALL_CREATE_TEAM_REQUEST*)piPackage->GetData();
LOG_PROCESS_ERROR(pRequest);
pRequest->wProtocolID = r2m_overall_create_team_request;
pRequest->nCreaterId = nPlayerId;
pRequest->nInstanceMapId = nMapId;
pRequest->nServerId = 1; // 先暂定为1,以后每个服一个编号
pRequest->nRequireFightScore = nRequireFightScore;
strncpy(pRequest->szPlayerName, szPlayerName, MAX_NAME_LEN);
pRequest->byCreaterLevel = byPlayerLevel;
pRequest->byCreaterSex = byPlayerSex;
pRequest->nCreaterFightScore = nFightScore;
bRetCode = Send(piPackage);
LOG_PROCESS_ERROR(bRetCode);
bResult = true;
EXIT0:
SAFE_RELEASE(piPackage);
return bResult;
}
示例8: wxT
void CMainFrame::OnCreateItemOnListView(wxCommandEvent& event)
{
wxString btnString = event.GetString();
/*if (btnString.Find(m_leftWindow->getSkillRootID().GetID()) == "")
{
}*/
wxString selText = wxT("");
LOG_PROCESS_ERROR (m_leftWindow && m_rightWindow);
wxTreeItemId selItem = m_leftWindow->GetSelection();
LOG_PROCESS_ERROR (selItem.IsOk());
if (selItem == m_leftWindow->getSkillRootID())
{
m_rightWindow->showGridPage(ECreateItemType_Skill, true);
}else if (selItem == m_leftWindow->getAuraRootID())
{
m_rightWindow->showGridPage(ECreateItemType_Aura);
}else if (selItem == m_leftWindow->getEotRootID())
{
m_rightWindow->showGridPage(ECreateItemType_Eot);
}
selText = m_leftWindow->GetItemText(selItem);
wxLogMessage(selText);
return;
Exit0:
return;
}
示例9: QCreateMemBlock
BOOL KRecordHandler::DoGetAllPurchaseRespond(INT nConnIndex, INT nShopId, INT nCategoryId, INT nGoodsId, INT nCount, INT nBuycount, DWORD dwRoleId)
{
BOOL bRetCode = FALSE;
BOOL bResult = FALSE;
R2S_BUY_ALL_PURCHASE_REQUEST* pRespond = NULL;
IMemBlock* piPackage = NULL;
piPackage = QCreateMemBlock(sizeof(R2S_BUY_ALL_PURCHASE_REQUEST));
pRespond = (R2S_BUY_ALL_PURCHASE_REQUEST*)piPackage->GetData();
LOG_PROCESS_ERROR(pRespond);
pRespond->wProtocolID = r2s_get_all_purchase_buy_respond;
pRespond->nShopId = nShopId;
pRespond->nCategoryId = nCategoryId;
pRespond->nGoodsId = nGoodsId;
pRespond->nCount = nCount;
pRespond->dwRoleId = dwRoleId;
pRespond->nBuyCount = nBuycount;
bRetCode = Send(nConnIndex, piPackage);
LOG_PROCESS_ERROR(bRetCode);
bResult = TRUE;
EXIT0:
SAFE_RELEASE(piPackage);
return bResult;
}
示例10: LOG_PROCESS_ERROR
INT KNetConnectPlayer::OnClientLogin2( DWORD dwRoleId, const GUID& rConnGuid, INT nConnectId, BOOL bHidden /*= FALSE*/,BOOL bTinyTerminal)
{
INT nRetCode = FALSE;
KPlayer* pPlayer = NULL;
INT nPlayerIndex = 0;
pPlayer = g_cPlayerMgr.GetById(dwRoleId);
LOG_PROCESS_ERROR(pPlayer);
LOG_PROCESS_ERROR(pPlayer->GetGameState() == gsWaitForConnect);
LOG_PROCESS_ERROR(pPlayer->m_cPlayerServer.m_Guid == rConnGuid);
pPlayer->SetTinyTerminal(bTinyTerminal);
nPlayerIndex = pPlayer->GetPlayerIndex();
m_pnConnId2PlayerIndex[nConnectId] = nPlayerIndex;
m_pnPlayerIndex2ConnId[nPlayerIndex] = nConnectId;
m_mpAccount2Player[pPlayer->m_cPlayerServer.m_strAccount] = nPlayerIndex;
g_RelayClient.DoConfirmPlayerLoginRequest(dwRoleId);
pPlayer->SetGameState(gsWaitForPermit);
pPlayer->m_nTimer = 0;
nRetCode = TRUE;
EXIT0:
if (!nRetCode)
{
QLogPrintf(LOG_INFO, "Invalid Client: %d\n", nConnectId);
if (pPlayer)
QLogPrintf(LOG_INFO, "Player %d state %d\n", dwRoleId, pPlayer->GetGameState());
}
return nRetCode;
}
示例11: LOG_PROCESS_ERROR
void QMailModule::OnQueryMailContent(KPlayer* pPlayer, char* pData, size_t uDataLen)
{
BOOL bRetCode = false;
KNpc* pNpc = NULL;
C2S_QUERY_MAIL_CONTENT* pPak = (C2S_QUERY_MAIL_CONTENT*)pData;
LOG_PROCESS_ERROR(pPlayer);
LOG_PROCESS_ERROR(pData);
LOG_PROCESS_ERROR(uDataLen == sizeof(C2S_QUERY_MAIL_CONTENT));
LOG_PROCESS_ERROR(pPak->dwMailID);
// if (pPak->byMailType != eMailType_GmMessage && pPak->byMailType != eMailType_PlayerMessage)
// {
// pNpc = 0; // TODO get by id(pPak->dwNpcID);
// LOG_PROCESS_ERROR(pNpc);
// //LOG_PROCESS_ERROR(pNpc is Mailbox);
//
// bRetCode = g_InRange(pPlayer, pNpc, COMMON_PLAYER_OPERATION_DISTANCE);
// LOG_PROCESS_ERROR(bRetCode);
// }
//
// PROCESS_ERROR(pPlayer->m_eMoveState == cmsOnStand);
bRetCode = MailRelayClient::DoQueryMailContent(pPlayer->m_dwId, pPak->dwMailID, pPak->byMailType);
LOG_PROCESS_ERROR(bRetCode);
EXIT0:
return;
}
示例12: PROCESS_ERROR
BOOL FactionManager::SetLevel( KCharacter& rcCharacter, WORD wOldValue, WORD wNewValue )
{
//QLogPrintf(LOG_INFO,"..FactionManager::SetLevel..");
BOOL bRetCode = FALSE;
PlayerFaction* playerFaction = NULL;
PROCESS_ERROR(rcCharacter.GetLevel() && wOldValue != wNewValue);
playerFaction = rcCharacter.GetCtrl<PlayerFaction>();
LOG_PROCESS_ERROR(playerFaction);
playerFaction->OnFactionRouteChange(rcCharacter.GetLevel(), rcCharacter.GetPrimaryFaction(), rcCharacter.GetCurrentRoute());
playerFaction->OnLevelChange(wOldValue, wNewValue);
if (wOldValue != 0 && wOldValue != wNewValue && wNewValue == ARENA_OPEN_LEVEL)
{
// 按战斗力加入竞技场排行榜
PlayerArena* pPlayerArena = rcCharacter.GetCtrl<PlayerArena>();
LOG_PROCESS_ERROR(pPlayerArena);
pPlayerArena->AddArenaRank();
}
g_cCharacterHelper.CalcFightScore(rcCharacter); // 这句话和上面的AddArenaRank顺序不能变,涉及到排名顺序问题
bRetCode = TRUE;
EXIT0:
return bRetCode;
}
示例13: QCONFIRM_RET_FALSE
BOOL TargetModule::ProcessProtocol(INT nPlayerIndex, LPCBYTE pbData, UINT uDataLen)
{
QCONFIRM_RET_FALSE(pbData);
KPTC_HEADER_BASE *pData = (KPTC_HEADER_BASE*)pbData;
PlayerTarget* pPlayerTarget = NULL;
KPlayer* pPlayer = g_cPlayerMgr.GetByIndex(nPlayerIndex);
LOG_PROCESS_ERROR(pPlayer);
pPlayerTarget = pPlayer->GetCtrl<PlayerTarget>();
LOG_PROCESS_ERROR(pPlayerTarget);
switch (pData->byProtocol)
{
case emTARGET_PTC_C2S_SYNC:
pPlayerTarget->SyncTarget();
break;
case emTARGET_PTC_C2S_GETAWARD:
TARGET_C2S_GETAWARD* ptcAward = (TARGET_C2S_GETAWARD*)pData;
pPlayerTarget->GetAward(ptcAward->nDay, ptcAward->nId);
break;
}
return TRUE;
EXIT0:
return FALSE;
}
示例14: LOG_PROCESS_ERROR
INT KGC_CoordinatorClient::Send( IMemBlock* piBuffer )
{
INT nRet = FALSE;
LOG_PROCESS_ERROR(m_piSocket);
nRet = m_piSocket->Send(piBuffer);
LOG_PROCESS_ERROR(nRet);
EXIT0:
return nRet;
}
示例15: LoadConfig
BOOL KSndaAgency::Init()
{
BOOL bResult = false;
int nRetCode = false;
#ifdef USE_SDOA
KSdoaCreateUserInfoAuthenFunc SdoaCreateUserInfoAuthen = NULL;
nRetCode = LoadConfig();
LOG_PROCESS_ERROR(nRetCode);
PROCESS_SUCCESS(!m_bOpen);
m_hSDOALibrary = KG_LoadLibrary(SDOA_DLL_FILE);
LOG_PROCESS_ERROR(m_hSDOALibrary);
SdoaCreateUserInfoAuthen = (KSdoaCreateUserInfoAuthenFunc)KG_GetProcessAddress(m_hSDOALibrary, "sdoaCreateUserInfoAuthen");
LOG_PROCESS_ERROR(SdoaCreateUserInfoAuthen);
m_piUserInfoAuthen = SdoaCreateUserInfoAuthen();
LOG_PROCESS_ERROR(m_piUserInfoAuthen);
nRetCode = m_piUserInfoAuthen->Initialize(SDOA_CONFIG_FILE, &SdoaUserInfoCallBackFunc);
if (nRetCode != 0)
{
QLogPrintf(LOG_DEBUG, "[SDOA] Initialize failed! RetCode = %d", nRetCode);
goto EXIT0;
}
#endif // USE_SDOA
EXIT1:
bResult = true;
EXIT0:
if (!bResult)
{
QThread_Sleep(10000);
#ifdef USE_SDOA
SAFE_RELEASE(m_piUserInfoAuthen);
if (m_hSDOALibrary)
{
KG_FreeLibrary(m_hSDOALibrary);
m_hSDOALibrary = NULL;
}
#endif // USE_SDOA
}
if (m_bOpen)
{
QLogPrintf(LOG_INFO, "[SDOA] Initialize %s!", bResult ? "succeed" : "failed");
}
return bResult;
}