Exemple #1
0
BOOL CWndVendor::Process()
{
#if __VER >= 11 // __MOD_VENDOR
	// 장사를 시작하면 리셋버튼은 보이지 않게 함 
	CWndButton* pButton	= (CWndButton*)GetDlgItem( WIDC_RESET );
	if(g_pPlayer->m_vtInfo.IsVendorOpen())
		pButton->SetVisible( FALSE );
	else
		pButton->SetVisible( TRUE );
#endif
	return TRUE;
}
Exemple #2
0
BOOL CWndVendorConfirm::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	switch( nID )
	{
	case IDOK:
		{
			CWndVendor* pWndVendor	= (CWndVendor*)g_WndMng.GetWndBase( APP_VENDOR_REVISION );
			if( pWndVendor )
			{
				if( g_pPlayer->m_vtInfo.IsVendorOpen() )
					pWndVendor->Destroy();
				else
					g_DPlay.SendPVendorOpen( (const char*)m_strVendorName );
			}
			Destroy();
		}
		break;
	case IDCANCEL:
		CWndVendor* pWndVendor	= (CWndVendor*)g_WndMng.GetWndBase( APP_VENDOR_REVISION );
		if( pWndVendor && g_pPlayer->m_vtInfo.IsVendorOpen() == FALSE )
		{
			CWndButton* pWndButton	= (CWndButton*)pWndVendor->GetDlgItem( WIDC_OK );
			pWndButton->SetVisible( TRUE );
		}
		Destroy();
		break;
	}
	
	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
void CWndGuideTextMgr::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 

	DelWndStyle(WBS_MOVE);
	AddWndStyle(WBS_TOPMOST);
	m_wndTitleBar.SetVisible( FALSE );

	m_bVisible = FALSE;

	CWndText* pWndText;
	CWndButton* pWndButton;
    pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	m_Rect[0] = pWndText->GetWndRect();
	pWndButton = (CWndButton*)GetDlgItem( WIDC_BACK );
	m_Rect[1] = pWndButton->GetWndRect();
#if __VER >= 12 // __MOD_TUTORIAL
	pWndButton->SetVisible(FALSE);
#endif
	pWndButton  = (CWndButton*)GetDlgItem( WIDC_NEXT );	
	m_Rect[2] = pWndButton->GetWndRect();
	m_Rect[3] = GetWndRect();

	m_nCurrentVector = 0;
	m_VecGuideText.clear();	

	m_pTextureBG = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, "GuideBG.tga" ), 0, TRUE );
} 
Exemple #4
0
void CWndVendor::SetVendor( CMover* pVendor )
{
	m_pVendor	= pVendor;
	m_wndctrlVendor.InitVendor( m_pVendor );
	if( !m_pVendor->IsActiveMover() )
	{
		CWndEdit* pWndEdit	= (CWndEdit*)GetDlgItem( WIDC_EDIT1 );
		pWndEdit->SetString( pVendor->m_vtInfo.GetTitle() );
		pWndEdit->EnableWindow( FALSE );
		CWndButton* pButton	= (CWndButton*)GetDlgItem( WIDC_OK );
		pButton->SetVisible( FALSE );
		pButton	= (CWndButton*)GetDlgItem( WIDC_CANCEL );
		pButton->SetVisible( FALSE );
	}
	CWndWorld* pWndWorld	= (CWndWorld*)g_WndMng.GetWndBase( APP_WORLD );
	if( pWndWorld )
		pWndWorld->m_objidTracking	= NULL_ID;

	if( g_WndMng.m_pWndDialog )
		Destroy();
}
Exemple #5
0
void CWndGuildBank::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요
#if __VER >= 11 // __SYS_POCKET
	if(GetWndBase( APP_BAG_EX )) GetWndBase( APP_BAG_EX )->Destroy();
#endif
	if( g_WndMng.m_pWndTrade || g_WndMng.m_pWndShop || g_WndMng.m_pWndBank || g_WndMng.GetWndVendorBase() )
	{
		Destroy();
		return;
	}

	
	CWndStatic* pCost = (CWndStatic*) GetDlgItem( WIDC_GUILDBANK_NUM );
	pCost->AddWndStyle(WSS_MONEY);

	CWndTabCtrl* pTabCtrl = reinterpret_cast<CWndTabCtrl*>(GetDlgItem(WIDC_TABCTRL1));
	
	m_wndItemCtrl.Create( WLVS_ICON, CRect( 0, 0, 250, 250 ), pTabCtrl, 11 );
	m_wndItemCtrl.InitItem( &g_pPlayer->GetGuild()->m_GuildBank, APP_GUILD_BANK );

	WTCITEM tabTabItem;
	
	tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM;
	tabTabItem.pszText = prj.GetText(TID_GAME_ITEM);//"아이템";
	tabTabItem.pWndBase = &m_wndItemCtrl;
	pTabCtrl->InsertItem( 0, &tabTabItem );
	
	LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_CUSTOM1 );
	m_wndGold.Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_CUSTOM1 );
	m_wndGold.AddWndStyle( WBS_NODRAWFRAME );

	CGuild *pGuild = g_pPlayer->GetGuild();
	if( pGuild )
	{
		if(	pGuild->IsMaster( g_pPlayer->m_idPlayer ) == FALSE )	// 길마가 아니면 
		{
			CWndButton* pWndButt = (CWndButton*)GetDlgItem(WIDC_BUTTON2);	// 망토제작 버튼을 disable 시킨다.
			pWndButt->EnableWindow( FALSE );
		}
	}


