예제 #1
0
void CWndPartyQuick::OnDraw( C2DRender* p2DRender ) 
{ 
	// 파티 정보 출력
	//Static control
	int nMax = g_Party.m_nSizeofMember;
	int i;
	CRect rect;

	SetActiveMember(nMax);

	for(i=0; i<nMax; i++)
	{
		LPWNDCTRL lpWndCtrl = GetWndCtrl( StaticID[i] );
		rect = lpWndCtrl->rect;
		CMover* pObjMember = prj.GetUserByID( g_Party.m_aMember[i].m_uPlayerId );
		CString strMember;
		
		if(m_pFocusMember == pObjMember)
			p2DRender->RenderFillRect( rect, 0x60ffff00 );

		// 상태에 따라 색 변경
		DWORD dwColor = 0xff000000;
		u_long  nLeadMember = g_Party.m_aMember[i].m_uPlayerId;
		if( IsValidObj(pObjMember) )
		{
			if( pObjMember->GetHitPoint() == 0 ) 
				dwColor = 0xffff0000; // 죽은놈
			else if( ((FLOAT)pObjMember->GetHitPoint()) / ((FLOAT)pObjMember->GetMaxHitPoint()) <.1f ) 
				dwColor = 0xffffff00; // HP 10% 이하인놈
			if(g_Party.IsLeader(nLeadMember)) //Leader Color Set
			{
				dwColor = 0xff1fb72d; //굵게 해야함...
#if __VER >= 10 // __LEGEND
				if(pObjMember->IsMaster())
					strMember.Format( prj.GetText( TID_GAME_QUICK_MARK_MASTER ), pObjMember->GetLevel(), pObjMember->GetName() );
				else if(pObjMember->IsHero())
#if __VER >= 15 // __HERO129_VER15				// 15차 히어로 레벨확장
					strMember.Format( prj.GetText( TID_GAME_QUICK_MARK_HERO ), pObjMember->GetLevel(), pObjMember->GetName() );
	#else	// 15차 히어로 레벨확장
					strMember.Format( prj.GetText( TID_GAME_QUICK_MARK_HERO_BEFORE ), pObjMember->GetName() );
	#endif	// 15차 히어로 레벨확장
				else 
					strMember.Format( "%d. %s", pObjMember->GetLevel(), pObjMember->GetName() );
#else //__LEGEND
				strMember.Format( "%d. %s", pObjMember->GetLevel(), pObjMember->GetName() );
#endif //__LEGEND
			}
			else
			{
#if __VER >= 10 // __LEGEND
				if(pObjMember->IsMaster())
예제 #2
0
// 싸이킥 월
void CCommonCtrl::_ProcessWall( void )
{
	if( m_nCount == 0 )
	{
	#ifdef __CLIENT		
		m_pSfxModel = new CSfxModel;
		m_pSfxModel2 = new CSfxModel;
		m_pSfxModel->SetSfx( "sfx_sklpsypsychicwall02" );
		m_pSfxModel2->SetSfx( "sfx_sklpsypsychicwall04" );
	#endif
	}

	D3DXVECTOR3	vPos = GetPos();

#ifndef __CLIENT
	CObj* pObj;
	BOOL bApply;
#endif //__CLIENT

	int nRange = 4;
	// 일반적으로 fDepth가 가장 길기때문에 검사 영역은 fDepth로 했다. 
	float fDepth = 3;
	
	if( fDepth <= 4.0f )		nRange = 4;
	else if( fDepth <= 8.0f )	nRange = 8;
	else if( fDepth <= 16.0f )	nRange = 16;
	else						nRange = 32;

#ifdef __WORLDSERVER
	CMover *pAttacker = prj.GetMover( m_idAttacker );
	
	if( IsInvalidObj( pAttacker ) )		// 일단 어태커가 사라지면 컨트롤도 사라지게 하자.
	{
		DestroyWall();
		return;
	}
	int nMin = m_pAddSkillProp->dwAbilityMin + (pAttacker->GetLevel() + (pAttacker->GetInt() / 10) * (int)m_pAddSkillProp->dwSkillLvl);
	int nMax = m_pAddSkillProp->dwAbilityMax + (pAttacker->GetLevel() + (pAttacker->GetInt() / 10) * (int)m_pAddSkillProp->dwSkillLvl);
	int nDamage = xRandom( nMin, nMax );
#if __VER >= 9	// __SKILL_0706
	int nMinPVP	= m_pAddSkillProp->dwAbilityMinPVP + ( pAttacker->GetLevel() + ( pAttacker->GetInt() / 10 ) * (int)m_pAddSkillProp->dwSkillLvl );
	int nMaxPVP		= m_pAddSkillProp->dwAbilityMaxPVP + ( pAttacker->GetLevel() + ( pAttacker->GetInt() / 10 ) * (int)m_pAddSkillProp->dwSkillLvl );
	int nDamagePVP	= xRandom( nMinPVP, nMaxPVP );
#endif	// __SKILL_0706

	int nHitPoint = 0;
	int nTargetHP = 0;
	
	FOR_LINKMAP( GetWorld(), vPos, pObj, nRange, CObj::linkDynamic, GetLayer() )
	{
		bApply = FALSE;
		if( pObj->GetType() == OT_MOVER )				// 대상이 무버일때만.
		{
			CMover *pTarget = (CMover *)pObj;
			if( pTarget->IsPeaceful() == FALSE )		// NPC가 아닌경우만 적용
				bApply = TRUE;
#if __VER >= 8 //	#ifdef	__JHMA_VER_8_5_1			 // 8.5차 경비병 범위스킬 공격효과 불가로 수정 World
			if( pAttacker->IsPlayer() && pAttacker->IsChaotic() == FALSE && pTarget->GetProp()->dwClass == RANK_GUARD )
				bApply = FALSE;
#endif //			#endif // __JHMA_VER_8_5_1			 // 8.5차 경비병 범위스킬 공격효과 불가로 수정 World	
			if( bApply )
			{
				if( IsValidObj( pTarget ) && pTarget->IsLive() )
				{
					if( pObj->IsRangeObj( vPos, 1.0f ) )
					{
						if( IsValidObj(pAttacker) )
						{
							nTargetHP = pTarget->GetHitPoint();
							nHitPoint = nTargetHP - nDamage;
							if( nHitPoint > 0 )
							{
								pTarget->m_nHitPoint = nHitPoint;
								g_UserMng.AddDamage( pTarget, pAttacker->GetId(), nDamage, AF_GENERIC );
							}
							else
							{
								pAttacker->SubExperience( pTarget );		// pTarget를 죽이고 난후의 m_pAttacker 경험치 처리.
								pTarget->DropItemByDied( pAttacker );				// 몬스터였다면 아이템 드랍.
								pAttacker->m_nAtkCnt = 0;					// 타겟을 죽였으면 공격자의 어택카운트 클리어
								pTarget->DoDie( pAttacker );				// pTarget 죽어라. 
								pTarget->m_nHitPoint = 0;
							}
						}
						m_nLife ++;		// 부딪힐때마다 카운트 올라감
						if( m_nLife >= (int)(m_pAddSkillProp->dwSkillLvl / 2) )
							DestroyWall();
						
						// 뒤로 밀리기 처리.
#if __VER >= 10	// __AI_0711
						if( pTarget->IsRank( RANK_MIDBOSS ) == FALSE )
#endif	// __AI_0711
						{
							FLOAT fPushAngle = pTarget->GetAngle() + 180.0f;
							FLOAT fPower = 0.825f;
							AngleToVectorXZ( &pTarget->m_pActMover->m_vDeltaE, fPushAngle, fPower );
							g_UserMng.AddPushPower( pTarget, pTarget->GetPos(), pTarget->GetAngle(), fPushAngle, fPower );
						}
					}
				}
			}
		}
	}
예제 #3
0
void CWndPartyCtrl::OnDraw( C2DRender* p2DRender ) 
{
	if( NULL == g_pPlayer )
		return;

	CPoint pt( 3, 3 );

//	pt.y -= ( m_nFontHeight + 3 ) * m_wndScrollBar.GetScrollPos();

#if __VER < 11 // __CSC_VER11_4
	CWndMessenger* pWndMessenger = (CWndMessenger*)GetWndBase( APP_MESSENGER_ );
#endif //__CSC_VER11_4
	CWndWorld* pWndWorld = (CWndWorld*)g_WndMng.GetWndBase( APP_WORLD );
	
	int nMax = g_Party.m_nSizeofMember;
	// 눈에 보이는 갯수가 페이지라인수 보다 크면 보이는 갯수를 페이지라인수로 조정 
	if( nMax - m_wndScrollBar.GetScrollPos() > m_wndScrollBar.GetScrollPage() )
		nMax = m_wndScrollBar.GetScrollPage() + m_wndScrollBar.GetScrollPos();
	if( nMax < m_wndScrollBar.GetScrollPos() )
		nMax = 0;
	
	TEXTUREVERTEX2* pVertex = new TEXTUREVERTEX2[ 6 * 2 * nMax ];
	TEXTUREVERTEX2* pVertices = pVertex;
	
	for( int i = m_wndScrollBar.GetScrollPos(); i < nMax; i++ ) 
	{
		CMover* pObjMember = prj.GetUserByID( g_Party.m_aMember[i].m_uPlayerId );
		CString strMember;
#if __VER >= 11 // __SYS_PLAYER_DATA
		PlayerData* pPlayerData	= CPlayerDataCenter::GetInstance()->GetPlayerData( g_Party.m_aMember[i].m_uPlayerId );
		int nJob	= pPlayerData->data.nJob;
		int nSex	= pPlayerData->data.nSex;
#else	// __SYS_PLAYER_DATA
		int nJob	= g_Party.m_aMember[ i ].m_nJob;
		int nSex	= g_Party.m_aMember[ i ].m_nSex;
#endif	// __SYS_PLAYER_DATA
		
		// 상태에 따라 색 변경
		DWORD dwColor = 0xff000000;
		if( IsValidObj(pObjMember) )
		{
			if( pObjMember->GetHitPoint() == 0 ) 
				dwColor = 0xffff0000; // 죽은놈
			else 
				if( ((FLOAT)pObjMember->GetHitPoint()) / ((FLOAT)pObjMember->GetMaxHitPoint()) < 0.1f ) 
					dwColor = 0xffffff00; // HP 10% 이하인 놈
			strMember.Format( "%d %s", pObjMember->GetLevel(), pObjMember->GetName() );
		}
		else
		{
			dwColor = 0xff878787; // 디폴트는 주위에 없는 놈
			if( g_Party.m_aMember[ i ].m_bRemove ) 
				dwColor = 0xff000000; // 서버에 없는 놈
#if __VER >= 11 // __SYS_PLAYER_DATA
			strMember.Format( "?? %s", pPlayerData->szPlayer );
#else	// __SYS_PLAYER_DATA
			strMember.Format( "?? %s", g_Party.m_aMember[ i ].m_szName );
#endif	// __SYS_PLAYER_DATA
		}
		if( i == m_nCurSelect )
			dwColor = 0xff6060ff; 

		int x = 0, nWidth = m_rectClient.Width() - 10;// - 1;

		CRect rect( x, pt.y, x + nWidth, pt.y + m_nFontHeight );

		rect.SetRect( x + 20, pt.y + 18, x + nWidth - 10, pt.y + 30 ); 
		nWidth	= pObjMember ? pObjMember->GetHitPointPercent( rect.Width() ) : 0;
		CRect rectTemp = rect; 
		rectTemp.right = rectTemp.left + nWidth;
		if( rect.right < rectTemp.right )
			rectTemp.right = rect.right;

		m_pTheme->RenderGauge( p2DRender, &rect, 0xffffffff, m_pVBGauge, &m_texGauEmptyNormal );
		m_pTheme->RenderGauge( p2DRender, &rectTemp, 0x64ff0000, m_pVBGauge, &m_texGauFillNormal );

		rect.SetRect( x + 3, pt.y, x + 3 + 32, pt.y + 6 + 32 ); 

		p2DRender->TextOut( x + 20, pt.y + 3, strMember, dwColor ); 

		if( MAX_EXPERT <= nJob )
		{
#if __VER >= 10 // __LEGEND
			if( MAX_PROFESSIONAL <= nJob && nJob < MAX_MASTER )
				pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ),  ( 70 + nJob - 16 ) + ( 8 * nSex ), &pVertices, 0xffffffff );
			else if( MAX_MASTER <= nJob )
				pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ),  ( 70 + nJob - 24 ) + ( 8 * nSex ), &pVertices, 0xffffffff );
			else
#endif //__LEGEND
			pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ),  ( 70 + nJob - 6 ) + ( 8 * nSex ), &pVertices, 0xffffffff );
		}
		else
		{
			pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ),  12 + nJob + ( 6 * nSex ), &pVertices, 0xffffffff );
		}

		pt.y += m_nFontHeight + 3;
	}
	pWndWorld->m_texMsgIcon.Render( m_pApp->m_pd3dDevice, pVertex, ( (int) pVertices - (int) pVertex ) / sizeof( TEXTUREVERTEX2 ) );
	safe_delete_array( pVertex );
}