本文整理汇总了C++中CUser::AddDefinedCaption方法的典型用法代码示例。如果您正苦于以下问题:C++ CUser::AddDefinedCaption方法的具体用法?C++ CUser::AddDefinedCaption怎么用?C++ CUser::AddDefinedCaption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::AddDefinedCaption方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
// 현재 대전의 경기 시작과 결과를 대전장의 모든 유저에게 전달
void CGuildCombat1to1::SendWarResultAllPlayer()
{
CUser* pUser = NULL;
for( int i=0; i<2; i++ )
{
for( int j=0; j<(int)( m_vecTenderGuild[m_nIndex[i]].vecMemberId.size() ); j++ )
{
pUser = (CUser*)prj.GetUserByID( m_vecTenderGuild[m_nIndex[i]].vecMemberId[j] );
if( IsPossibleUser( pUser ) )
{
u_long uIdPlayer = NULL_ID;
if( (int)( m_vecTenderGuild[m_nIndex[i]].vecMemberId.size() ) > m_nProgWarCount )
uIdPlayer = m_vecTenderGuild[m_nIndex[i]].vecMemberId[m_nProgWarCount];
//else
// continue;
switch( m_nState )
{
case GC1TO1WAR_WAR : // 경기 시작시
{
pUser->AddGC1to1WarResult( g_GuildCombat1to1Mng.GC1TO1_PLAYER_WAR, uIdPlayer, 0, 0 );
break;
}
case GC1TO1WAR_FINISH : // 경기 종료시
{
int nOurWinCount = m_vecTenderGuild[m_nIndex[i]].nWinCount;
int nOtherWinCount = m_vecTenderGuild[m_nIndex[(i+1)%2]].nWinCount;
pUser->AddGC1to1WarResult( m_vecTenderGuild[m_nIndex[i]].nLastWinState, uIdPlayer, nOurWinCount, nOtherWinCount );
// 전체 메세지 출력
int nIndex = 2; // 비겼을 때
if( m_vecTenderGuild[m_nIndex[0]].nLastWinState == g_GuildCombat1to1Mng.GC1TO1_PLAYER_WIN )
nIndex = 0; // 0길드가 승리했을 때
else if( m_vecTenderGuild[m_nIndex[1]].nLastWinState == g_GuildCombat1to1Mng.GC1TO1_PLAYER_WIN )
nIndex = 1; // 1길드가 승리했을 때
// 대전장의 모든 선수에게 메세지 출력
if( nIndex == 2 ) // 비겼을 때
pUser->AddDefinedCaption( TRUE, TID_GAME_GUILDCOMBAT1TO1_DRAWMSG, "%d", m_nProgWarCount+1 );
else
{
CUser* pWinUser = NULL;
if( (int)( m_vecTenderGuild[m_nIndex[nIndex]].vecMemberId.size() ) > m_nProgWarCount )
pWinUser = (CUser*)prj.GetUserByID( m_vecTenderGuild[m_nIndex[nIndex]].vecMemberId[m_nProgWarCount] );
if( IsValidObj( pWinUser ) )
{
CGuild* pGuild = pWinUser->GetGuild();
if( pGuild )
pUser->AddDefinedCaption( TRUE, TID_GAME_GUILDCOMBAT1TO1_WINMSG, "%d %s %s", m_nProgWarCount+1, pGuild->m_szGuild, pWinUser->GetName() );
}
}
break;
}
} // switch
} // if
} // for j
} // for i
}
示例2: GetTickCount
// 입장전 대기...
void CGuildCombat1to1Mng::GuildCombat1to1EntranceWait()
{
m_nState = GC1TO1_ENTRANCE;
m_nWaitTime = (int)m_Lua.GetGlobalNumber( "EntranceWaitTime" );
m_dwTime = GetTickCount();
for( int i=0; i<(int)( m_vecTenderGuild.size() ); i++ )
{
CGuild* pGuild = g_GuildMng.GetGuild( m_vecTenderGuild[i].ulGuildId );
if( pGuild )
{
CUser* pUser = (CUser*)prj.GetUserByID( pGuild->m_idMaster );
if( IsValidObj( pUser ) && !IsLineUpMember( pUser ) )
SendNowState( pUser );
}
for( int j=0; j<(int)( m_vecTenderGuild[i].vecMemberId.size() ); j++ )
{
CUser* pUser = (CUser*)prj.GetUserByID( m_vecTenderGuild[i].vecMemberId[j] );
if( IsValidObj( pUser ) )
{
pUser->AddDefinedCaption( TRUE, TID_GAME_GUILDCOMBAT1TO1_ENTRANCETIME, "" );
SendNowState( pUser );
}
}
}
}