#ifdef __GLDISABLE
	CWndButton* pWndButt = (CWndButton*)GetDlgItem(WIDC_BUTTON1);
	pWndButt->EnableWindow( FALSE );
#endif	

	CWndInventory* pWndInventory = (CWndInventory*)GetWndBase( APP_INVENTORY );
	CRect rectInventory = pWndInventory->GetWindowRect( TRUE );
	CPoint ptInventory = rectInventory.TopLeft();
	CPoint ptMove;
	
	CRect rect = GetWindowRect( TRUE );
	
	if( ptInventory.x > rect.Width() / 2 )
		ptMove = ptInventory - CPoint( rect.Width(), 0 );
	else
		ptMove = ptInventory + CPoint( rectInventory.Width(), 0 );
	
	Move( ptMove );

	if( pGuild )
	{
		CWndButton* pWndButt = (CWndButton*)GetDlgItem(WIDC_BUTTON3);

#if __VER >= 8 // __GUILDCOMBAT_85
		pWndButt->EnableWindow(FALSE);
		pWndButt->SetVisible(FALSE);
#else // __VER >= 8
		if( g_GuildCombatMng.m_uWinGuildId == pGuild->GetGuildId()  )
			pWndButt->EnableWindow(TRUE);
		else
			pWndButt->EnableWindow(FALSE);
#endif // __VER >= 8
	}

#if __VER >= 11 // __GUILD_BANK_LOG
	CWndButton* pWndButtLog = (CWndButton*)GetDlgItem(WIDC_LOG);
	pWndButtLog->EnableWindow(TRUE);
	pWndButtLog->SetVisible(TRUE);
#else //__GUILD_BANK_LOG
	//CWndButton* pWndButtLog = (CWndButton*)GetDlgItem(WIDC_LOG);
	//pWndButtLog->EnableWindow(FALSE);
	//pWndButtLog->SetVisible(FALSE);
#endif //__GUILD_BANK_LOG
} 
Exemple #6
0
void CWndChat::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

#ifdef __CHAT_V19
	CWndButton* pWndLock = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
	CWndButton* pWndLog = (CWndButton*)GetDlgItem( WIDC_CHECK3 );
	CWndButton* pWndMoveLock = (CWndButton*)GetDlgItem( WIDC_MOVELOCK );
	CWndButton* pWndHelp = (CWndButton*)GetDlgItem( WIDC_HELP );
	CWndButton* pWndCheck = (CWndButton*)GetDlgItem( WIDC_RADIO6 );
	pWndLock->SetVisible( false );
	pWndLog->SetVisible( true );
	pWndMoveLock->SetVisible( false );
	pWndHelp->SetVisible( false );
	pWndCheck->SetVisible(false);
#endif //__CHAT_V19

	//AddWndStyle( WBS_THICKFRAME );

	m_timerDobe.Set( SEC( 5 ) );

	LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_MACRO_CHAT );
	LPWNDCTRL lpWndText = GetWndCtrl( WIDC_CUSTOM1 );
	m_wndMacroChat.Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_MACRO_CHAT );
	m_wndMacroChat.AddWndStyle( WBS_NODRAWFRAME );

	lpWndCtrl = GetWndCtrl( WIDC_EDIT );
	m_wndEdit.Create( g_Neuz.GetSafeHwnd(), WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_EDIT );
	m_wndText.Create( WBS_NOFRAME | WBS_NODRAWFRAME | WBS_VSCROLL, lpWndText->rect, this, WIDC_TEXT );
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT );
	CWndEdit* pWndHead = (CWndEdit*)GetDlgItem( WIDC_HEAD );
	CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT );

	if( g_pPlayer->IsAuthHigher( AUTH_GAMEMASTER ) )
	{
		pWndText->m_bEnableClipboard = TRUE;
		pWndHead->m_bEnableClipboard = TRUE;
		pWndEdit->m_bEnableClipboard = TRUE;
	}
	pWndEdit->SetNativeMode();

