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


C++ CItemData::GetSubType方法代码示例

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


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

示例1:

DWORD	CPythonItem::__GetUseSoundType(const CItemData& c_rkItemData)
{
	switch (c_rkItemData.GetType())
	{
		case CItemData::ITEM_TYPE_WEAPON:
			switch (c_rkItemData.GetWeaponType())
			{
				case CItemData::WEAPON_BOW:
					return USESOUND_BOW;
					break;
				case CItemData::WEAPON_ARROW:
					return USESOUND_DEFAULT;
					break;
				default:
					return USESOUND_WEAPON;
					break;
			}
			break;
		case CItemData::ITEM_TYPE_ARMOR:
			switch (c_rkItemData.GetSubType())
			{
				case CItemData::ARMOR_NECK:
				case CItemData::ARMOR_EAR:
					return USESOUND_ACCESSORY;
					break;
				case CItemData::ARMOR_BODY:
					return USESOUND_ARMOR;
				default:
					return USESOUND_DEFAULT;		
					break;
			}
			break;
		case CItemData::ITEM_TYPE_USE:
			switch (c_rkItemData.GetSubType())
			{
				case CItemData::USE_ABILITY_UP:
					return USESOUND_POTION;
					break;
				case CItemData::USE_POTION:
					return USESOUND_NONE;
					break;
				case CItemData::USE_TALISMAN:
					return USESOUND_PORTAL;
					break;
				default:
					return USESOUND_DEFAULT;		
					break;
			}
			break;			
		default:
			return USESOUND_DEFAULT;
			break;
	}

	return USESOUND_DEFAULT;
}
开发者ID:adi97ida,项目名称:Client,代码行数:56,代码来源:PythonItem.cpp

示例2: __HasEnoughArrow

bool CPythonPlayer::__HasEnoughArrow()
{
	CItemData * pItemData;
	if (CItemManager::Instance().GetItemDataPointer(GetItemIndex(TItemPos(INVENTORY, c_Equipment_Arrow)), &pItemData))
	if (CItemData::ITEM_TYPE_WEAPON == pItemData->GetType())
	if (CItemData::WEAPON_ARROW == pItemData->GetSubType())
	{
		return true;
	}

	PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotShotError", Py_BuildValue("(is)", GetMainCharacterIndex(), "EMPTY_ARROW"));
	return false;
}
开发者ID:adi97ida,项目名称:Client,代码行数:13,代码来源:PythonPlayerSkill.cpp

示例3: SetCompoundItem

