本文整理汇总了C++中CGuild::IsMaster方法的典型用法代码示例。如果您正苦于以下问题:C++ CGuild::IsMaster方法的具体用法?C++ CGuild::IsMaster怎么用?C++ CGuild::IsMaster使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGuild
的用法示例。
在下文中一共展示了CGuild::IsMaster方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// 길드마스터 인가?
BOOL CGuildCombat1to1Mng::IsGuildMaster( CUser* pUser )
{
CGuild* pGuild = pUser->GetGuild();
if( pGuild && pGuild->IsMaster( pUser->m_idPlayer ) )
return TRUE;
return FALSE;
}
示例2: OnInitialUpdate
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
}
示例3: OnChildNotify
BOOL CWndGuildVote::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
CGuild* pGuild = g_pPlayer->GetGuild();
if( pGuild == NULL )
return FALSE;
switch( nID )
{
case WIDC_COMBOBOX1:
{
if( message == WNM_SELCHANGE )
{
CWndComboBox* pCombo = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX1);
SelChange( pGuild, pCombo->GetCurSel());
}
break;
}
// 길드 투표 설정
case WIDC_VOTE_SETTING:
{
if( pGuild->IsMaster( g_pPlayer->m_idPlayer ) == FALSE )
{
g_WndMng.OpenMessageBox( "길드마스터만 설정할수 있습니다.", MB_OK, this );
break;
}
SAFE_DELETE( m_pWndGuildVoteSeting );
m_pWndGuildVoteSeting = new CWndGuildVoteSeting;
CWndComboBox* pCombo = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX1);
m_pWndGuildVoteSeting->m_nSelect = pCombo->GetCurSel();
m_pWndGuildVoteSeting->Initialize( this );
break;
}
// 길드 투표
case WIDC_VOTE:
{
// 현재 투표할 메뉴가 완료된것이냐?
CWndComboBox* pCombo = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX1);
if( pCombo->GetCurSel() == -1 )
{
g_WndMng.OpenMessageBox( "종류를 고르세요.", MB_OK, this );
return FALSE;
}
if( pGuild->m_votes.size() )
{
list <CGuildVote*>::iterator it = pGuild->m_votes.begin();
for ( ; it != pGuild->m_votes.end() ; ++it )
{
if( (*it)->GetID() == pCombo->GetItemData(pCombo->GetCurSel()) )
{
if( (*it)->IsCompleted() )
{
g_WndMng.OpenMessageBox( "투표가 완료된 사항입니다.", MB_OK, this );
return FALSE;
}
}
}
}
int nSelect = -1;
CWndButton* pWndButton[4];
pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
pWndButton[ 3 ] = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
if( pWndButton[ 0 ]->GetCheck() )
nSelect = 0;
else
if( pWndButton[ 1 ]->GetCheck() )
nSelect = 1;
else
if( pWndButton[ 2 ]->GetCheck() )
nSelect = 2;
else
if( pWndButton[ 3 ]->GetCheck() )
nSelect = 3;
CWndEdit* pEdit;
switch(nSelect)
{
case 0:
{
pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT4 );
if( strlen( pEdit->GetString() ) <= 0 )
return FALSE;
}
break;
case 1:
{
pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT2 );
//.........这里部分代码省略.........