#if __VER >= 11 // __CSC_VER11_1
	CRect rectEdit = m_wndEdit.GetWndRect();
	rectEdit.left = rectEdit.left - 90;
	m_wndEdit.SetWndRect( rectEdit );

	CRect customRect = lpWndCtrl->rect;
	CWndCustom* pCustom = (CWndCustom*)GetDlgItem(WIDC_MACRO_CHAT);
	if(pCustom)
#ifdef __CHAT_V19
		pCustom->Move(customRect.TopLeft().x - 112, customRect.TopLeft().y - 2);
#else
		pCustom->Move(customRect.TopLeft().x - 119, customRect.TopLeft().y);
		pWndEdit->Move(customRect.TopLeft().x + 105, customRect.bottom + 30);
#endif //__CHAT_V19
	if(pWndHead)
	{
		pWndHead->EnableWindow(FALSE);
		pWndHead->SetVisible(FALSE);
	}
#endif //__CSC_VER11_1
	if( g_Option.m_nInstantHelp )
	{
		CScript	s;
		s.Load( MakePath( DIR_CLIENT, "InstantHelp.inc" ) );
		s.GetToken();
		while( s.tok != FINISHED )
		{
			m_strArray.Add( s.Token );
			s.GetToken();
		}
	}
	//m_strArray.

/*
	CRect rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.right = 70;
	rect.left += 5;
	rect.DeflateRect( 1, 1 );
	m_wndBeginning.Create( g_Neuz.GetSafeHwnd(), WBS_NODRAWFRAME, rect, this, 1000);

	rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.left = 75;
	rect.right -= 134;
	rect.DeflateRect( 1, 1 );
	//rect.left = rect.Width() * 20 / 100;
	//m_wndEdit.AddWndStyle( WBS_NODRAWFRAME );
	m_wndEdit.Create( g_Neuz.GetSafeHwnd(), WBS_NODRAWFRAME, rect, this, 1001 );
*/
//	m_texEdit.LoadTexture( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, "WndChat2.bmp" ), 0xffff00ff, TRUE );
/*
	rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.left = rect.right - 134;
	rect.right = r mnnnnft + 15;
	rect.DeflateRect( 1, 1 );
	m_wndShout.Create( " ", 0, rect, this, 1010 );

	rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.left = rect.right - 117;
	rect.right = rect.left + 15;
	rect.DeflateRect( 1, 1 );
	m_wndParty.Create( " ", 0, rect, this, 1011 );
*/

/*
	m_wndText.AddWndStyle( WBS_VSCROLL );
	m_wndText.AddWndStyle( WBS_NOFRAME );
	m_wndText.AddWndStyle( WBS_NODRAWFRAME );
	m_wndText.Create( 0, rect, this, 1003 ); 
	m_wndText.SetFont( g_Neuz.m_Theme.m_pFontChat );
	m_wndText.m_string.Reset( m_pFont, &rect);
*/
/*
	rect = GetClientRect();
	rect.left = rect.right - 100;
	//rect.bottom -= 80;
	rect.DeflateRect( 1, 1 );
	m_wndReceiver.AddWndStyle( WBS_VSCROLL );
	m_wndReceiver.AddWndStyle( WBS_NOFRAME );
	m_wndReceiver.Create( EBS_AUTOVSCROLL, rect, this, 1002 );
	m_wndReceiver.AddString( "Vampyre\n" );
	m_wndReceiver.AddString( "Xuzhu\n" );
	m_wndReceiver.AddString( "Zodiacus\n" );
	m_wndReceiver.AddString( "Jeff\n" );
	m_wndReceiver.m_string.Reset( m_pFont, &rect);
*/

	//CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT );
	SetChannel();
	CWndButton* pWndRadio1 = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
	CWndButton* pWndRadio2 = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
	CWndButton* pWndRadio3 = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
	CWndButton* pWndRadio4 = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
	CWndButton* pWndRadio5 = (CWndButton*)GetDlgItem( WIDC_RADIO5 );
	if( m_nChatChannel == CHATSTY_GENERAL ) pWndRadio1->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_WHISPER ) pWndRadio2->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_SHOUT   ) pWndRadio3->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_PARTY   ) pWndRadio4->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_GUILD   ) pWndRadio5->SetCheck( TRUE );
	//pWndText->m_string.Init(
	//pWndText->m_string = g_WndMng.m_ChatString;
	pWndText->m_nLineSpace = 2;
	//pWndText->m_string.Reset( m_pFont, &pWndText->GetClientRect() );
	
	//pWndText->
	/*
	CRect rect = GetClientRect();
	rect.bottom -= 20;
	rect.right -= 0;//100;
	rect.DeflateRect( 1, 1);
	m_wndText.SetWndRect( rect );
*/
	//LPBYTE m_wndChatEdit[3];
	//CSize sizeWndChatEdit[3];
