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


C++ CItemWeapon::getUnlockId方法代码示例

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


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

示例1: CheckLatentsWeaponBreak

void CLatentEffectContainer::CheckLatentsWeaponBreak(uint8 slot)
{
	for (uint16 i = 0; i < m_LatentEffectList.size(); ++i) 
	{
		if( m_LatentEffectList.at(i)->GetConditionsID() == LATENT_WEAPON_BROKEN && m_LatentEffectList.at(i)->GetConditionsValue() == slot)
		{
			CItemWeapon* PWeaponMain = (m_POwner->equip[slot] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[slot])) : NULL;
			if( PWeaponMain && m_POwner->unlockedWeapons[PWeaponMain->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == slot )
			{
				m_LatentEffectList.at(i)->Activate();
			}
		}
	}
}
开发者ID:Apocalypse612,项目名称:darkstar,代码行数:14,代码来源:latent_effect_container.cpp

示例2: CheckLatentsWeaponBreak

void CLatentEffectContainer::CheckLatentsWeaponBreak(uint8 slot)
{
	for (uint16 i = 0; i < m_LatentEffectList.size(); ++i) 
	{
		if( m_LatentEffectList.at(i)->GetConditionsID() == LATENT_WEAPON_BROKEN && m_LatentEffectList.at(i)->GetConditionsValue() == slot)
		{
			CItemWeapon* PWeaponMain = (CItemWeapon*)m_POwner->getEquip((SLOTTYPE)slot);
			if( PWeaponMain && m_POwner->unlockedWeapons[PWeaponMain->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == slot )
			{
				m_LatentEffectList.at(i)->Activate();
			}
		}
	}
}
开发者ID:DeusDisciple,项目名称:darkstar,代码行数:14,代码来源:latent_effect_container.cpp

示例3: CheckLatentsEquip


//.........这里部分代码省略.........
					if (m_POwner->health.tp < m_LatentEffectList.at(i)->GetConditionsValue())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_TP_OVER:
					if (m_POwner->health.tp > m_LatentEffectList.at(i)->GetConditionsValue())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_PET_ID:
						CheckLatentsPetType((PETTYPE)m_LatentEffectList.at(i)->GetConditionsValue());
					break;
				case LATENT_SUBJOB:
					if( m_POwner->GetSJob() == m_LatentEffectList.at(i)->GetConditionsValue())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					break;
				case LATENT_WEAPON_BROKEN:
				{
					CItemWeapon* PWeaponMain = (m_POwner->equip[SLOT_MAIN] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[SLOT_MAIN])) : NULL;
					CItemWeapon* PWeaponSub = (m_POwner->equip[SLOT_SUB] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[SLOT_SUB])) : NULL;
					CItemWeapon* PWeaponRanged = (m_POwner->equip[SLOT_RANGED] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[SLOT_RANGED])) : NULL;
					if( PWeaponMain && m_POwner->unlockedWeapons[PWeaponMain->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == SLOT_MAIN )
					{
						m_LatentEffectList.at(i)->Activate();
					}
					if( PWeaponSub && m_POwner->unlockedWeapons[PWeaponSub->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == SLOT_SUB)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					if( PWeaponRanged && m_POwner->unlockedWeapons[PWeaponRanged->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == SLOT_RANGED)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					break;
				}
				case LATENT_ZONE:
					if( m_LatentEffectList.at(i)->GetConditionsValue() == m_POwner->getZone())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_IN_DYNAMIS:
					if (m_POwner->isInDynamis())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
开发者ID:Apocalypse612,项目名称:darkstar,代码行数:67,代码来源:latent_effect_container.cpp

示例4: CheckLatentsEquip

void CLatentEffectContainer::CheckLatentsEquip(uint8 slot)
{
	for (uint16 i = 0; i < m_LatentEffectList.size(); ++i) 
	{
		if (m_LatentEffectList.at(i)->GetSlot() == slot)
		{
			switch(m_LatentEffectList.at(i)->GetConditionsID())
			{
				case LATENT_HP_UNDER_PERCENT:
					if (((float)m_POwner->health.hp / m_POwner->health.maxhp )*100 <= m_LatentEffectList.at(i)->GetConditionsValue())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_HP_OVER_PERCENT:
					if (((float)m_POwner->health.hp / m_POwner->health.maxhp )*100 >= m_LatentEffectList.at(i)->GetConditionsValue())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_HP_UNDER_TP_UNDER_100:
					if (((float)m_POwner->health.hp / m_POwner->health.maxhp )*100 <= m_LatentEffectList.at(i)->GetConditionsValue() && m_POwner->health.tp < 100)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_HP_OVER_TP_UNDER_100:
					if (((float)m_POwner->health.hp / m_POwner->health.maxhp )*100 >= m_LatentEffectList.at(i)->GetConditionsValue() && m_POwner->health.tp < 100)
					{
						m_POwner->addHP(4);
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_TP_UNDER_100:
					if (m_POwner->health.tp < 100)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_TP_OVER_100:
					if (m_POwner->health.tp >= 100)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
					{
						m_LatentEffectList.at(i)->Deactivate();
					}
					break;
				case LATENT_SUBJOB:
					if( m_POwner->GetSJob() == m_LatentEffectList.at(i)->GetConditionsValue())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					break;
				case LATENT_WEAPON_BROKEN:
				{
					CItemWeapon* PWeaponMain = (m_POwner->equip[SLOT_MAIN] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[SLOT_MAIN])) : NULL;
					CItemWeapon* PWeaponSub = (m_POwner->equip[SLOT_SUB] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[SLOT_SUB])) : NULL;
					CItemWeapon* PWeaponRanged = (m_POwner->equip[SLOT_RANGED] != 0) ? (CItemWeapon*)(m_POwner->getStorage(LOC_INVENTORY)->GetItem(m_POwner->equip[SLOT_RANGED])) : NULL;
					if( PWeaponMain && m_POwner->unlockedWeapons[PWeaponMain->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == SLOT_MAIN )
					{
						m_LatentEffectList.at(i)->Activate();
					}
					if( PWeaponSub && m_POwner->unlockedWeapons[PWeaponSub->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == SLOT_SUB)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					if( PWeaponRanged && m_POwner->unlockedWeapons[PWeaponRanged->getUnlockId()-1].unlocked && m_LatentEffectList.at(i)->GetSlot() == SLOT_RANGED)
					{
						m_LatentEffectList.at(i)->Activate();
					}
					break;
				}
				case LATENT_ZONE:
					if( m_LatentEffectList.at(i)->GetConditionsValue() == m_POwner->getZone())
					{
						m_LatentEffectList.at(i)->Activate();
					}
					else
//.........这里部分代码省略.........
开发者ID:salamader,项目名称:ffxi-a,代码行数:101,代码来源:latent_effect_container.cpp


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