//------------------------------------------------------------------------------
// CUICompound::SetCompoundItem 
// Explain:  !!erro processing
// Date : 2005-01-12,Author: Lee Ki-hwan
//------------------------------------------------------------------------------
void CUICompound::SetCompoundItem ( int nSlotIndex )
{
	CUIManager* pUIManager = CUIManager::getSingleton();

	if (pUIManager->GetDragIcon() == NULL)
		return;

	// If this is wearing item
	if (pUIManager->GetDragIcon()->IsWearTab() == true)
	{
		pUIManager->GetChattingUI()->AddSysMessage( _S( 728, "착용한 아이템은 합성할 수 없습니다." ), SYSMSG_ERROR );	
		pUIManager->ResetHoldBtn();
		return;
	}

	CItems* pItems = pUIManager->GetDragIcon()->getItems();

	if (pItems == NULL)
		return;

	CItemData*	pItemData = pItems->ItemData;
	
	ResetCompoundItem();	// 버튼이 들려 있으면 삭제 하고
	
	// 아이템이 현재 사용중인지 확인 한다.
	for ( int i = 0; i < COMPOUND_ITEM_SLOT_COUNT; i++ )
	{
		if (m_pIconSlot[i]->IsEmpty() == false)
		{
			if (pItems->Item_UniIndex == m_pIconSlot[i]->getItems()->Item_UniIndex)
			{
				pUIManager->GetChattingUI()->AddSysMessage( _S( 556, "이미 사용중인 아이템 입니다." ), SYSMSG_ERROR );	
				pUIManager->ResetHoldBtn();
				return;
			}
		}
	}

	// Insert upgrade slot
	//if ( m_nCurItemCount < COMPOUND_ITEM_SLOT_COUNT )
//	{	
		// 비어 있는 슬롯을 찾는다.
	/*	if ( nSlotIndex == -1 )
		{
			for ( int i = 0; i < COMPOUND_ITEM_SLOT_COUNT; i++ )
			{
				if ( m_btnItemSlot[i].IsEmpty() )
				{
					nSlotIndex = i;
					break;
				}
			}
		}
	*/		
		// 해당 아이템의 위치를 찾아 준다.
		if( pItemData->GetType() == CItemData::ITEM_ETC && 
			pItemData->GetSubType() == CItemData::ITEM_ETC_REFINE &&
			pItemData->GetRefineType() == CItemData::REFINE_GENERAL )  // 일반제련석
		{
			nSlotIndex = ITEM_ARCANE_MATERIAL_UPGRADE;
		}
		else if( pItemData->GetType() == CItemData::ITEM_ETC && 
				pItemData->GetSubType() == CItemData::ITEM_ETC_SAMPLE ) // 시료
		{
			nSlotIndex = ITEM_ARCANE_MATERIAL_SAMPLE;
		}
		else if( pItemData->GetType() == CItemData::ITEM_ACCESSORY ) // 악세서리
		{
			nSlotIndex = ITEM_ARCANE_MATERIAL_ACCESSORY;
		}
		else
		{
			pUIManager->GetChattingUI()->AddSysMessage( _S( 729, "합성 할 수 있는 아이템이 아닙니다." ), SYSMSG_ERROR ); 
			pUIManager->ResetHoldBtn();
			return;
		}
		
		// 사용중이 아니라면 입력 해 준다.
		if (m_pIconSlot[nSlotIndex]->IsEmpty() == true)
		{
			m_nCurItemCount++;	
		}

		CItems* pClone = new CItems;
		memcpy(pClone, pItems, sizeof(CItems));
		pClone->Item_Sum = 1;

		m_pIconSlot[nSlotIndex]->setData(pClone, false);
//	}
	
	if ( m_nCurItemCount >= COMPOUND_ITEM_SLOT_COUNT )
	{
		m_btnOK.SetEnable ( TRUE );
	}
	else 
//.........这里部分代码省略.........
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:101,代码来源:UICompound.cpp

示例4: SetMixItem

// ----------------------------------------------------------------------------
// Name : !!SetMixItem()
// Desc :
// ----------------------------------------------------------------------------
void CUIGWMix::SetMixItem ( int nSlotIndex )
{
    CUIManager* pUIManager = CUIManager::getSingleton();

    CUIIcon* pDrag = pUIManager->GetDragIcon();

    if (pDrag == NULL)
        return;

    CItems* pItems = pDrag->getItems();

    if (pItems == NULL)
        return;

    CItemData*	pItemData = pItems->ItemData;

    ResetMixItem();	// 버튼이 들려 있으면 삭제 하고

    // 아이템이 현재 사용중인지 확인 한다.
    for( int i = 0; i < GW_MIX_ITEM_SLOT_COUNT; i++ )
    {
        if (m_pIconsSlot[i]->IsEmpty() == false)
        {
            if (pItems->Item_UniIndex == m_pIconsSlot[i]->getItems()->Item_UniIndex)
            {
                pUIManager->GetChattingUI()->AddSysMessage( _S( 556, "이미 사용중인 아이템 입니다." ), SYSMSG_ERROR );
                pUIManager->ResetHoldBtn();
                return;
            }
        }
    }

    // 해당 아이템의 위치를 찾아 준다.
    if( pItemData->GetType() == CItemData::ITEM_ETC &&
            pItemData->GetSubType() == CItemData::IETC_MIX_TYPE1 )		// 잼
    {
        nSlotIndex = ITEM_GWMIX_TYPE1;
    }
    else if( pItemData->GetType() == CItemData::ITEM_ETC &&
             pItemData->GetSubType() == CItemData::IETC_MIX_TYPE2 )	// 더스트
    {
        nSlotIndex = ITEM_GWMIX_TYPE2;
    }
    else if( pItemData->GetType() == CItemData::ITEM_ETC &&
             pItemData->GetSubType() == CItemData::IETC_MIX_TYPE3 )		// 스톤
    {
        nSlotIndex = ITEM_GWMIX_TYPE3;
    }
    else
    {
        pUIManager->GetChattingUI()->AddSysMessage( _S( 1899, "조합가능한 아이템이 아닙니다." ), SYSMSG_ERROR );
        pUIManager->ResetHoldBtn();
        return;
    }

    // 사용중이 아니라면 입력 해 준다.
    if (m_pIconsSlot[nSlotIndex]->IsEmpty())
    {
        m_nCurItemCount++;
    }

    CItems* pCopy = new CItems;
    memcpy(pCopy, pItems, sizeof(CItems));
    pCopy->Item_Sum = 1;
    m_pIconsSlot[nSlotIndex]->setData(pCopy, false);

    if ( m_nCurItemCount >= GW_MIX_ITEM_SLOT_COUNT )
    {
        m_btnOK.SetEnable ( TRUE );
    }
    else
    {
        m_btnOK.SetEnable ( FALSE );
    }

    pUIManager->ResetHoldBtn();

    // Lock arrange of inventory
    pUIManager->GetInventory()->Lock( TRUE, TRUE, LOCK_GW_MIX );
}
开发者ID:rdrago,项目名称:LCSource,代码行数:84,代码来源:UIGWMix.cpp

示例5: MouseMessage


//.........这里部分代码省略.........
					CUIIcon* pDrag = pUIManager->GetDragIcon();								

					// If holding button comes from quick slot
					if (pDrag->GetWhichUI() == UI_QUICKSLOT)
					{
						if( IsInsideRect( nX, nY, m_rcSlot ) )
						{
							for( int iBtn = 0; iBtn < QSLOT_BTN_COUNT; iBtn++ )
							{
								if ((*m_abtnItems)[m_nCurSlot + 1][iBtn]->IsInside( nX, nY ) &&
									(*m_abtnItems)[m_nCurSlot + 1][iBtn]->GetQuickSlotID() != pDrag->GetQuickSlotID())
								{
									int nBtnID = pDrag->GetQuickSlotID();
									
									int	nPageIndex = nBtnID / QSLOT_BTN_COUNT;
									int	nSlotIndex = nBtnID % QSLOT_BTN_COUNT;

									if( !*(m_bLock[m_nCurSlot]) )
										pUIManager->GetQuickSlot()->SwapBtnsInQuickSlot( nPageIndex, nSlotIndex,  m_nCurSlot + 1, iBtn );
									break;
								}
							}
						}
					}
					else if ((pDrag->getBtnType() == UBET_SKILL &&
							 (pDrag->GetWhichUI() == UI_SKILL_NEW || pDrag->GetWhichUI() == UI_CHARACTERINFO)) ||
							(pDrag->getBtnType() == UBET_SKILL &&
							 pDrag->GetWhichUI() == UI_PETINFO) ||
							(pDrag->getBtnType() == UBET_ACTION &&
							 pDrag->GetWhichUI() == UI_CHARACTERINFO) ||
							(pDrag->getBtnType() == UBET_ITEM &&
							 pDrag->GetWhichUI() == UI_INVENTORY) ||
							(pDrag->getBtnType() == UBET_SKILL &&
							 pDrag->GetWhichUI() == UI_WILDPET_INFO) ||
							(pDrag->getBtnType() == UBET_SKILL &&
							 pDrag->GetWhichUI() == UI_GUILD))
					{
						if( IsInsideRect( nX, nY, m_rcSlot ) )
						{
							if (pDrag->getBtnType() == UBET_ITEM)
							{
								CItemData* pItemData = CItemData::getData(pDrag->getIndex());
								
								if( (pItemData->GetType() == CItemData::ITEM_ETC 					//Etc(x)
									// [070604: Su-won] 1차 펫 기능 개선
									// 생산품을 퀵슬롯에 넣을 수 있게...
									&&pItemData->GetSubType() !=CItemData::ITEM_ETC_PRODUCT
									) ||
									(pItemData->GetType() == CItemData::ITEM_ACCESSORY				// Accessory(x)
									// [070604: Su-won] 1차 펫 기능 개선
									// 펫을 퀵슬롯에 넣을 수 있게...
									&& pItemData->GetSubType() !=CItemData::ACCESSORY_PET
									&& pItemData->GetSubType() !=CItemData::ACCESSORY_WILDPET
									&& pItemData->GetSubType() != CItemData::ITEM_ETC_MONSTER_MERCENARY_CARD
									) ||
									( pItemData->GetType() == CItemData::ITEM_BULLET &&				// Bullet - arrow(x)
									pItemData->GetSubType() == CItemData::ITEM_BULLET_ARROW )
									)
									
								{
									// Reset holding button
									pUIManager->ResetHoldBtn();
									
									return WMSG_SUCCESS;
								}
							}
							
							for( int iBtn = 0; iBtn < QSLOT_BTN_COUNT; iBtn++ )
							{
								if( (*m_abtnItems)[m_nCurSlot+1][iBtn]->IsInside( nX, nY ) )
								{
									if( !*(m_bLock[m_nCurSlot]) )
										pUIManager->GetQuickSlot()->AddBtnToQuickSlot( iBtn, m_nCurSlot + 1 );
									
									break;
								}
							}
						}
					}					
					// Reset holding button
					pUIManager->ResetHoldBtn();
					
					return WMSG_SUCCESS;
				}
			}
			
			
		}break;
		
	case WM_LBUTTONDBLCLK:
		{
			m_bIsInside = IsInside( nX, nY );
			if( IsInside( nX, nY ) )
			{
				return WMSG_SUCCESS;
			}
		}break;
	}
	return WMSG_FAIL;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:101,代码来源:UIChildQuickSlot.cpp

