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; }