#if __VER >= 11 // __CSC_VER11_1
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit00_1.tga" ), &m_wndChatEdit[0] );
#else //__CSC_VER11_1
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit00.tga" ), &m_wndChatEdit[0] );
#endif //__CSC_VER11_1
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit01.tga" ), &m_wndChatEdit[1] );
#ifdef __LANG_IME_0327
	LoadTGA( MakePath( DIR_THEME,  ::GetLanguage(), "WndChatEdit02.tga" ), &m_wndChatEdit[2] );
#else	// __LANG_IME_0327
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit02.tga" ), &m_wndChatEdit[2] );
#endif	// __LANG_IME_0327

	if( m_wndChatEdit[2].lpData == NULL )
	{
		Error( "CWndChat::OnInitialUpdate() m_wndChatEdit[2].lpData = NULL" );
		return;
	}
/*
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( 154, rectRoot.bottom - rectWindow.Height() );
	Move( point );
*/
#ifndef __CHAT_V19
	CWndButton* pWndLock = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
	pWndLock->SetCheck( m_bChatLock );
	CWndButton* pWndMoveLock = (CWndButton*)GetDlgItem( WIDC_MOVELOCK );
	pWndMoveLock->SetCheck( m_bMoveLock );
#endif //__CHAT_V19
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rect = GetWindowRect();
	int nWidth  = rect.Width(); 
	int nHeight = rect.Height(); 
	int x = 0;//rectRoot.left + (rectRoot.Width()  / 2) - (nWidth  / 2);
	int y = rectRoot.bottom - nHeight;	
	CPoint point( x, y );
	Move( point );

	m_timerInputTimeOut.Set( SEC( 300 ) );

#if __VER >= 8 //__Y_CHAT_SYSTEM_8
	if( g_WndMng.m_pWndChatLog == NULL )
	{
		g_WndMng.m_pWndChatLog = new CWndChatLog;
		
		if( g_WndMng.m_pWndChatLog )
		{
			g_WndMng.m_pWndChatLog->Initialize( NULL, APP_CHAT_LOG );
			
			CRect rectRoot = m_pWndRoot->GetLayoutRect();
			CRect rect = GetWindowRect(TRUE);
			CRect rect2 = g_WndMng.m_pWndChatLog->GetClientRect(TRUE);
			
			int x = 0;
			int y = rect.top;
			
			if( (rect.right+rect2.Width()) < rectRoot.right )
				x = rect.right;
			else
				x = (rect.left - rect2.Width() );
			
			CPoint point( x, y );
			g_WndMng.m_pWndChatLog->Move( point );

			g_WndMng.m_pWndChatLog->SetVisible(FALSE);
		}
	}

	if( g_WndMng.m_pWndChatLog )
	{
		CWndButton* pWndCheck3  = (CWndButton*)GetDlgItem( WIDC_CHECK3 );
		if( pWndCheck3 )
			pWndCheck3->SetCheck(g_WndMng.m_pWndChatLog->m_bVisible);
	}
#endif //__Y_CHAT_SYSTEM_8
}
Exemple #7
0
void CWndVendor::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate(); 

#if __VER >= 8 // __S8_VENDOR_REVISION
	SetTitle( prj.GetText( TID_GAME_VENDOR_TITLE ) );
	m_wndctrlVendor.Create( WLVS_ICON | WBS_NODRAWFRAME, CRect( 5, 60, 440, 460 ), this, 100 );
#else // __VER >= 8 // __S8_VENDOR_REVISION
	m_wndctrlVendor.Create( WLVS_ICON | WBS_NODRAWFRAME, CRect( 18, 80, 220, 250 ), this, 100 );
#endif // __VER >= 8 // __S8_VENDOR_REVISION
	
	SetVendor( g_pPlayer );
	if( g_pPlayer )
	{
		if( g_pPlayer->IsMode( COMMUNITY_MODE ) )
		{
			Destroy();
		}
	}
#if __VER >= 11 // __SYS_POCKET
	if(GetWndBase( APP_BAG_EX )) GetWndBase( APP_BAG_EX )->Destroy();
#endif
	if( g_WndMng.m_pWndTrade || g_WndMng.m_pWndShop || g_WndMng.m_pWndBank || g_WndMng.m_pWndGuildBank)
	{
		Destroy();
		return;
	}
	
#ifdef __S_SERVER_UNIFY
	if( g_WndMng.m_bAllAction == FALSE )
	{
		Destroy();
		return;
	}
#endif // __S_SERVER_UNIFY
	
#if __VER >= 8 // __S8_PK
	if( g_pPlayer->IsChaotic() )
	{
		CHAO_PROPENSITY Propensity = prj.GetPropensityPenalty( g_pPlayer->GetPKPropensity() );
		if( !Propensity.nVendor )
		{
			g_WndMng.PutString( prj.GetText( TID_GAME_CHAOTIC_NOT_VENDOR ) );
			Destroy();
			return;
		}
	}
