Ejemplo n.º 1
0
//
// nDmgCnt : 일반적으론 0 : 지속데미지를 사용할경우에 0이 아닌값이 들어온다.
//
void CSfx::DamageToTarget( int nDmgCnt, float fDmgAngle, float fDmgPower, int nMaxDmgCnt )
{
	CMover* pObjSrc = (CMover*)prj.GetCtrl( m_idSrc );
	CCtrl* pObjDest = prj.GetCtrl( m_idDest );
	
	if( IsInvalidObj(pObjSrc) )		return;		// 지금은 걍 리턴하지만 이렇게 실패한경우는 m_idSfxHit을 Clear해주는작업이 필요하다.
	if(	IsInvalidObj(pObjDest) )	return;

	if( pObjDest->GetType() == OT_MOVER )
	{
		CMover* pMover = (CMover*) pObjDest;
#ifdef __CLIENT
		PLAYSND( pMover->GetProp()->dwSndDmg2, &pMover->GetPos() );	// 마법류 맞을때 타격음.	
#endif 

#ifdef __CLIENT
		// 쏜놈이 플레이어이거나 / 쏜놈은 플레이어가 아닌데 맞은놈이 플레이어일경우 전송
		if( pObjSrc->IsActiveMover() || (pObjSrc->IsPlayer() == FALSE && pObjDest->IsActiveObj()) )
		{
			pMover->SetDmgCnt( 10 );	// 발사체 맞아도 이제 흔들린다,
			g_DPlay.SendSfxHit( m_idSfxHit, m_nMagicPower, m_dwSkill, pObjSrc->GetId(), nDmgCnt, fDmgAngle, fDmgPower );
			if( nMaxDmgCnt == 1 )	// 한방짜리 데미지만 id를 클리어 함.
				m_idSfxHit = 0;		// 0으로 해놔야 this가 삭제될때 SendSfxClear를 또 보내지 않는다.
		}
#endif	// __CLIENT
	}
}
Ejemplo n.º 2
0
void CWndOptSound::OnLButtonUp( UINT nFlags, CPoint point ) 
{ 
	PLAYSND(SND_NONE);
	ReleaseCapture();
	m_bLButtonClick = FALSE;
	m_bLButtonClick2 = FALSE;
} 
Ejemplo n.º 3
0
void CWndOptionGame::OnLButtonUp( UINT nFlags, CPoint point )
{
#if __VER >= 12 // __UPDATE_OPT
    PLAYSND(SND_NONE);
    ReleaseCapture();
    m_bLButtonClick = FALSE;
    m_bLButtonClick2 = FALSE;
#endif
}
Ejemplo n.º 4
0
void CWndOptVideo::OnLButtonUp( UINT nFlags, CPoint point ) 
{ 
	PLAYSND(SND_NONE);
	ReleaseCapture();
	m_bLButtonClick = FALSE;
	m_bLButtonClick2 = FALSE;
#if __VER >= 8 //__Y_GAMMA_CONTROL_8
	m_bLButtonClick3 = FALSE;
	m_bLButtonClick4 = FALSE;
	m_bLButtonClick5 = FALSE;
#endif //__Y_GAMMA_CONTROL_8
} 
//
//		비행중 공격 액션 처리
//
void	CActionMover::_ProcessStateAttack2( DWORD dwState, int nParam )
{
	CMover* pMover = m_pMover;
	CModelObject	*pModel = (CModelObject *)pMover->m_pModel;
	
	switch( dwState )
	{
	case OBJSTA_ATK1:
		if( pModel->IsEndFrame() )
			ResetState( OBJSTA_ATK_ALL );

		if( pModel->m_nPause > 0 )
		{
			--pModel->m_nPause;
		} 
		else
		{
			if( pModel->IsAttrHit() )
			{
				CMover* pHitObj	= prj.GetMover( m_objidHit );
				if( IsInvalidObj( pHitObj ) || pHitObj->IsDie() )	// 타겟이 거시기하거나 죽었으면 취소
					return;

				BOOL bSuccess = pHitObj->m_pActMover->SendDamage( AF_GENERIC, pMover->GetId() );
				if( bSuccess == FALSE )
					return;
			#ifdef __CLIENT
				ItemProp* pItemProp = pMover->GetActiveHandItemProp();
				if( pItemProp )
				{
					D3DXVECTOR3 v = pMover->GetPos();
					PLAYSND( pItemProp->dwSndAttack1, &v );
				}
			#endif
				if( GetMover()->IsPlayer() )
				{
					pModel->m_nPause = 5;	// frame 멈춤
				}
				else
				{
					pModel->m_nPause = 0;	// 몬스터는 멈추지 않음
					pHitObj->m_pModel->m_nPause = 0;
				}
					
			}
		}
		break;
	}
}
Ejemplo n.º 6
0
void CWndGuideTextMgr::AddGuideText(GUIDE_STRUCT guide)
{

	m_VecGuideText.push_back( guide );

	m_nCurrentVector = m_VecGuideText.size()-1;

	PLAYSND( SND_INF_MESSENGERRING );
#if __VER >= 12 // __MOD_TUTORIAL
	if(guide.m_nVicCondition == 0)	_SetGuideText( guide, true);
	else							_SetGuideText( guide, false);
#else
	_SetGuideText( guide );
#endif
	
}
Ejemplo n.º 7
0
void CWndDialog::OnLButtonUp( UINT nFlags, CPoint point ) 
{ 
	if( m_timer.IsTimeOut() == FALSE )
		return;

	PLAYSND( SND_INF_CLICK );
	if( m_bWordButtonEnable )
	{
		int i; for( i = 0; i < m_nWordButtonNum; i++ )
		{
			if( m_aWordButton[ i ].rect.PtInRect( point ) )
			{			
				BeginText();
				RunScript( m_aWordButton[i].szKey, m_aWordButton[i].dwParam, m_aWordButton[i].dwParam2 );
				MakeKeyButton();
				UpdateButtonEnable();
			}
		}
	}
	int i; for( i = 0; i < m_nKeyButtonNum; i++ )
	{
		if( m_aKeyButton[ i ].rect.PtInRect( point ) )
		{
#if __VER >= 15 // __IMPROVE_QUEST_INTERFACE
			m_nSelectKeyButton = i;

			CWndGroupBox* pWndGroupBox = ( CWndGroupBox* )GetDlgItem( WIDC_GROUP_BOX_TITLE );
			if( pWndGroupBox )
				pWndGroupBox->SetTitle( m_aKeyButton[ m_nSelectKeyButton ].szWord );

			m_bSay = FALSE;
			BeginText();
 			LPWNDCTRL lpWndCustom1 = GetWndCtrl( WIDC_CUSTOM1 );
			if( strcmp( m_aKeyButton[ i ].szWord, prj.GetText( TID_GAME_NEW_QUEST ) ) == 0 && m_nNewQuestListNumber > 0 )
			{
				m_WndNewQuestListBox.SetVisible( TRUE );
				m_WndNewQuestListBox.SetFocus();
				m_WndCurrentQuestListBox.SetVisible( FALSE );
			}
			else if( strcmp( m_aKeyButton[ i ].szWord, prj.GetText( TID_GAME_CURRENT_QUEST ) ) == 0 && m_nCurrentQuestListNumber > 0 )
			{
				m_WndCurrentQuestListBox.SetVisible( TRUE );
				m_WndCurrentQuestListBox.SetFocus();
				m_WndNewQuestListBox.SetVisible( FALSE );
			}
			else
			{
				m_WndNewQuestListBox.SetVisible( FALSE );
				m_WndCurrentQuestListBox.SetVisible( FALSE );
				RunScript( m_aKeyButton[i].szKey, m_aKeyButton[i].dwParam, m_aKeyButton[i].dwParam2 );
			}
			MakeKeyButton();
			UpdateButtonEnable();
#else // __IMPROVE_QUEST_INTERFACE
			BeginText();
			RunScript( m_aKeyButton[i].szKey, m_aKeyButton[i].dwParam, m_aKeyButton[i].dwParam2 );
			MakeKeyButton();
			UpdateButtonEnable();
#endif // __IMPROVE_QUEST_INTERFACE
		}
	}
	for( i = 0; i < m_nContextButtonNum; i++ )
	{
		WORDBUTTON* pContextButton = &m_aContextButton[ i ];
		if( pContextButton->rect.PtInRect( point ) )
		{
			CString strKey = pContextButton->szKey;
			BeginText();
			RunScript( strKey, 0, 0 );
		}
	}
}