예제 #1
0
BOOL  CWndBlessingCancel::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )
{

	CItemElem* pTempElem;
	pTempElem  = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId );

    if( g_xRandomOptionProperty->GetRandomOptionKind( pTempElem ) == CRandomOptionProperty::eBlessing
		&& g_xRandomOptionProperty->GetRandomOptionSize( pTempElem->GetRandomOptItemId() ))
	{
		// 하락 상태가 된 아이템만 올릴 수 있다. 
		if(pTempElem != NULL)
		{
			if(m_pItemElem) m_pItemElem->SetExtra(0);
			m_pItemElem = pTempElem;
			m_pEItemProp = m_pItemElem->GetProp();
			m_pItemElem->SetExtra(m_pItemElem->GetExtra()+1);
			CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_START);
			pButton->EnableWindow(TRUE);
			
			LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_CHANGE );
			if(m_pEItemProp != NULL)
			{
				m_pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, m_pEItemProp->szIcon), 0xffff00ff );
			}
		}
	}
	else
	{
		g_WndMng.PutString( prj.GetText(TID_GAME_BLESSEDNESS_CANCEL), NULL, 0xffff0000 );
		return FALSE;
	}

	return TRUE;

}
예제 #2
0
BOOL CWndLvReqDown::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )
{
	
	CItemElem* pTempElem;
	pTempElem  = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId );

	// 하락 상태가 된 아이템만 올릴 수 있다. 
	if( pTempElem != NULL)
	{
		if(pTempElem->GetLevelDown() < 0)
		{
			if(m_pItemElem) m_pItemElem->SetExtra(0);
			m_pItemElem = pTempElem;
			m_pEItemProp = m_pItemElem->GetProp();
			if(m_pEItemProp != NULL)
			{
				m_pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, m_pEItemProp->szIcon), 0xffff00ff );
			}
			m_pItemElem->SetExtra(m_pItemElem->GetExtra()+1);
			CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_BUTTON1);
			pButton->EnableWindow(TRUE);
		}
	}

	return TRUE;
}
예제 #3
0
//-----------------------------------------------------------------------------
BOOL CWndMailRequestingBox::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
	switch( nID )
	{
	case WIDC_BUTTON_REQUEST:
		{
			++m_nDestroyCounter;
			CWndButton* pWndButton = ( CWndButton* )GetDlgItem( WIDC_BUTTON_REQUEST );
			if( pWndButton == NULL )
			{
				break;
			}

			if( pWndButton->IsWindowEnabled() == FALSE )
			{
				break;
			}

			g_DPlay.SendQueryMailBox();
			m_timeWaitingRequest = g_tmCurrent + SEC( REQUEST_BUTTON_WAITING_TIME );
			pWndButton->EnableWindow( FALSE );

			break;
		}
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult );
}
예제 #4
0
//-----------------------------------------------------------------------------
void CWndMailRequestingBox::OnInitialUpdate( void )
{
	CWndNeuz::OnInitialUpdate();

	DelWndStyle( WBS_MOVE );

	CWndButton* pWndButton = ( CWndButton* )GetDlgItem( WIDC_BUTTON_REQUEST );
	if( pWndButton )
	{
		pWndButton->EnableWindow( FALSE );
	}

	MoveParentCenter();
}
예제 #5
0
void CWndAwakening::OnLButtonDblClk( UINT nFlags, CPoint point )
{
	if(!m_pItemElem) return;
	CRect rect;
	LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_STATIC1 );
	rect = wndCtrl->rect;
	if( rect.PtInRect( point ) )
	{
		m_pItemElem->SetExtra(0);
		CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_BUTTON1);
		pButton->EnableWindow(FALSE);
		m_pItemElem = NULL;
		m_pEItemProp = NULL;
		m_pTexture	= NULL;
	}
}
예제 #6
0
//-----------------------------------------------------------------------------
BOOL CWndMailRequestingBox::Process( void )
{
	if( m_timeWaitingRequest < g_tmCurrent )
	{
		if( m_nDestroyCounter >= DESTRUCTION_TIME )
		{
			Destroy();
		}

		CWndButton* pWndButton = ( CWndButton* )GetDlgItem( WIDC_BUTTON_REQUEST );
		if( pWndButton )
		{
			pWndButton->EnableWindow( TRUE );
		}
		m_timeWaitingRequest = 0xffffffff;
	}

	return TRUE;
}
예제 #7
0
BOOL CWndLvReqDown::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	if( nID == WIDC_BUTTON1 )
	{
		//서버로 시작을 알린다.
		if(m_pItemElem != NULL)
		{
			CWndButton* pButton;
			pButton = (CWndButton*)GetDlgItem( WIDC_BUTTON1 );
			pButton->EnableWindow(FALSE);

			// 서버에 처리 요청하는 함수 호출해야함
			if(m_pItemElem)
			{
				g_DPlay.SendRemoveItemLevelDown(m_pItemElem->m_dwObjId);
				Destroy();
			}
		}
	}
	/*
	if(message == WIN_ITEMDROP)
	{
		CItemElem* pTempElem;
		LPSHORTCUT pShortCut = (LPSHORTCUT)pLResult;
		pTempElem  = (CItemElem*)g_pPlayer->GetItemId( pShortCut->m_dwId );

		// 하락 상태가 된 아이템만 올릴 수 있다. 
		if(m_pItemElem == NULL && pTempElem != NULL)
		{
			if(pTempElem->GetLevelDown() < 0)
			{
				m_pItemElem = (CItemElem*)g_pPlayer->GetItemId( pShortCut->m_dwId );
				m_pEItemProp = m_pItemElem->GetProp();
				m_pItemElem->SetExtra(m_pItemElem->GetExtra()+1);
				CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_START);
				pButton->EnableWindow(TRUE);
			}
		}
	}
	*/
	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