#endif // __VER >= 8 // __S8_PK

	if( !m_pVendor->IsActiveMover() )
	{
		CWndButton* pButton	= (CWndButton*)GetDlgItem( WIDC_OK );
		pButton->SetVisible( FALSE );
		pButton	= (CWndButton*)GetDlgItem( WIDC_CANCEL );
		pButton->SetVisible( FALSE );
	}

	ReloadItemList();

	CWndInventory* pWndInventory	= (CWndInventory*)g_WndMng.CreateApplet( APP_INVENTORY );
	CRect rcInventory	= pWndInventory->GetWindowRect( TRUE );
	CRect rcVendor = GetWindowRect( TRUE );
	CPoint ptInventory	= rcInventory.TopLeft();
	CPoint point;
	if( ptInventory.x > m_pWndRoot->GetWndRect().Width() / 2 )
		point	= ptInventory - CPoint( rcVendor.Width(), 0 );
	else
		point	= ptInventory + CPoint( rcInventory.Width(), 0 );
	Move( point ); 
} 
Exemple #8
0
BOOL CWndVendor::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	if( message == 100 && nID == 100 )
	{
		LPSHORTCUT pShortcut	= (LPSHORTCUT)pLResult;
		if( pShortcut )
		{
			CWndBase* pWndFrame		= pShortcut->m_pFromWnd->GetFrameWnd();
			if( pWndFrame->GetWndId() == APP_INVENTORY )
			{
				CItemBase* pItemBase	= m_pVendor->GetItemId( pShortcut->m_dwId );
				if( pItemBase )
				{
					if( pItemBase->IsQuest() )
						return FALSE;

					if( pItemBase->GetProp()->dwItemKind3 == IK3_CLOAK && ( (CItemElem*)pItemBase )->m_idGuild != 0 )
						return FALSE;

//#if __VER >= 11 // __MA_VER11_05	// 케릭터 봉인 거래 기능 world,database,neuz	
//					if( pItemBase->m_dwItemId == II_SYS_SYS_SCR_SEALCHARACTER )
//						return FALSE;	// 개인상점판매허용
//#endif // __MA_VER11_05	// 케릭터 봉인 거래 기능 world,database,neuz

#if __VER >= 9 // __CSC_VER9_1
//					ItemProp* pItemProp = pItemBase->GetProp();
					CItemElem* pItemElem = (CItemElem*)pItemBase;
					if( pItemElem->IsFlag( CItemElem::expired ) )
						return TRUE;
					/*
					if(pItemProp->dwItemKind3 == IK3_EGG && pItemElem->m_pPet) //사망한 펫은 거래 불가
					{
						if(pItemElem->m_pPet->GetLife() <= 0)
							return FALSE;
					}
					*/
#endif //__CSC_VER9_1

					/*
					if( ((CItemElem*)pItemBase)->m_bCharged == 1 )
					{
						g_WndMng.PutString( prj.GetText( TID_GAME_NOTTRADE ), NULL, prj.GetTextColor( TID_GAME_NOTTRADE ) );
						return FALSE;
					}
					*/

					int iIndex	= pShortcut->m_dwData - 100;
					if( 0 <= iIndex && iIndex < MAX_VENDITEM )						
					{
						if( m_pVendor->m_vtInfo.GetItem( iIndex ) != NULL )
							return FALSE;
						
						if( IsUsingItem( pItemBase ) == FALSE && m_pVendor->IsActiveMover() && !m_pVendor->m_vtInfo.IsVendorOpen() )
						{
							SAFE_DELETE( m_pWndRegVend );
							m_pWndRegVend	= new CWndRegVend;
							m_pWndRegVend->Initialize( this );
							m_pWndRegVend->SetItem( iIndex, pItemBase );
						}
					}
				}
			}	// APP_INVENTORY
		}
	}
	else
	{
		if( nID == WIDC_OK )
		{
			if( g_pPlayer->m_pActMover->IsFly() )
				return TRUE;
			if( g_pPlayer->m_vtInfo.VendorIsVendor() == FALSE )
				return TRUE;
			CWndEdit* pWndEdit	= (CWndEdit*)GetDlgItem( WIDC_EDIT1 );
			CString strVendor	= pWndEdit->GetString();
			strVendor.TrimLeft();
			strVendor.TrimRight();

		/*#if __VER >= 11 // __MOD_VENDOR
			// 매물 액수 총합 + 현재 소지금이 2억1천이 넘으면 경고띄우고 리턴시킴.
			int nGold = (int)g_pPlayer->GetTotalGold();

			for( int iv = 0 ; iv < MAX_VENDITEM ; ++iv )
			{
				CItemBase *pItemBase = g_pPlayer->m_vtInfo.GetItem( iv );
				if( pItemBase == NULL )
					continue;

				nGold += ((CItemElem*)pItemBase)->m_nCost * pItemBase->GetExtra();
			}					
			
			if( nGold <= 0 || 2100000000 <= nGold )
			{
				g_WndMng.OpenMessageBox( _T(prj.GetText(TID_GAME_VENDOR_MAX_ALL_GOLD)), MB_OK, this );
				return TRUE;
			}
		#endif*/

			if( prj.IsInvalidName( strVendor )
#ifdef __RULE_0615
				|| prj.IsAllowedLetter( strVendor, TRUE ) == FALSE
#endif	// __RULE_0615
				)
			{
				g_WndMng.OpenMessageBox( _T( prj.GetText(TID_DIAG_0020) ) );
				return TRUE;
			}

			g_WndMng.WordChange( strVendor );
			// name
#ifdef __RULE_0615
			if( strVendor.GetLength() < 6 || strVendor.GetLength() > 32 )
#else	// __RULE_0615
			if( strVendor.GetLength() < 6 || strVendor.GetLength() >= 38 )
#endif	// __RULE_0615
			{
				g_WndMng.OpenMessageBox( _T( prj.GetText(TID_DIAG_0011) ) );
				return TRUE;
			}

			CString strFormat = strVendor;

			if( !strVendor.IsEmpty()  )
			{
				pWndEdit->m_string	= strFormat;
				pWndEdit->m_string.GetTextFormat(strFormat);
			}
			
#if __VER >= 8 // __S8_VENDOR_REVISION
			CWndVendorConfirm* pBox = new CWndVendorConfirm;
			g_WndMng.OpenCustomBox( "", pBox );			
			pBox->SetVendorName( strFormat );
			pBox->SetValue( prj.GetText( TID_GAME_VENDOR_START ) );
#else // __VER >= 8 // __S8_VENDOR_REVISION
			g_DPlay.SendPVendorOpen( (const char*)strFormat );
#endif // __VER >= 8 // __S8_VENDOR_REVISION
			CWndButton* pWndButton	= (CWndButton*)GetDlgItem( WIDC_OK );
			pWndButton->SetVisible( FALSE );
		}
		else if( nID == WIDC_CANCEL || nID == WTBID_CLOSE )
		{
#if __VER >= 8 // __S8_VENDOR_REVISION
			if( g_pPlayer->m_vtInfo.IsVendorOpen() )
			{
				CWndVendorConfirm* pBox = new CWndVendorConfirm;
				g_WndMng.OpenCustomBox( "", pBox );			
				pBox->SetValue( prj.GetText( TID_GAME_VENDOR_STOP ) );
				return FALSE;
			}
#endif // __VER >= 8 // __S8_VENDOR_REVISION
			Destroy( FALSE );
		}
		else if( nID == WIDC_CHAT )
		{
			BOOL bChattingRoom = FALSE;
			if( g_pPlayer->m_vtInfo.IsVendorOpen() )
			{
				g_DPlay.SendOpenChattingRoom();
				bChattingRoom = TRUE;
			}
			else if( g_pPlayer->m_vtInfo.GetOther() && g_Chatting.m_bState )
			{
				bChattingRoom = TRUE;
			}

			if( bChattingRoom )
			{
			#if __VER >= 11 // __MOD_VENDOR
				if(!m_pwndVenderMessage) 
				{
					m_pwndVenderMessage = new CWndVendorMessage;

					if(m_pVendor->IsActiveMover())
						m_pwndVenderMessage->m_nIsOwner = TRUE;
				#ifdef __FIX_WND_1109
					m_pwndVenderMessage->Initialize( this );
				#else	// __FIX_WND_1109
					m_pwndVenderMessage->Initialize( );
				#endif	// __FIX_WND_1109
				}
				else
				{
					if(m_pwndVenderMessage->IsVisible()) m_pwndVenderMessage->SetVisible(FALSE);
					else								 m_pwndVenderMessage->SetVisible(TRUE);
				}
			#else
				SAFE_DELETE( m_pwndVenderMessage );
				m_pwndVenderMessage = new CWndVendorMessage;
			#ifdef __FIX_WND_1109
				m_pwndVenderMessage->Initialize( this );
			#else	// __FIX_WND_1109
				m_pwndVenderMessage->Initialize( );
			#endif	// __FIX_WND_1109
			#endif

			}
		}
#if __VER >= 11 // __MOD_VENDOR
		else if(nID == WIDC_RESET)
		{
			
			CItemBase	apItem_VT[MAX_VENDITEM];		/// vendor and trader share pointer array
			ZeroMemory( apItem_VT, sizeof( apItem_VT ) );

			//if( g_pPlayer->m_vtInfo.IsVendorOpen() )
			//{
				for( int i = 0; i < MAX_VENDITEM; i++ )
				{
					// 리스트를 클리어 한다. 
					CItemBase* pItemBase = g_pPlayer->m_vtInfo.GetItem(i);
					if( pItemBase != NULL )
					{
						if( pItemBase->m_dwObjId != 0 )
							g_DPlay.SendUnregisterPVendorItem( i );
					}
				}

				// 저장버퍼도 클리어
				memset(g_Neuz.m_aSavedInven, 0, sizeof(g_Neuz.m_aSavedInven));
			//}
		}
#endif
	}
	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
}
void CWndGuideTextMgr::_SetGuideText(GUIDE_STRUCT guide)
#endif
{
	CWndText* pWndText;
	CWndButton* pWndButton;

	pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	pWndText->SetWndRect( m_Rect[0] );
	pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
	pWndButton->SetWndRect( m_Rect[1] );
	pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
	pWndButton->SetWndRect( m_Rect[2] );
	SetWndRect(	m_Rect[3] );
#if __VER >= 12 // __MOD_TUTORIAL
	if(bIsNext) pWndButton->SetVisible(TRUE);
	else		pWndButton->SetVisible(FALSE);
#endif
	
	m_bVisible = TRUE;

	m_strHelpKey = guide.m_str;
	pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
#if __VER >= 12 // __MOD_TUTORIAL
	pWndText->SetString("");
	pWndText->m_string.AddParsingString(LPCTSTR(guide.m_str));
	pWndText->ResetString();
#else
	pWndText->SetString( (guide.m_nkey == CWndGuideSystem::KEY) ? prj.GetHelp( m_strHelpKey ) : guide.m_str );
#endif
	CRect rect = pWndText->GetWndRect();

	pWndText->m_string.Align( m_pFont );
	
	int nLine = pWndText->m_string.GetLineCount();
	
	if( nLine < 10 )
	{
		if( nLine < 8 )
			nLine = 8;

		CRect clientrect = GetWndRect();
		
		int ngap = rect.Height() - (nLine * 22);
		clientrect.top += ngap;
		SetWndRect(clientrect);

		rect.bottom -= ngap;
		pWndText->SetWndRect( rect );

		CRect ptRect;
#ifndef __MOD_TOTURIAL
		pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
		ptRect = pWndButton->GetWndRect();
		ptRect.OffsetRect( 0, -ngap );
		pWndButton->SetWndRect(ptRect);
#endif
		pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
		ptRect = pWndButton->GetWndRect();
		ptRect.OffsetRect( 0, -ngap );
		pWndButton->SetWndRect(ptRect);
		
		pWndText->m_wndScrollBar.m_bVisible = FALSE;
	}
	else
	{
		/*
		pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
		pWndText->SetWndRect( m_Rect[0] );
		pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
		pWndButton->SetWndRect( m_Rect[1] );
		pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
		pWndButton->SetWndRect( m_Rect[2] );
		SetWndRect(	m_Rect[3] );
		*/

		pWndText->m_wndScrollBar.m_bVisible = TRUE;
		pWndText->SetWndRect( rect );
	}

	CWndGuideSystem* pWndGuide = (CWndGuideSystem*)GetWndBase( APP_GUIDE );
	CRect rectGuide = pWndGuide->GetWindowRect( TRUE );
	CPoint ptGuide = rectGuide.TopLeft();
	CPoint ptMove;

	pWndGuide->m_bVisible = TRUE;
	
	CRect windowrect = GetWindowRect( TRUE );
	
	if( ptGuide.x > windowrect.Width() )
		ptMove = ptGuide - CPoint( windowrect.Width(), 0 );
	else
		ptMove = ptGuide + CPoint( rectGuide.Width(), 0 );

	ptMove.y = rectGuide.bottom;
	ptMove.y -= windowrect.Height();
	
	if( ptMove.y < 0 )
		ptMove.y = rectGuide.top;
	
	Move( ptMove );
}
Exemple #10
0
void CWndOptionGame::OnInitialUpdate()
{
    CWndNeuz::OnInitialUpdate();
    // 여기에 코딩하세요

    CWndButton* pWndButton[ 2 ];

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bTrade) ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bSay) ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO5 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO6 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bParty) ]->SetCheck( TRUE );
#if __VER >= 12 // __UPDATE_OPT
    m_Texture.LoadTexture( g_Neuz.GetDevice(), MakePath( DIR_THEME, "WndVolumeBar.tga" ), 0xffff00ff, TRUE );
    m_TexturePt.LoadTexture( g_Neuz.GetDevice(), MakePath( DIR_THEME, "ButtSpin.tga" ), 0xffffffff, TRUE );
    m_nStep[0] = (int)( g_Option.m_fEffectVolume * 10 );
    m_nStep[1] = (int)( g_Option.m_fBGMVolume * 10 );

    CWndButton* pWndHelp = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
    pWndHelp->SetCheck( g_Option.m_nInstantHelp );

    CWndButton* pWndCheck = (CWndButton*)GetDlgItem( WIDC_CHECK2 );
    if(*g_Option.m_pGuide > 0)
        pWndCheck->SetCheck( FALSE );
    else
        pWndCheck->SetCheck( TRUE );

    CWndButton* pWndAlpha = (CWndButton*)GetDlgItem( WIDC_CHECK3 );
    pWndAlpha->SetCheck( g_Option.m_nWindowAlpha == 255 ? FALSE : TRUE);

