Пример #1
0
CWndGHMainMenu::~CWndGHMainMenu( )
{
	// 길드하우스를 빠져나감.
	CWndBase* pWnd = NULL;
	pWnd = (CWndGuildHousing*)g_WndMng.GetApplet( APP_GH_FURNITURE_STORAGE );
	if( pWnd )	
		pWnd->Destroy( ); 

	pWnd = (CWndGuild*)g_WndMng.GetApplet( APP_GUILD );
	if( pWnd )	
		pWnd->Destroy( ); 

	if( g_WndMng.m_pWndGuildBank )	
		SAFE_DELETE( g_WndMng.m_pWndGuildBank ); 

	if( GuildDeploy()->IsReady( ) )
		GuildDeploy()->EndDeploy( );
}
Пример #2
0
BOOL CWndDuelConfirm::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	BOOL bResult = FALSE;
	if( m_bDuelParty == FALSE )
	{
		if( nID == WIDC_YES ) 
		{
			// 여기다가 승락하는 처리 추가하시오
			// 서버로 승락 했다는메시지를 보냄
			// 서버에서 받으면 두 캐릭터에게 모두 듀얼이 시작됐다는걸 보냄
			// 각 클라에서 받으면 시작.
			CMover *pSrc = prj.GetMover( m_idSrc );	// 듀얼 신청자.
			if( IsValidObj( pSrc ) )
			{

#if __VER >= 8 // 8차 듀얼 061226 ma
#if __VER >= 15 // __IMPROVE_QUEST_INTERFACE
				CWndBase* pWndBase = g_WndMng.GetWndBase( APP_DIALOG_EX );
#else // __IMPROVE_QUEST_INTERFACE
				CWndBase* pWndBase = g_WndMng.GetWndBase( APP_DIALOG );
#endif // __IMPROVE_QUEST_INTERFACE
				if( pWndBase ) 
					pWndBase->Destroy();

				if( g_pPlayer->m_vtInfo.GetOther() )
				{
					if( g_pPlayer->m_vtInfo.GetOther()->IsPlayer() )	
						g_DPlay.SendTradeCancel();

						g_DPlay.SendCloseShopWnd();
						g_pPlayer->m_vtInfo.SetOther( NULL );
				}
			
				pWndBase	= g_WndMng.GetWndBase( APP_INVENTORY );
				if( pWndBase )
				{
					((CWndInventory*)pWndBase)->BaseMouseCursor();
				}	

				pWndBase	= g_WndMng.GetWndVendorBase();
				if( pWndBase )
				{
					pWndBase->Destroy();
					pWndBase	= g_WndMng.GetWndBase( APP_INVENTORY );
					if( pWndBase )
						pWndBase->Destroy();
				}

				pWndBase	= g_WndMng.GetWndBase( APP_SHOP_ );
				if( pWndBase )
				{
					pWndBase->Destroy();
					pWndBase = g_WndMng.GetWndBase( APP_TRADE_GOLD );
					if( pWndBase )	
						pWndBase->Destroy();
					pWndBase = g_WndMng.GetWndBase( APP_INVENTORY );
					if( pWndBase ) 
						pWndBase->Destroy();
				}
#if __VER >= 8 //__CSC_VER8_4
				pWndBase	= g_WndMng.GetWndBase( APP_BEAUTY_SHOP_SKIN );
				if( pWndBase )
				{
					pWndBase->Destroy();
				
					pWndBase	= g_WndMng.GetWndBase( APP_INVENTORY );
				
					if( pWndBase )
						pWndBase->Destroy();
				}
				pWndBase	= g_WndMng.GetWndBase( APP_BEAUTY_SHOP_EX );
#else
				pWndBase	= g_WndMng.GetWndBase( APP_BEAUTY_SHOP );
#endif //__CSC_VER8_4
				if( pWndBase )
				{
					pWndBase->Destroy();

					pWndBase	= g_WndMng.GetWndBase( APP_INVENTORY );

					if( pWndBase )
						pWndBase->Destroy();
				}
				pWndBase	= g_WndMng.GetWndBase( APP_COMMON_BANK );
				if( pWndBase )
				{
					g_DPlay.SendCloseBankWnd();
					pWndBase->Destroy();
					pWndBase = g_WndMng.GetWndBase( APP_TRADE_GOLD );
					if( pWndBase )	
						pWndBase->Destroy();
					pWndBase = g_WndMng.GetWndBase( APP_INVENTORY );
					if( pWndBase )	
						pWndBase->Destroy();
				}
				pWndBase	= g_WndMng.GetWndBase( APP_REPAIR );
				if( pWndBase )
				{
					pWndBase->Destroy();
					pWndBase = g_WndMng.GetWndBase( APP_INVENTORY );
					if( pWndBase )	pWndBase->Destroy();
				}
				pWndBase	= g_WndMng.GetWndBase( APP_BANK_PASSWORD );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_CONFIRM_BANK );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_DROP_CONFIRM );
				if( pWndBase )
					pWndBase->Destroy();

				pWndBase	= g_WndMng.GetWndBase( APP_GUILD_BANK );
				if( pWndBase )
				{
					g_DPlay.SendCloseGuildBankWnd();
					pWndBase->Destroy();
				}
				pWndBase	= g_WndMng.GetWndBase( APP_RANK_WAR );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_RANK_INFO );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_RANK_GUILD );
				if( pWndBase )
					pWndBase->Destroy();

				pWndBase	= g_WndMng.GetWndBase( APP_PIERCING );
				if( pWndBase )
					pWndBase->Destroy();
			
				pWndBase	= g_WndMng.GetWndBase( APP_TEST );
				if( pWndBase )
					pWndBase->Destroy();
				
				pWndBase	= g_WndMng.GetWndBase( APP_COMMERCIAL_ELEM );
				if( pWndBase )
					pWndBase->Destroy();
				
				pWndBase	= g_WndMng.GetWndBase( APP_REMOVE_ELEM );
				if( pWndBase )
					pWndBase->Destroy();

				pWndBase	= g_WndMng.GetWndBase( APP_CHANGECLASS_1 );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_CHANGECLASS_2 );
				if( pWndBase )
					pWndBase->Destroy();
				
				pWndBase	= g_WndMng.GetWndBase( APP_QUERYEQUIP );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_POST );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_POST_SEND );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_POST_RECEIVE );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_POST_READ );
				if( pWndBase )
					pWndBase->Destroy();
				
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_RANK_P );
				if( pWndBase )
					pWndBase->Destroy();			
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_RANKING );
				if( pWndBase )
					pWndBase->Destroy();

				pWndBase	= g_WndMng.GetWndBase( APP_GUILD_WAR_STATE );
				if( pWndBase )
					pWndBase->Destroy();

				pWndBase	= g_WndMng.GetWndBase( APP_CLOSE_EXISTING_CONNECTION );
				if( pWndBase )
					pWndBase->Destroy();
