本文整理汇总了C++中NFIDataList::GetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ NFIDataList::GetCount方法的具体用法?C++ NFIDataList::GetCount怎么用?C++ NFIDataList::GetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NFIDataList
的用法示例。
在下文中一共展示了NFIDataList::GetCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConsumeProcess
int NFCBriefSkillConsumeProcessModule::ConsumeProcess( const NFIDENTID& self, const std::string& strSkillName, const NFIDataList& other, NFIDataList& damageListValue, NFIDataList& damageResultList )
{
NF_SHARE_PTR<NFIPropertyManager> pPropertyManager = m_pElementInfoModule->GetPropertyManager( strSkillName );
if ( pPropertyManager == NULL )
{
return 1;
}
// NFIProperty* pSkillDamageProperty = pPropertyManager->GetElement( "DamageProperty" );
// NFIProperty* pSkillDamageValue = pPropertyManager->GetElement( "DamageValue" );
// NFIProperty* pSkillDamageType = pPropertyManager->GetElement( "DamageType" );
// NFIProperty* pSkillDamageSubType = pPropertyManager->GetElement( "DamageSubType" );
// if ( pSkillDamageProperty == NULL || pSkillDamageValue == NULL || pSkillDamageType == NULL || pSkillDamageSubType == NULL )
// {
// return 1;
// }
//
// int nDamageType = pSkillDamageType->QueryInt();
// int nDamageSubType = pSkillDamageSubType->QueryInt();
// NFCDataList valueEffectProperty( pSkillDamageProperty->QueryString().c_str(), "," );
// NFCDataList valueEffectValue( pSkillDamageValue->QueryString().c_str(), "," );
//
// if ( valueEffectProperty.GetCount() != valueEffectValue.GetCount() )
// {
// return 1;
// }
//for ( int i = 0; i < valueEffectProperty.GetCount(); i++ )
{
//先测定目标是否有此属性(其实是担心配错了)
for ( int j = 0; j < other.GetCount(); j++ )
{
NFIDENTID identOther = other.Object( j );
if ( identOther.IsNull() )
{
continue;
}
NF_SHARE_PTR<NFIObject> pObject = m_pKernelModule->GetObject( identOther );
if ( pObject == NULL )
{
continue;
}
//短刀伤害,只能是HP,MP之类的有最大上限值的属性
// std::string strCurProperty = valueEffectProperty.StringVal( i );
// std::string strMaxProperty = "MAX" + strCurProperty;
// NFIProperty* pOtherCurProperty = pObject->GetPropertyManager()->GetElement( strCurProperty );
// NFIProperty* pOtherMaxProperty = pObject->GetPropertyManager()->GetElement( strMaxProperty );
// if ( pOtherCurProperty == NULL || pOtherMaxProperty == NULL )
// {
// continue;
// }
NF_SHARE_PTR<NFIProperty> pLastProperty = pObject->GetPropertyManager()->GetElement( "LastAttacker" );
if ( pLastProperty )
{
pLastProperty->SetObject( self );
}
}
}
//m_pKernelModule->LogErrorItem(strSkillName.c_str(), "");
return 0;
}