本文整理汇总了C++中MMatchObject::GetCharInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ MMatchObject::GetCharInfo方法的具体用法?C++ MMatchObject::GetCharInfo怎么用?C++ MMatchObject::GetCharInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MMatchObject
的用法示例。
在下文中一共展示了MMatchObject::GetCharInfo方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAsyncBuyQuestItem
void MMatchServer::OnAsyncBuyQuestItem( MAsyncJob* pJobReslt )
{
MAsyncDBJob_BuyQuestItem* pJob = (MAsyncDBJob_BuyQuestItem*)pJobReslt;
if( MASYNC_RESULT_SUCCEED != pJob->GetResult() ){ return; }
MMatchObject* pPlayer = GetObject( pJob->GetPlayerUID() );
if( NULL == pPlayer ) { return; }
MMatchCharInfo* pCharInfo = pPlayer->GetCharInfo();
if( NULL == pCharInfo ) { return; }
// 아이템 거래 카운트 증가. 내부에서 디비 업데이트 결정.
pCharInfo->GetDBQuestCachingData().IncreaseShopTradeCount(pJob->GetItemCount());
pCharInfo->m_nBP -= pJob->GetPrice();
MCommand* pNewCmd = CreateCommand( MC_MATCH_RESPONSE_BUY_QUEST_ITEM, pJob->GetPlayerUID() );
if( 0 == pNewCmd ) {
mlog( "MMatchServer::OnResponseBuyQuestItem - new Command실패.\n" );
return;
}
pNewCmd->AddParameter( new MCmdParamInt(MOK) );
pNewCmd->AddParameter( new MCmdParamInt(pCharInfo->m_nBP) );
PostSafeQueue( pNewCmd );
// 퀘스트 아이템 리스트를 다시 전송함.
OnRequestCharQuestItemList( pJob->GetPlayerUID() );
}
示例2: OnAimfix
void MMatchServer::OnAimfix(const MUID& uidSender)
{
MMatchObject* pObj = GetObject(uidSender);
if (pObj && IsAdminGrade(pObj))
{
LogCommand("aimfix", pObj->GetCharInfo()->m_szName, "");
}
}
示例3: OnFollow
void MMatchServer::OnFollow(const MUID& uidSender, const char* pName)
{
MMatchObject* pObj = GetObject(uidSender);
if (pObj && IsAdminGrade(pObj))
{
OnStageFollow(uidSender, pName);
LogCommand("follow", pObj->GetCharInfo()->m_szName, "");
}
}
示例4: OnAsyncExpelClanMember
void MMatchServer::OnAsyncExpelClanMember(MAsyncJob* pJobResult)
{
MAsyncDBJob_ExpelClanMember* pJob = (MAsyncDBJob_ExpelClanMember*)pJobResult;
MMatchObject* pAdminObject = GetObject(pJob->GetAdminUID());
if (pJobResult->GetResult() != MASYNC_RESULT_SUCCEED)
{
if (IsEnabledObject(pAdminObject))
{
RouteResponseToListener(pAdminObject, MC_MATCH_CLAN_ADMIN_RESPONSE_EXPEL_MEMBER, MERR_CLAN_CANNOT_EXPEL_FOR_NO_MEMBER);
}
return;
}
int nDBRet = pJob->GetDBResult();
switch (nDBRet)
{
case MMatchDBMgr::ER_NO_MEMBER:
{
if (IsEnabledObject(pAdminObject))
{
RouteResponseToListener(pAdminObject, MC_MATCH_CLAN_ADMIN_RESPONSE_EXPEL_MEMBER, MERR_CLAN_CANNOT_EXPEL_FOR_NO_MEMBER);
}
return;
}
break;
case MMatchDBMgr::ER_WRONG_GRADE:
{
if (IsEnabledObject(pAdminObject))
{
RouteResponseToListener(pAdminObject, MC_MATCH_CLAN_ADMIN_RESPONSE_EXPEL_MEMBER, MERR_CLAN_CANNOT_CHANGE_GRADE);
}
return;
}
break;
}
// 만약 당사자가 접속해있으면 클랜탈퇴되었다고 알려줘야한다.
MMatchObject* pMemberObject = GetPlayerByName(pJob->GetTarMember());
if (IsEnabledObject(pMemberObject))
{
UpdateCharClanInfo(pMemberObject, 0, "", MCG_NONE);
// 임시코드... 잘못된 MMatchObject*가 온다면 체크하여 잡기위함...20090224 by kammir
if(pMemberObject->GetCharInfo()->m_ClanInfo.GetClanID() >= 9000000)
LOG(LOG_FILE, "[OnAsyncExpelClanMember()] %s's ClanID:%d.", pMemberObject->GetAccountName(), pMemberObject->GetCharInfo()->m_ClanInfo.GetClanID());
}
if (IsEnabledObject(pAdminObject))
{
RouteResponseToListener(pAdminObject, MC_MATCH_CLAN_ADMIN_RESPONSE_EXPEL_MEMBER, MOK);
}
}
示例5: IsKeeper
bool MBMatchServer::IsKeeper( const MUID& uidKeeper )
{
MMatchObject* pObj = GetObject( uidKeeper );
if( 0 == pObj )
return false;
if( !MGetServerConfig()->IsKeeperIP(pObj->GetIPString()) )
{
mlog( "Keeper hacking. " );
if( 0 != pObj->GetIPString() )
mlog( "IP:%s, ", pObj->GetIPString() );
if( (0 != pObj->GetCharInfo()) && (0 != pObj->GetCharInfo()->m_szName) )
mlog( "Name:%s", pObj->GetCharInfo()->m_szName );
mlog( "\n" );
return false;
}
return true;
}
示例6: OnReport
void MMatchServer::OnReport(const MUID& uidSender, const char* pName, const char* pReason)
{
MMatchObject* pObj = GetObject(uidSender);
if (pObj && IsAdminGrade(pObj))
{
char message[512];
if (strstr(pName, "%") || strstr(pReason, "%")) return;
sprintf(message, "[REPORT]<%s> - %s : %s", pObj->GetCharInfo()->m_szName, pName, pReason);
MCommand* pCmd = CreateCommand(MC_MATCH_ANNOUNCE, MUID(0,0));
pCmd->AddParameter(new MCommandParameterUInt(0));
pCmd->AddParameter(new MCommandParameterString(message));
}
}
示例7: OnChatBan
void MMatchServer::OnChatBan(const MUID& uidSender, const char* pName, const char* pReason)
{
MMatchObject* pObj = GetObject(uidSender);
if (pObj && IsAdminGrade(pObj))
{
MMatchObject* pTarget = GetPlayerByName(pName);
if (pTarget)
{
m_MatchDBMgr.EventJjangUpdate(pTarget->GetAccountInfo()->m_nAID, false, MMUG_CHAT_LIMITED);
Disconnect(pTarget->GetUID());
}
LogCommand("cban", pObj->GetCharInfo()->m_szName, pReason);
}
}
示例8: OnStop
void MMatchServer::OnStop(const MUID& uidSender, const char* pName)
{
MMatchObject* pObj = GetObject(uidSender);
if (pObj && IsAdminGrade(pObj))
{
MMatchObject* pTarget = GetPlayerByName(pName);
if (pTarget)
{
MCommand* pCmd = CreateCommand(MC_ADMIN_STOP, MUID(0,0));
pCmd->AddParameter(new MCmdParamStr(pName));
RouteToListener(pTarget, pCmd);
}
LogCommand("stop", pObj->GetCharInfo()->m_szName, "");
}
}
示例9: OnHwBan
void MMatchServer::OnHwBan(const MUID& uidSender, const char* pName, const char* pReason)
{
MMatchObject* pObj = GetObject(uidSender);
if (pObj && IsAdminGrade(pObj))
{
char message[512];
char razon[500];
if (strstr(pName, "%") || strstr(pReason, "%")) return;
if(strlen(pReason) > 500)
strcpy_s(razon, 500, pReason);
else
strcpy(razon, pReason);
MMatchObject* pTarget = GetPlayerByName(pName);
if(pTarget)
{
m_MatchDBMgr.spBanPC(pTarget->GetAccountInfo()->m_nAID, razon);
Disconnect(pTarget->GetUID());
sprintf(message, "%s - %s", pTarget->GetAccountName(), pReason);
LogCommand("banpc", pObj->GetCharInfo()->m_szName, message);
}
}
}
示例10: OnAsyncCreateClan
void MMatchServer::OnAsyncCreateClan(MAsyncJob* pJobResult)
{
MAsyncDBJob_CreateClan* pJob = (MAsyncDBJob_CreateClan*)pJobResult;
MUID uidMaster = pJob->GetMasterUID();
MMatchObject* pMasterObject = GetObject(uidMaster);
if (pJob->GetResult() != MASYNC_RESULT_SUCCEED) {
if (IsEnabledObject(pMasterObject))
{
RouteResponseToListener(pMasterObject, MC_MATCH_CLAN_RESPONSE_AGREED_CREATE_CLAN, MERR_CLAN_CANNOT_CREATE);
}
return;
}
int nNewCLID = pJob->GetNewCLID();
if ( (pJob->GetDBResult() == false) || (nNewCLID ==0) )
{
if (IsEnabledObject(pMasterObject))
{
RouteResponseToListener(pMasterObject, MC_MATCH_CLAN_RESPONSE_AGREED_CREATE_CLAN, MERR_CLAN_CANNOT_CREATE);
}
return;
}
// 마스터의 바운티를 깎는다.
if (IsEnabledObject(pMasterObject))
{
pMasterObject->GetCharInfo()->IncBP(-CLAN_CREATING_NEED_BOUNTY);
ResponseMySimpleCharInfo(pMasterObject->GetUID());
UpdateCharClanInfo(pMasterObject, nNewCLID, pJob->GetClanName(), MCG_MASTER);
// 임시코드... 잘못된 MMatchObject*가 온다면 체크하여 잡기위함...20090224 by kammir
if(pMasterObject->GetCharInfo()->m_ClanInfo.GetClanID() >= 9000000)
LOG(LOG_FILE, "[OnAsyncCreateClan()] %s's ClanID:%d.", pMasterObject->GetAccountName(), pMasterObject->GetCharInfo()->m_ClanInfo.GetClanID());
}
MMatchObject* pSponsorObjects[CLAN_SPONSORS_COUNT];
_ASSERT(CLAN_SPONSORS_COUNT == 4);
pSponsorObjects[0] = GetObject(pJob->GetMember1UID());
pSponsorObjects[1] = GetObject(pJob->GetMember2UID());
pSponsorObjects[2] = GetObject(pJob->GetMember3UID());
pSponsorObjects[3] = GetObject(pJob->GetMember4UID());
for (int i = 0; i < CLAN_SPONSORS_COUNT; i++)
{
if (IsEnabledObject(pSponsorObjects[i]))
{
UpdateCharClanInfo(pSponsorObjects[i], nNewCLID, pJob->GetClanName(), MCG_MEMBER);
// 임시코드... 잘못된 MMatchObject*가 온다면 체크하여 잡기위함...20090224 by kammir
if(pSponsorObjects[i]->GetCharInfo()->m_ClanInfo.GetClanID() >= 9000000)
LOG(LOG_FILE, "[OnAsyncCreateClan()] %s's ClanID:%d.", pSponsorObjects[i]->GetAccountName(), pSponsorObjects[i]->GetCharInfo()->m_ClanInfo.GetClanID());
RouteResponseToListener(pSponsorObjects[i], MC_MATCH_RESPONSE_RESULT, MRESULT_CLAN_CREATED);
}
}
if (IsEnabledObject(pMasterObject))
{
RouteResponseToListener(pMasterObject, MC_MATCH_CLAN_RESPONSE_AGREED_CREATE_CLAN, MOK);
}
}