예제 #8
0
void CWndBlessingCancel::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요
	CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_START);

	if(::GetLanguage() == LANG_FRE)
		pButton->SetTexture(g_Neuz.m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), _T( "ButOk2.bmp" ) ), TRUE);

	pButton->EnableWindow(FALSE);
	m_pText = (CWndText*)GetDlgItem( WIDC_DESC );

	SetDescription();

	// 윈도를 중앙으로 옮기는 부분.
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
} 
예제 #9
0
void CWndLvReqDown::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요
	CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_BUTTON1);

	if(::GetLanguage() == LANG_FRE)
		pButton->SetTexture(g_Neuz.m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), _T( "ButtNormal00.tga" ) ), TRUE);

	pButton->EnableWindow(FALSE);
	m_pText = (CWndText*)GetDlgItem( WIDC_TEXT1 );

	SetDescription();
	/*
	// 윈도를 중앙으로 옮기는 부분.
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );*/
	MoveParentCenter();
} 
예제 #10
0
BOOL CWndAwakening::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )
{
	CItemElem* pTempElem;
	pTempElem  = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId );

	int nRandomOptionKind	= g_xRandomOptionProperty->GetRandomOptionKind( pTempElem );
	if( nRandomOptionKind  != CRandomOptionProperty::eAwakening )
	{
		// 적절한 대상이 아닙니다.
		//g_WndMng.PutString( prj.GetText( TID_GAME_INVALID_TARGET_ITEM ), NULL, prj.GetTextColor( TID_GAME_INVALID_TARGET_ITEM  ) );
		g_WndMng.OpenMessageBox( prj.GetText( TID_GAME_INVALID_TARGET_ITEM ) );
		return FALSE;
	}
	if( g_xRandomOptionProperty->GetRandomOptionSize( pTempElem->GetRandomOptItemId() ) > 0 )
	{
		// 이미 각성된 아이템입니다.
		//g_WndMng.PutString( prj.GetText( TID_GAME_AWAKE_OR_BLESSEDNESS01 ), NULL, prj.GetTextColor( TID_GAME_AWAKE_OR_BLESSEDNESS01  ) );
		g_WndMng.OpenMessageBox( prj.GetText( TID_GAME_AWAKE_OR_BLESSEDNESS01 ) );
		return FALSE;
	}
	
	if(pTempElem != NULL)
	{
		if(m_pItemElem) m_pItemElem->SetExtra(0);
		m_pItemElem = pTempElem;
		m_pEItemProp = m_pItemElem->GetProp();
		m_pItemElem->SetExtra(m_pItemElem->GetExtra()+1);
		CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_BUTTON1);
		pButton->EnableWindow(TRUE);
		
		LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_STATIC1 );
		if(m_pEItemProp != NULL)
		{
			m_pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, m_pEItemProp->szIcon), 0xffff00ff );
		}
	}

	return TRUE;

}
예제 #11
0
BOOL CWndAwakening::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 

	if( nID == WIDC_BUTTON1 )
	{
		//서버로 시작을 알린다.
		if(m_pItemElem != NULL)
		{
			CWndButton* pButton;
			pButton = (CWndButton*)GetDlgItem( WIDC_BUTTON1 );
			pButton->EnableWindow(FALSE);

			// 서버에 처리 요청하는 함수 호출해야함
			if(m_pItemElem)
			{
				g_DPlay.SendAwakening(m_pItemElem->m_dwObjId);
				Destroy();
			}
		}
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
예제 #12
0
BOOL CWndBlessingCancel::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 

	if( nID == WIDC_START )
	{
		//서버로 시작을 알린다.
		if(m_pItemElem != NULL)
		{
			CWndButton* pButton;
			pButton = (CWndButton*)GetDlgItem( WIDC_START );
			pButton->EnableWindow(FALSE);

			// 서버에 처리 요청하는 함수 호출해야함
			if(m_pItemElem)
			{
				g_DPlay.SendBlessednessCancel(m_pItemElem->m_dwObjId);
				Destroy();
				g_WndMng.PutString( prj.GetText(TID_GAME_BLESSEDNESS_CANCEL_INFO), NULL, 0xff0000ff );
			}
		}
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
예제 #13
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
}