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


C++ CItem::GetItemInfo方法代码示例

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


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

示例1: CanEquip

BOOL cQuickSlotDlg::CanEquip(cIcon* pIcon)
{
	if(pIcon->GetType() == WT_QUICKITEM)
	{
		return TRUE;
	}
	else if(pIcon->GetType() == WT_ITEM)
	{
		CItem * pItem = (CItem *)pIcon;

		if( pItem->GetItemInfo()->Category == eItemCategory_Equip )
		{
			return TRUE;
		}

		if( pItem->GetItemInfo()->Category == eItemCategory_Expend )
		{
			return TRUE;
		}

		return FALSE;
	}
	else if( pIcon->GetType() == WT_SKILL )
	{
		cSkillBase * pSkill = (cSkillBase *)pIcon;
		cSkillInfo* pSkillInfo = SKILLMGR->GetSkillInfo(
			pSkill->GetSkillIdx());

		if( pSkillInfo->GetKind() == SKILLKIND_PASSIVE || pSkillInfo->GetKind() == SKILLKIND_BUFF )
		{
			return FALSE;
		}

		return TRUE;
	}
	// 070216 LYW --- QuickManager : Add conduct part to CanEquip function.
	else if( pIcon->GetType() == WT_CONDUCT )
	{
		return TRUE ;
	}

	CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(352) );
	return FALSE;
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:44,代码来源:QuickSlotDlg.cpp

示例2: FakeMoveIcon

BOOL CPetResurrectionDialog::FakeMoveIcon( LONG x, LONG y, cIcon* icon )
{
	if( WT_ITEM != icon->GetType() ||
		icon->IsLocked()			||
		m_bDisable )
	{
		return FALSE;
	}

	CItem* pItem = (CItem *)icon;

	if( pItem->GetItemInfo()->SupplyType != ITEM_KIND_PET )
	{
		return FALSE;
	}

	PET_OBJECT_INFO* pPetObjectInfo = PETMGR->GetPetObjectInfo( pItem->GetDBIdx() );

	if( !pPetObjectInfo )
	{
		return FALSE;
	}

	if( pPetObjectInfo->State != ePetState_Die )
	{
		return FALSE;
	}

	CItem* old = ( CItem* )( mSourceItem->GetLinkItem() );
	if( old )
		old->SetLock( FALSE );

	mSourceItem->SetData( pItem->GetItemIdx() );
	mSourceItem->SetLinkItem( pItem );

	ITEMMGR->AddToolTip( mSourceItem );

	mIconDialog->AddIcon( 0, mSourceItem );

	pItem->SetLock( TRUE );

	return FALSE;
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:43,代码来源:PetResurrectionDialog.cpp

示例3: NetworkMsgParse


//.........这里部分代码省略.........
				pProgressDlg->Cancel();
			}

			QUICKMGR->RefreshQickItem();
		}
		break;
	case MP_PET_ITEM_INFO:
		{
			MSG_PET_ITEM_INFO* pmsg = ( MSG_PET_ITEM_INFO* )pMsg;

			CPet* pPet = ( CPet* )OBJECTMGR->GetObject( pmsg->ID );

			if( pPet )
			{
				pPet->SetWearedItem( pmsg->Item );
				APPEARANCEMGR->InitAppearance( pPet );
			}
		}
		break;

	case MP_PET_ITEM_DISCARD_ACK:
		{
			MSG_BYTE2* pmsg = ( MSG_BYTE2* )pMsg;

			//시간 소모로 삭제 되었다면 TRUE
			if( pmsg->bData2 )
			{
				CPetWearedDialog* pDlg = GAMEIN->GetPetWearedDlg();

				CItem* pItem = (pDlg) ? (CItem*)pDlg->GetIconForIdx( pmsg->bData1 ) : NULL ;

				if( pItem )
				{
					CHATMGR->AddMsg( CTC_CHEAT_1, CHATMGR->GetChatMsg( 1192 ), CHATMGR->GetChatMsg( 1926 ), pItem->GetItemInfo()->ItemName );
				}
			}

			GAMEIN->GetPetWearedDlg()->DeleteAck( pmsg->bData1 );
		}
		break;
	case MP_PET_ITEM_MOVE_PLAYER_ACK:
		{
			MSG_PET_ITEM_MOVE_SYN* pmsg = ( MSG_PET_ITEM_MOVE_SYN* )pMsg;

			CInventoryExDialog* pPlayerInven = GAMEIN->GetInventoryDialog();
			CStorageDialog* pPlayerStorage = GAMEIN->GetStorageDialog();
			CPetWearedDialog* pPetInven = GAMEIN->GetPetWearedDlg();

			CItem* pPlayerItem = NULL;
			const eITEMTABLE TableIdx = ITEMMGR->GetTableIdxForAbsPos( pmsg->PlayerPos );
			
			if( TableIdx == eItemTable_Storage)
			{
				pPlayerStorage->DeleteItem( pmsg->PlayerPos, &pPlayerItem );
			}
			else if( TableIdx == eItemTable_Inventory )
			{
				pPlayerInven->DeleteItem( pmsg->PlayerPos, &pPlayerItem );
			}
			else
				return;


			cIcon* pIcon = NULL;
			CItem* pPetItem = NULL;
			pPetInven->DeleteItem( pmsg->PetPos, &pIcon );
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:67,代码来源:PetManager.cpp


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