本文整理汇总了C++中CUser::GetLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ CUser::GetLevel方法的具体用法?C++ CUser::GetLevel怎么用?C++ CUser::GetLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::GetLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReplaceChkLv
BOOL CParty::ReplaceChkLv( int Lv )
{
CUser *pMember;
for( int i = 0; i < m_nSizeofMember; i ++ ) // 극단원 모두에게 듀얼 해제를 세팅하고 클라에도 알림.
{
pMember = g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
if( IsValidObj( pMember ) )
{
if( pMember->GetLevel() > Lv )
{
return FALSE;
}
}
}
return TRUE;
}
示例2: GetTenderGuildIndexByUser
// 참가자 구성
void CGuildCombat1to1Mng::SetMemberLineUp( CUser* pUser, vector<u_long>& vecMemberId )
{
if( m_nState != GC1TO1_OPEN ) // 참가자 구성 시간이 아니다.
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_NOLINEUP );
return;
}
int nIndex = GetTenderGuildIndexByUser( pUser );
if( nIndex == NULL_ID ) // 입찰되지 않았거나 순위에서 밀린 길드
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_CANNOT_MAKEUP );
return;
}
if( (int)( vecMemberId.size() ) < m_nMinJoinPlayer ) // 최소 참가자 수보다 적다.
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_LOWMINPLAYER, "%d", m_nMinJoinPlayer );
return;
}
if( (int)( vecMemberId.size() ) > m_nMaxJoinPlayer )
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_OVERMAXPLAYER, "%d", m_nMaxJoinPlayer );
return;
}
// 길드마스터 또는 킹핀급만 가능
CGuild* pGuild = pUser->GetGuild();
if( pGuild )
{
CGuildMember* pGuildMember = pGuild->GetMember( pUser->m_idPlayer );
if( pGuildMember )
{
if( pGuildMember->m_nMemberLv != GUD_MASTER && pGuildMember->m_nMemberLv != GUD_KINGPIN )
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_NOLINEUPAUTH );
return;
}
}
}
BOOL bMasterOrKingpin = FALSE;
// 최소 참가 레벨 검사
for( int i=0; i<(int)( vecMemberId.size() ); i++ )
{
CUser* pUserTemp = (CUser*)prj.GetUserByID( vecMemberId[i] );
if( IsValidObj( pUserTemp ) && pUserTemp->GetLevel() < m_nMinJoinPlayerLevel )
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_LIMIT_LEVEL_NOTICE );
return;
}
if( IsValidObj( pUserTemp ) && !bMasterOrKingpin )
{
CGuildMember* pGuildMember = pGuild->GetMember( pUserTemp->m_idPlayer );
if( pGuildMember )
if( pGuildMember->m_nMemberLv == GUD_MASTER || pGuildMember->m_nMemberLv == GUD_KINGPIN )
bMasterOrKingpin = TRUE;
}
}
if( !bMasterOrKingpin )
{
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_HAVENOT_MASTER );
return;
}
m_vecTenderGuild[nIndex].vecMemberId.clear();
m_vecTenderGuild[nIndex].vecMemberId = vecMemberId;
pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_LINEUPCOMPLETE );
g_dpDBClient.SendGC1to1LineUp( m_vecTenderGuild[nIndex].ulGuildId, vecMemberId );
}