Пример #1
0
// 현재 대전장의 대전이 모두 끝나고 텔레포트전 대기 시간...
void	CGuildCombat1to1::GuildCombat1to1CloseWait()
{
	ClearTime();
	m_nState = GC1TO1WAR_CLOSEWAIT;
	m_nWaitTime = (int)( g_GuildCombat1to1Mng.m_Lua.GetGlobalNumber( "WarCloseWaitTime" ) );
	m_dwTime = GetTickCount();
	SendNowStateAllPlayer();

	// 승리 길드 판별
	int nWinIndex = NULL_ID;
	if( m_vecTenderGuild[m_nIndex[0]].nWinCount > m_vecTenderGuild[m_nIndex[1]].nWinCount )
		nWinIndex = m_nIndex[0];
	else if( m_vecTenderGuild[m_nIndex[0]].nWinCount < m_vecTenderGuild[m_nIndex[1]].nWinCount )
		nWinIndex = m_nIndex[1];
	
	// 길드 승패 메세지 출력(승리 길드는 칩 추가 지급)
	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 ) )
			{
				if( m_nIndex[i] == nWinIndex )	// 승리 길드
				{
					SetWinChip( pUser, NULL, FALSE, FALSE );
					pUser->AddDefinedCaption( TRUE, TID_GAME_GUILDCOMBAT1TO1_WARGUILDWIN, "" );
					pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_WARGUILDWINCHIP, "%d", GetChipNum() );
				}
				else if( nWinIndex == NULL_ID ) // 비김
				{
					SetWinChip( pUser, NULL, TRUE, FALSE );
					pUser->AddDefinedCaption( TRUE, TID_GAME_GUILDCOMBAT1TO1_WARGUILDDRAW, "" );
				}
				else							// 패배 길드
				{
					SetWinChip( NULL, pUser, FALSE, FALSE );
					pUser->AddDefinedCaption( TRUE, TID_GAME_GUILDCOMBAT1TO1_WARGUILDLOST, "" );
				}

				SendNowState( pUser );
			}
		}
	}

	g_dpDBClient.SendGC1to1Tender( 'U', m_vecTenderGuild[m_nIndex[0]].ulGuildId, m_vecTenderGuild[m_nIndex[0]].nPenya, 'E' );
	g_dpDBClient.SendGC1to1Tender( 'U', m_vecTenderGuild[m_nIndex[1]].ulGuildId, m_vecTenderGuild[m_nIndex[1]].nPenya, 'E' );
	g_dpDBClient.SendGC1to1WarGuild( m_vecTenderGuild[m_nIndex[0]].dwWorldId, 0, 0, 'E' );
}
Пример #2
0
// 각 대전장의 1:1길드대전 시작
void	CGuildCombat1to1Mng::GuildCombat1to1War()
{
	ClearTime();
	m_nState = GC1TO1_WAR;
	for( int i=0; i<(int)( m_vecTenderGuild.size() ); i++ )
	{
		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 ) )
				SendNowState( pUser );
		}
	}

	for( int i=0; i<(int)( m_vecGuilCombat1to1.size() ); i++ )
	{
		DWORD dwWorldId = m_vecTenderGuild[m_vecGuilCombat1to1[i].m_nIndex[0]].dwWorldId;
		u_long uGuildId_0 = m_vecTenderGuild[m_vecGuilCombat1to1[i].m_nIndex[0]].ulGuildId;
		u_long uGuildId_1 = m_vecTenderGuild[m_vecGuilCombat1to1[i].m_nIndex[1]].ulGuildId;
		g_dpDBClient.SendGC1to1WarGuild( dwWorldId, uGuildId_0, uGuildId_1, 'W' );

		m_vecGuilCombat1to1[i].GuildCombat1to1WarWait();
	}
}