void CWndPiercing::OnInitialUpdate() { CWndNeuz::OnInitialUpdate(); 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 ); LPWNDCTRL pCustom = NULL; pCustom = GetWndCtrl( WIDC_STATIC5 ); m_Rect[0] = pCustom->rect; pCustom = GetWndCtrl( WIDC_STATIC6 ); m_Rect[1] = pCustom->rect; pCustom = GetWndCtrl( WIDC_STATIC7 ); m_Rect[2] = pCustom->rect; CWndStatic* pGoldNum = (CWndStatic*) GetDlgItem( WIDC_STATIC9 ); pGoldNum->AddWndStyle( WSS_MONEY ); if( g_pPlayer ) m_pSfx = CreateSfx( g_Neuz.m_pd3dDevice, XI_INT_INCHANT, g_pPlayer->GetPos(), g_pPlayer->GetId(), g_pPlayer->GetPos(), g_pPlayer->GetId(), -1 ); }
void CWndRepairItem::OnInitialUpdate() { CWndNeuz::OnInitialUpdate(); // 여기에 코딩하세요 memset( m_adwIdRepair, 0xff, sizeof(m_adwIdRepair) ); m_dwCost = 0; // CWndTabCtrl* pTabCtrl = (CWndTabCtrl*) GetDlgItem( WIDC_INVENTORY ); CWndEdit* pWndEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT1 ); pWndEdit->EnableWindow( FALSE ); pWndStaticCost = (CWndStatic*) GetDlgItem( WIDC_STATIC3 ); m_wndItemCtrl.Create( WLVS_ICON | WBS_NODRAWFRAME, CRect( 6, 24, 174, 192 ), this, 11 ); m_wndItemCtrl.InitItem( m_adwIdRepair ); // pRepairItem.SetItemContainer( ITYPE_ITEM, MAX_REPAIR ); // m_wndItemCtrl.InitItem( &pRepairItem, APP_REPAIR ); // WTCITEM tabTabItem; // tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM; // tabTabItem.pszText = "아이템"; // tabTabItem.pWndBase = &m_wndItemCtrl; // pTabCtrl->InsertItem( 0, &tabTabItem ); CWndInventory* pWndInventory = (CWndInventory*)g_WndMng.CreateApplet( APP_INVENTORY ); CRect rectInventory = pWndInventory->GetWindowRect( TRUE ); CPoint ptInventory = rectInventory.TopLeft(); CPoint ptMove; if( ptInventory.x > m_pWndRoot->GetWndRect().Width() / 2 ) ptMove = ptInventory - CPoint( rectInventory.Width(), 0 ); else ptMove = ptInventory + CPoint( rectInventory.Width(), 0 ); Move( ptMove ); /* CRect rectRoot = m_pWndRoot->GetLayoutRect(); CRect rectWindow = GetWindowRect(); CPoint point( rectRoot.right - rectWindow.Width(), 110 ); Move( point ); MoveParentCenter(); */ }
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 }
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 ); }
void CWndBank::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_pWndGuildBank || g_WndMng.GetWndVendorBase() ) { Destroy(); return; } CWndTabCtrl* pTabCtrl = (CWndTabCtrl*) GetDlgItem( WIDC_BANK_0 ); m_wndItemCtrl[0].Create( WLVS_ICON, CRect( 0, 0, 250, 250 ), pTabCtrl, 11 ); m_wndItemCtrl[0].InitItem( &g_pPlayer->m_Bank[0], APP_COMMON_BANK ); CWndTabCtrl* pTabCtrl1 = (CWndTabCtrl*) GetDlgItem( WIDC_BANK_1 ); m_wndItemCtrl[1].Create( WLVS_ICON, CRect( 0, 0, 250, 250 ), pTabCtrl1, 11 ); m_wndItemCtrl[1].InitItem( &g_pPlayer->m_Bank[1], APP_COMMON_BANK ); CWndTabCtrl* pTabCtrl2 = (CWndTabCtrl*) GetDlgItem( WIDC_BANK_3 ); m_wndItemCtrl[2].Create( WLVS_ICON, CRect( 0, 0, 250, 250 ), pTabCtrl2, 11 ); m_wndItemCtrl[2].InitItem( &g_pPlayer->m_Bank[2], APP_COMMON_BANK ); WTCITEM tabTabItem; tabTabItem.mask = WTCIF_TEXT | WTCIF_PARAM; tabTabItem.pszText = prj.GetText(TID_GAME_ITEM);//"아이템"; tabTabItem.pWndBase = &m_wndItemCtrl[0]; pTabCtrl->InsertItem( 0, &tabTabItem ); tabTabItem.pWndBase = &m_wndItemCtrl[1]; pTabCtrl1->InsertItem( 0, &tabTabItem ); tabTabItem.pWndBase = &m_wndItemCtrl[2]; pTabCtrl2->InsertItem( 0, &tabTabItem ); LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_BANKGO_0 ); m_wndGold[0].Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_BANKGO_0 ); m_wndGold[0].AddWndStyle( WBS_NODRAWFRAME ); lpWndCtrl = GetWndCtrl( WIDC_BANKGO_1 ); m_wndGold[1].Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_BANKGO_1 ); m_wndGold[1].AddWndStyle( WBS_NODRAWFRAME ); lpWndCtrl = GetWndCtrl( WIDC_BANKGO_2 ); m_wndGold[2].Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_BANKGO_2 ); m_wndGold[2].AddWndStyle( WBS_NODRAWFRAME ); pCost[0] = (CWndStatic*) GetDlgItem( WIDC_BANKGOLD_0 ); pCost[1] = (CWndStatic*) GetDlgItem( WIDC_BANKGOLD_1 ); pCost[2] = (CWndStatic*) GetDlgItem( WIDC_BANKGOLD_2 ); ReSetBank(); RectItemCtrl[0] = pTabCtrl->m_rectClient + CRect( -3, 2, -18, -20 ); RectItemCtrl[1] = pTabCtrl1->m_rectClient + CRect( -3, 2, -19, -20 ); RectItemCtrl[2] = pTabCtrl2->m_rectClient + CRect( -3, 2, -20, -20 ); CWndInventory* pWndInventory = (CWndInventory*)GetWndBase( APP_INVENTORY ); CRect rectInventory = pWndInventory->GetWindowRect( TRUE ); CPoint ptInventory = rectInventory.TopLeft(); CPoint ptMove; if( ptInventory.x > m_pWndRoot->GetWndRect().Width() / 2 ) ptMove = ptInventory - CPoint( (int)( rectInventory.Width() * 2.525 ), 0 ); else ptMove = ptInventory + CPoint( rectInventory.Width(), 0 ); Move( ptMove ); m_pTexture = m_textureMng.AddTexture( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, "WndCommonBankNotUse.tga" ), 0xffff00ff ); }