#if __VER >= 15 // __IMPROVE_SYSTEM_VER15
    CWndButton* pWndCheckBattleBGM = (CWndButton*)GetDlgItem( WIDC_CHECK_BATTLE_BGM );
    pWndCheckBattleBGM->SetCheck( g_Option.m_bBattleBGM ? TRUE : FALSE );
#endif // __IMPROVE_SYSTEM_VER15
#ifdef __GAME_GRADE_SYSTEM
    CWndButton* pWndCheckGameGrade = (CWndButton*)GetDlgItem( WIDC_CHECK_GAME_GRADE );
    if( pWndCheckGameGrade )
    {
        if( ::GetLanguage() == LANG_KOR )
        {
            pWndCheckGameGrade->SetCheck( g_Option.m_bGameGradeRendering ? TRUE : FALSE );
        }
        else
        {
            pWndCheckGameGrade->SetVisible( FALSE );
        }
    }
#endif // __GAME_GRADE_SYSTEM

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO7 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO8 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bMessengerJoin) ]->SetCheck( TRUE );
#else
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_SHOUT_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_SHOUT_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bShout) ]->SetCheck( TRUE );
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGERJOIN_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGERJOIN_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bMessengerJoin) ]->SetCheck( TRUE );
#endif


    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGER_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGER_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bMessenger) ]->SetCheck( TRUE );