#if __VER < 11 // __GUILD_COMBAT_1TO1
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_OFFER );
				if( pWndBase )
					pWndBase->Destroy();
#endif //__GUILD_COMBAT_1TO1
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_SELECTION );
				if( pWndBase )
					pWndBase->Destroy();
#if __VER < 11 // __GUILD_COMBAT_1TO1

				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_OFFERSTATE );
				if( pWndBase )
					pWndBase->Destroy();
#endif //__GUILD_COMBAT_1TO1
#if __VER >= 11 // __GUILD_COMBAT_1TO1
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_1TO1_SELECTION );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_1TO1_OFFERSTATE );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_GUILDCOMBAT_1TO1_OFFER );
				if( pWndBase )
					pWndBase->Destroy();
#endif //__GUILD_COMBAT_1TO1
#if __VER >= 12 // __SECRET_ROOM
				pWndBase	= g_WndMng.GetWndBase( APP_SECRETROOM_SELECTION );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_SECRETROOM_OFFER );
				if( pWndBase )
					pWndBase->Destroy();
				pWndBase	= g_WndMng.GetWndBase( APP_SECRETROOM_OFFERSTATE );
				if( pWndBase )
					pWndBase->Destroy();
#endif //__SECRET_ROOM

#endif // __VER >= 8 // 8차 듀얼 061226 ma
				g_DPlay.SendDuelYes( pSrc, g_pPlayer );		// 듀얼 신청 허락함.
			}
			bResult = TRUE;
		}
		else if( nID == WIDC_NO || nID == WTBID_CLOSE ) 
		{
			// 여기다가 거부하는 처리 추가하시오
			CMover *pSrc = prj.GetMover( m_idSrc );	// 듀얼 신청자.
			if( IsValidObj( pSrc ) )
			{
				g_DPlay.SendDuelNo( pSrc );		// pSrc에게 거부했다는걸 알림.
			}
			bResult = TRUE;
		}
	} else
	// 파티 듀얼.
	{
		if( nID == WIDC_YES ) 
		{
			// 여기다가 승락하는 처리 추가하시오
			// 서버로 승락 했다는메시지를 보냄
			// 서버에서 받으면 두 캐릭터에게 모두 듀얼이 시작됐다는걸 보냄
			// 각 클라에서 받으면 시작.
			CMover *pSrc = prj.GetMover( m_idSrc );	// 듀얼 신청자.
			if( IsValidObj( pSrc ) )
			{
				g_DPlay.SendDuelPartyYes( pSrc, g_pPlayer );		// 듀얼 신청 허락함.
			}
			bResult = TRUE;
		}
		else if( nID == WIDC_NO || nID == WTBID_CLOSE ) 
		{
			// 여기다가 거부하는 처리 추가하시오
			CMover *pSrc = prj.GetMover( m_idSrc );	// 듀얼 신청자.
			if( IsValidObj( pSrc ) )
			{
				g_DPlay.SendDuelPartyNo( pSrc );		// pSrc에게 거부했다는걸 알림.
			}
			bResult = TRUE;
		}
	}
	// 반드시!!! TRUE로 해서 메모리에서 날리자!!
	if( bResult )
		Destroy( /*TRUE*/ );
	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
