本文整理汇总了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();
}
}
}
}
示例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();
}
}
}
}
示例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();
}
示例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
//.........这里部分代码省略.........