#if __VER >= 9 // __CSC_VER9_REMOVE_PKSETTING
    CRect rect;
    LPWNDCTRL lpWndCtrl;
    // 자동 PK 모드 옵션 제거
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_OFF );
    pWndButton[ 0 ]->EnableWindow(FALSE);
    pWndButton[ 0 ]->SetVisible(FALSE);
    pWndButton[ 1 ]->EnableWindow(FALSE);
    pWndButton[ 1 ]->SetVisible(FALSE);
    CWndStatic* pStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC8 );
    pStatic->EnableWindow(FALSE);
    pStatic->SetVisible(FALSE);

    // 옵션 위치 제조정
    lpWndCtrl = GetWndCtrl( WIDC_STATIC8 );
    rect = lpWndCtrl->rect;
    pStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC9 );
    pStatic->Move(rect.TopLeft().x, rect.TopLeft().y);
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_ON );
    lpWndCtrl = GetWndCtrl( WIDC_AUTOPK_ON );
    rect = lpWndCtrl->rect;
    pWndButton[ 0 ]->Move(rect.TopLeft().x, rect.TopLeft().y);
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_OFF );
    lpWndCtrl = GetWndCtrl( WIDC_AUTOPK_OFF );
    rect = lpWndCtrl->rect;
    pWndButton[ 1 ]->Move(rect.TopLeft().x, rect.TopLeft().y);
