本文整理汇总了C++中MMatchObject::SetCountryCode3方法的典型用法代码示例。如果您正苦于以下问题:C++ MMatchObject::SetCountryCode3方法的具体用法?C++ MMatchObject::SetCountryCode3怎么用?C++ MMatchObject::SetCountryCode3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MMatchObject
的用法示例。
在下文中一共展示了MMatchObject::SetCountryCode3方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddObjectOnMatchLogin
bool MMatchServer::AddObjectOnMatchLogin(const MUID& uidComm,
const MMatchAccountInfo* pSrcAccountInfo,
const MMatchAccountPenaltyInfo* pSrcAccountPenaltyInfo,
bool bFreeLoginIP, string strCountryCode3, unsigned long nChecksumPack)
{
MCommObject* pCommObj = (MCommObject*)m_CommRefCache.GetRef(uidComm);
if (pCommObj == NULL) return false;
MUID AllocUID = uidComm;
int nErrCode = ObjectAdd(uidComm);
if(nErrCode!=MOK) {
LOG(LOG_DEBUG, MErrStr(nErrCode) );
}
MMatchObject* pObj = GetObject(AllocUID);
if (pObj == NULL) {
// Notify Message 필요 -> 로그인 관련 - 해결(Login Fail 메세지 이용)
// Disconnect(uidComm);
MCommand* pCmd = CreateCmdMatchResponseLoginFailed(AllocUID, MERR_FAILED_LOGIN_RETRY);
Post(pCmd);
return false;
}
pObj->AddCommListener(uidComm);
pObj->SetObjectType(MOT_PC);
memcpy(pObj->GetAccountInfo(), pSrcAccountInfo, sizeof(MMatchAccountInfo));
memcpy(pObj->GetAccountPenaltyInfo(), pSrcAccountPenaltyInfo, sizeof(MMatchAccountPenaltyInfo));
pObj->SetFreeLoginIP(bFreeLoginIP);
pObj->SetCountryCode3( strCountryCode3 );
pObj->UpdateTickLastPacketRecved();
pObj->UpdateLastHShieldMsgRecved();
if (pCommObj != NULL)
{
pObj->SetPeerAddr(pCommObj->GetIP(), pCommObj->GetIPString(), pCommObj->GetPort());
}
SetClientClockSynchronize(uidComm);
// 프리미엄 IP를 체크한다.
if (MGetServerConfig()->CheckPremiumIP())
{
if (pCommObj)
{
bool bIsPremiumIP = false;
bool bExistPremiumIPCache = false;
bExistPremiumIPCache = MPremiumIPCache()->CheckPremiumIP(pCommObj->GetIP(), bIsPremiumIP);
// 만약 캐쉬에 없으면 직접 DB에서 찾도록 한다.
if (!bExistPremiumIPCache)
{
if (m_MatchDBMgr.CheckPremiumIP(pCommObj->GetIPString(), bIsPremiumIP))
{
// 결과를 캐쉬에 저장
MPremiumIPCache()->AddIP(pCommObj->GetIP(), bIsPremiumIP);
}
else
{
MPremiumIPCache()->OnDBFailed();
}
}
//if (bIsPremiumIP) pObj->GetAccountInfo()->m_nPGrade = MMPG_PREMIUM_IP;
}
}
if (!PreCheckAddObj(uidComm))
{
// 보안 관련 초기화 서버 설정에 문제가 생겼다고 로그인 실패를 리턴한다. //
MCommand* pCmd = CreateCmdMatchResponseLoginFailed(uidComm, MERR_FAILED_AUTHENTICATION);
Post(pCmd);
return false;
}
MCommand* pCmd = CreateCmdMatchResponseLoginOK(uidComm,
AllocUID,
pObj->GetAccountInfo()->m_szUserID,
pObj->GetAccountInfo()->m_nUGrade,
pObj->GetAccountInfo()->m_nPGrade,
pObj->GetAccountInfo()->m_nECoins,
// pObj->GetAntiHackInfo()->m_szRandomValue,
pObj->GetHShieldInfo()->m_pbyGuidReqMsg);
Post(pCmd);
// 접속 로그를 남긴다.
//m_MatchDBMgr.InsertConnLog(pObj->GetAccountInfo()->m_nAID, pObj->GetIPString(), pObj->GetCountryCode3() );
// 접속 로그
MAsyncDBJob_InsertConnLog* pNewJob = new MAsyncDBJob_InsertConnLog(uidComm);
pNewJob->Input(pObj->GetAccountInfo()->m_nAID, pObj->GetIPString(), pObj->GetCountryCode3() );
PostAsyncJob(pNewJob);
// Client DataFile Checksum을 검사한다.
// 2006.2.20 dubble. filelist checksum으로 변경
//.........这里部分代码省略.........