当前位置: 首页>>代码示例>>C++>>正文


C++ CItemBase::GetProp方法代码示例

本文整理汇总了C++中CItemBase::GetProp方法的典型用法代码示例。如果您正苦于以下问题:C++ CItemBase::GetProp方法的具体用法?C++ CItemBase::GetProp怎么用?C++ CItemBase::GetProp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CItemBase的用法示例。


在下文中一共展示了CItemBase::GetProp方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetData

void CWndSelectAwakeCase::SetData( BYTE byObjID, DWORD dwSerialNum, __int64 n64NewOption ) 
{ 
	//server로 전송할 데이터를 유지하고, 아이템 Index를 뽑아서 아이콘을 그려줄 준비
	m_byObjID = byObjID;
	m_dwSerialNum = dwSerialNum;
	m_n64NewOption = n64NewOption; 

	if( !g_pPlayer )
	{
		assert( 0 );
		return;
	}

	CItemBase* pItemBase = g_pPlayer->GetItemId( m_byObjID );
	if( pItemBase )
	{
		ItemProp* pProp = pItemBase->GetProp( );
		if(pProp)
			m_dwItemIndex = pProp->dwID;
	}
}
开发者ID:KerwinMa,项目名称:AerothFlyffSource,代码行数:21,代码来源:WndAwakening.cpp

示例2: OnMouseMove

void CWndVendorCtrl::OnMouseMove( UINT nFlags, CPoint point )
{
	if( m_bDrag == FALSE )
		return;
	m_bDrag		= FALSE;
	CPoint pt( 3, 3 );
	CRect rect;

	CItemBase* pItemBase	= m_pFocusItem;
	if( IsUsingItem( pItemBase ) )
	{
		m_GlobalShortcut.m_pFromWnd		= this;
		m_GlobalShortcut.m_dwShortcut	= SHORTCUT_ITEM;
		m_GlobalShortcut.m_dwIndex	= m_nCurSel;
		m_GlobalShortcut.m_dwType	= 0;
		m_GlobalShortcut.m_dwId		= pItemBase->m_dwObjId;
		m_GlobalShortcut.m_pTexture		= pItemBase->GetTexture();
		m_GlobalShortcut.m_dwData	= (DWORD)pItemBase;
		_tcscpy( m_GlobalShortcut.m_szString, pItemBase->GetProp()->szName );
	}
}
开发者ID:careysky,项目名称:FlyFF,代码行数:21,代码来源:WndVendorCtrl.cpp

示例3: OnChildNotify

BOOL CWndRepairItem::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	if( message == WIN_ITEMDROP )
	{
		LPSHORTCUT lpShortcut = (LPSHORTCUT)pLResult;
		CWndBase* pWndFrame = lpShortcut->m_pFromWnd->GetFrameWnd();
		if( nID == 11 ) // item
		{
			if( pWndFrame->GetWndId() == APP_INVENTORY )
			{
				CItemBase* pItemBase	= g_pPlayer->GetItemId( lpShortcut->m_dwId );
				if( pItemBase )
				{
					if( g_pPlayer->m_Inventory.IsEquip( pItemBase->m_dwObjId ) == FALSE )
					{
						// 아이템인가?
						// 방어구 혹은 무기인가?
						// 수리할 필요가 있는가?
						ItemProp* pItemProp	= pItemBase->GetProp();
						if( pItemProp )
						{
							if( pItemProp->dwItemKind2 >= IK2_WEAPON_HAND && pItemProp->dwItemKind2 <= IK2_ARMORETC && ((CItemElem*)pItemBase)->m_nRepair < pItemProp->nMaxRepair )
							{
								CItemElem* pItemElem	= (CItemElem*)pItemBase;
								if( pItemElem->m_nHitPoint < 0 )
									pItemElem->m_nHitPoint = 0;

								if( pItemElem->m_nHitPoint < (int)( pItemProp->dwEndurance ) )
								{
									int nRepair	= 100 - ( ( pItemElem->m_nHitPoint * 100 ) / pItemProp->dwEndurance );
									DWORD dwSumCost = m_dwCost + nRepair * ( pItemProp->dwCost / 1000 + 1 );
									if( g_pPlayer->GetTotalGold() >= (int)( dwSumCost ) )
									{
										m_dwCost = dwSumCost;
										char szCost[MAX_PATH] = {0,};
										sprintf( szCost, "%-d", m_dwCost );
										pWndStaticCost->SetTitle( szCost );
										int iIndex	= lpShortcut->m_dwData - 100;
										m_adwIdRepair[iIndex]	= pItemElem->m_dwObjId;
										pItemElem->m_bRepair	= TRUE;
									}
									else
									{
										// 페냐가 부족하여 수리를 할수 없습니다.
										g_WndMng.PutString( prj.GetText(TID_GAME_REPAIR_NOTENOUGHPENYA), NULL, prj.GetTextColor( TID_GAME_REPAIR_NOTENOUGHPENYA ) );
									}									
								}
								else
								{
									// 수리할 필요가 없는 아이템
									g_WndMng.PutString( prj.GetText(TID_GAME_REPAIR_FULLENDURANCE), NULL, prj.GetTextColor( TID_GAME_REPAIR_FULLENDURANCE ) );
								}
							}
							else
							{
								// 수리할수 없는 아이템
								g_WndMng.PutString( prj.GetText(TID_GAME_REPAIR_DONOT), NULL, prj.GetTextColor( TID_GAME_REPAIR_DONOT ) );
							}
						}
					}
					else
					{
						// 장착되어 있음.
						g_WndMng.PutString( prj.GetText(TID_GAME_REPAIR_EQUIP), NULL, prj.GetTextColor( TID_GAME_REPAIR_EQUIP ) );
					}
				}
//				if( itemElem )
//				{
//					pRepairItem.Add( itemElem->m_dwItemId, itemElem->m_nItemNum, itemElem->m_nAbilityOption, itemElem->m_dwSerialNumber );
//				}

				/*
				CWndItemCtrl* pWndItemCtrl = (CWndItemCtrl*)lpShortcut->m_pFromWnd;
				UINT SelectCount = pWndItemCtrl->GetSelectedCount();
				if( SelectCount != 1)
				{
					//g_WndMng.PutString( "장착 되어 있는것은 넣을수 없습니다", NULL, 0xffffff00 );
					g_WndMng.PutString( prj.GetText(TID_GAME_EQUIPPUT), NULL, prj.GetTextColor( TID_GAME_EQUIPPUT ) );
					
				}
				else
				{
					for( int i = 0; i < SelectCount; i++ )
					{
						int nItem = pWndItemCtrl->GetSelectedItem( i );
						pWndItemCtrl->GetItem( nItem );
					}
					CItemElem* itemElem = (CItemElem*)lpShortcut->m_dwData;
					if( itemElem )
					{
						pRepairItem.Add( itemElem->m_dwItemId, itemElem->m_nItemNum, itemElem->m_nAbilityOption, itemElem->m_dwSerialNumber );
					}
				}
				int aaa = 0;				
				*/
			}
		}
	}
	else
	if( message == WNM_CLICKED )
//.........这里部分代码省略.........
开发者ID:careysky,项目名称:FlyFF,代码行数:101,代码来源:WndRepairItem.cpp

示例4: OnChildNotify

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
//.........这里部分代码省略.........
开发者ID:careysky,项目名称:FlyFF,代码行数:101,代码来源:WndVendor.cpp


注:本文中的CItemBase::GetProp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。