#else //__CSC_VER9_REMOVE_PKSETTING
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    if( g_pPlayer )
        pWndButton[ !(g_pPlayer->IsMode( FREEPK_MODE ) ) ]->SetCheck( TRUE );
    else
        pWndButton[ 1 ]->SetCheck( TRUE );
#endif //__CSC_VER9_REMOVE_PKSETTING

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    if( g_pPlayer )
        pWndButton[ g_pPlayer->IsMode( PVPCONFIRM_MODE ) ]->SetCheck( TRUE );
    else
        pWndButton[ 0 ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO12 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO13 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    if( g_pPlayer->IsMode( EQUIP_DENIAL_MODE ) )
        pWndButton[ 1 ]->SetCheck( TRUE );
    else
        pWndButton[ 0 ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO14 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO15 );
    pWndButton[ 0 ]->SetGroup( TRUE );

    if( g_Option.m_bAutoAttack )
        pWndButton[ 0 ]->SetCheck( TRUE );
    else
        pWndButton[ 1 ]->SetCheck( TRUE );

    // 윈도를 중앙으로 옮기는 부분.
    CRect rectRoot = m_pWndRoot->GetLayoutRect();
    CRect rectWindow = GetWindowRect();
    CPoint point( rectRoot.right - rectWindow.Width(), 110 );
    Move( point );
    MoveParentCenter();
}