示例6: SetMixItem


//.........这里部分代码省略.........
					pUIManager->ResetHoldBtn();
					return;
				}
			}
			break;
		case 1 :
			{
				if (m_pIconsSlot[0]->IsEmpty())
				{
					pUIManager->GetChattingUI()->AddSysMessage( _S( 2654, "유료 아이템 먼저 넣어야 합니다." ), SYSMSG_ERROR );	
					pUIManager->ResetHoldBtn();
					return;
				}

				CItems*		pItems0 = m_pIconsSlot[0]->getItems();
				CItemData*	pItemData0 = pItems0->ItemData;
						
#ifdef G_THAI
				if (GetThaiItemJob(pItemData, pItemData0) == false) 
				{
					pUIManager->GetChattingUI()->AddSysMessage( _S( 2655, "아이템의 클래스가 같지 않습니다." ), SYSMSG_ERROR );	
					pUIManager->ResetHoldBtn();
					return;
				}
#else
				if(pItemData0->GetJob() != pItemData->GetJob()) {
					pUIManager->GetChattingUI()->AddSysMessage( _S( 2655, "아이템의 클래스가 같지 않습니다." ), SYSMSG_ERROR );	
					pUIManager->ResetHoldBtn();
					return;
				}
#endif // G_THAI
				else if(pItemData0->GetType() != pItemData->GetType()) {
					pUIManager->GetChattingUI()->AddSysMessage( _S( 2656, "아이템의 종류가 같지 않습니다." ), SYSMSG_ERROR );	
					pUIManager->ResetHoldBtn();
					return;
				}
				else if(pItemData0->GetSubType() != pItemData->GetSubType()) {
					pUIManager->GetChattingUI()->AddSysMessage( _S( 2657, "다른 종류의 아이템입니다." ), SYSMSG_ERROR );	
					pUIManager->ResetHoldBtn();
					return;
				}
				else if(CItemData::IsUniqueItem(pItemData->GetItemIndex())) {
					pUIManager->GetChattingUI()->AddSysMessage( _S( 1899, "조합 가능한 아이템이 아닙니다." ), SYSMSG_ERROR );	
					pUIManager->ResetHoldBtn();
					return;
				}
								// socket system [6/29/2010 rumist]
#if defined SOCKET_COMPOSITIONBLOCK_ENABLE
				else if( pItems->GetSocketCount() > 0 ){
					pUIManager->GetChattingUI()->AddSysMessage( _S( 1899, "조합 가능한 아이템이 아닙니다." ), SYSMSG_ERROR );
					pUIManager->ResetHoldBtn();
					return;
				}
#endif
			}
			break;
		}

		m_pIconsSlot[nSlotIndex]->copyItem(pDrag);
		
		BOOL chkEmp = FALSE;
		for( i = 0; i < MIXNEW_ITEM_SLOT_COUNT; i++ )
		{
			if ( m_pIconsSlot[i]->IsEmpty())
			{
				chkEmp = TRUE;
			}
		}

		if ( !chkEmp )
		{
			m_btnOK.SetEnable ( TRUE );
		}
		else 
		{
			m_btnOK.SetEnable ( FALSE );
		}
		
		// Lock arrange of inventory
		pUIManager->GetInventory()->Lock( TRUE, TRUE, LOCK_MIXNEW );
	}
	// 분리 아이템 
	else {
		// 체크 사항 
		if(!pItems->IsFlag(FLAG_ITEM_COMPOSITION)|| !pItemData->IsFlag(ITEM_FLAG_COMPOSITE))
		{
			pUIManager->GetChattingUI()->AddSysMessage( _S( 2934,"능력치가 결합된 유료 장비 아이템만 결합 해제가 가능합니다." ), SYSMSG_ERROR );	
			pUIManager->ResetHoldBtn();
			return;
		}

		m_pIconsSlot[0]->copyItem(pDrag);
		m_btnOK.SetEnable ( TRUE );

		// Lock arrange of inventory
		pUIManager->GetInventory()->Lock( TRUE, TRUE, LOCK_MIXNEW );
	}
		
	pUIManager->ResetHoldBtn();
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:101,代码来源:UIMixNew.cpp


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