Пример #3
0
void CWndDialog::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 

#if __VER >= 15 // __IMPROVE_QUEST_INTERFACE
	CWndGroupBox* pWndGroupBox = ( CWndGroupBox* )GetDlgItem( WIDC_GROUP_BOX_TITLE );
	if( pWndGroupBox )
	{
		pWndGroupBox->m_dwColor = D3DCOLOR_ARGB( 255, 128, 0, 64 );
		pWndGroupBox->SetTitle( prj.GetText( TID_GAME_DIALOG ) );
	}

	m_pNewQuestListIconTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, _T( "QuestUiPaperGreen.tga" )), 0xffffffff );
	m_pExpectedQuestListIconTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, _T( "QuestUiPaperRed.tga" )), 0xffffffff );
	m_pCurrentQuestListIconTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, _T( "QuestUiPaperGray.tga" )), 0xffffffff );
	m_pCompleteQuestListIconTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, _T( "QuestUiPaperYellow.tga" )), 0xffffffff );

	LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_CUSTOM1 );
	lpWndCtrl->dwWndStyle |= WBS_VSCROLL;

	static const int QUEST_LIST_SELECT_COLOR = 0xffff0000;
	static const int QUEST_LIST_LINE_SPACE = 3;

	m_WndNewQuestListBox.Create( lpWndCtrl->dwWndStyle, lpWndCtrl->rect, this, lpWndCtrl->dwWndId );
	m_WndNewQuestListBox.m_nSelectColor = QUEST_LIST_SELECT_COLOR;
	m_WndNewQuestListBox.m_nLineSpace = QUEST_LIST_LINE_SPACE;
	if( m_pNewQuestListIconTexture )
		m_WndNewQuestListBox.SetLeftMargin( m_pNewQuestListIconTexture->m_size.cx );
	m_WndNewQuestListBox.SetVisible( FALSE );

	m_WndCurrentQuestListBox.Create( lpWndCtrl->dwWndStyle, lpWndCtrl->rect, this, lpWndCtrl->dwWndId );
	m_WndCurrentQuestListBox.m_nSelectColor = QUEST_LIST_SELECT_COLOR;
	m_WndCurrentQuestListBox.m_nLineSpace = QUEST_LIST_LINE_SPACE;
	if( m_pCurrentQuestListIconTexture )
		m_WndCurrentQuestListBox.SetLeftMargin( m_pCurrentQuestListIconTexture->m_size.cx );
	m_WndCurrentQuestListBox.SetVisible( FALSE );
#endif // __IMPROVE_QUEST_INTERFACEf
	
	CWndBase* pWndBase = (CWndBase*)g_WndMng.GetApplet( APP_INVENTORY );

	if( pWndBase )
	{
		pWndBase->Destroy();
	}
	
	CMover* pMover = prj.GetMover( m_idMover );
	if( pMover == NULL ) return;
	LPCHARACTER lpCharacter = pMover->GetCharacter();

	if( lpCharacter )
	{
		m_texChar.DeleteDeviceObjects();
		m_texChar.LoadTexture( g_Neuz.m_pd3dDevice, MakePath( "char\\",lpCharacter->m_szChar ), 0xffff00ff, TRUE );
		if( lpCharacter->m_dwMusicId )
			PlayMusic( lpCharacter->m_dwMusicId, 1 );
	}
	m_nCurArray = 0;
	int i; for( i = 0; i < m_strArray.GetSize(); i++ )
	{
		CEditString* pEditString = (CEditString*) m_strArray.GetAt( i );
		safe_delete( pEditString );
	}
	m_strArray.RemoveAll();


	MakeKeyButton();
	
	m_bSay = FALSE;

	UpdateButtonEnable();
	// 윈도를 중앙으로 옮기는 부분.
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rect = GetWindowRect();
	int nWidth  = rect.Width(); 
	int nHeight = rect.Height(); 
	int x = rectRoot.left + (rectRoot.Width()  / 2) - (nWidth  / 2);
	int y = rectRoot.top  + (rectRoot.Height() / 2) - (nHeight / 2);	
	CPoint point( x, 10 );
	Move( point );

#if __VER >= 15 // __IMPROVE_QUEST_INTERFACE
	CWndQuest* pWndQuest = (CWndQuest*)g_WndMng.GetWndBase( APP_QUEST_EX_LIST );
#else // __IMPROVE_QUEST_INTERFACE
	CWndQuest* pWndQuest = (CWndQuest*)g_WndMng.GetWndBase( APP_QUEST );
#endif // __IMPROVE_QUEST_INTERFACE
	if( pWndQuest ) pWndQuest->Update();
}