本文整理汇总了C++中NFCDataList::Object方法的典型用法代码示例。如果您正苦于以下问题:C++ NFCDataList::Object方法的具体用法?C++ NFCDataList::Object怎么用?C++ NFCDataList::Object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NFCDataList
的用法示例。
在下文中一共展示了NFCDataList::Object方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DestroyCloneScene
bool NFCSceneProcessModule::DestroyCloneScene( const int& nContainerID, const int& nGroupID, const NFIDataList& arg )
{
//无条件删除
NFCDataList valueAllObjectList;
m_pKernelModule->GetGroupObjectList( nContainerID, nGroupID, valueAllObjectList );
for (int i = 0; i < valueAllObjectList.GetCount(); ++i)
{
NFIDENTID ident = valueAllObjectList.Object( i );
std::string strObjClassName = m_pKernelModule->GetPropertyString( ident, "ClassName" );
if ( "Player" != strObjClassName )
{
m_pKernelModule->DestroyObject(ident);
}
}
m_pKernelModule->ReleaseGroupScene(nContainerID, nGroupID);
return false;
}
示例2: OnRequireUseSkillEvent
int NFCSkillModule::OnRequireUseSkillEvent( const NFGUID& self, const int nEventID, const NFIDataList& var )
{
if ( var.GetCount() < 3)
{
return 1;
}
//EGameErrorCode errorCode = EGameErrorCode::EGEC_INVALID_SKILL;
NF_SHARE_PTR<NFIObject> pObejct = m_pKernelModule->GetObject( var.Object( 0 ) );
if ( pObejct == NULL )
{
return 1;
}
NF_SHARE_PTR<NFIRecord> pRecordSkill = pObejct->GetRecordManager()->GetElement( NFrame::Player::R_SkillTable() );
if ( pRecordSkill == NULL )
{
return 1;
}
NF_SHARE_PTR<NFIPropertyManager> pPropertyManager = m_pElementInfoModule->GetPropertyManager( var.String( 2 ) );
if ( pPropertyManager == NULL )
{
return 1;
}
NF_SHARE_PTR<NFIProperty> pItemTypeProperty = pPropertyManager->GetElement(NFrame::Skill::SkillType());
if ( pItemTypeProperty == NULL )
{
return 1;
}
//配置表中真的有这么个技能类别
EGameSkillType eItemType = ( EGameSkillType )pItemTypeProperty->GetInt();
NFISkillConsumeProcessModule* pConsumeProcessModule = m_pSkillConsumeManagerModule->GetConsumeModule( EGameSkillType::EGST_JOBSKILL_BRIEF );
if ( pConsumeProcessModule == NULL )
{
return 1;
}
NFCDataList valueOther;
valueOther.Append( var, 3, var.GetCount() - 3 ); // 被攻击玩家数量 3表示从第几个参数开始是被攻击玩家
// if ( pConsumeProcessModule->ConsumeLegal( var.ObjectVal( 0 ), var.StringVal( 2 ), valueOther ) != 0 )
// {
// return 1;
// }
//
// if ( pConsumeProcessModule->ConsumeSelf( var.ObjectVal( 0 ), var.StringVal( 2 ) ) != 0 )
// {
// return 1;
// }
//
NFCDataList damageValueList;
NFCDataList damageResultList;
int nResult = pConsumeProcessModule->ConsumeProcess( var.Object( 0 ), var.String( 2 ), valueOther, damageValueList, damageResultList );
for (int i = 0; i < valueOther.GetCount(); i++)
{
m_pKernelModule->SetPropertyInt(valueOther.Object(i), NFrame::NPC::HP(), 0);
damageValueList.AddInt(0);
damageResultList.AddInt(0);
}
//结果事件--无论失败或者是成功,都会发下去--当然使用结果只对使用者下发--成果的结果,还得对被施放的人发
if ( damageValueList.GetCount() == damageResultList.GetCount()
&& damageValueList.GetCount() == valueOther.GetCount() )
{
NFCDataList valueResult;
valueResult.AddString( var.String( 2 ).c_str() );
valueResult.AddInt( valueOther.GetCount() );
valueResult.Append( valueOther, 0, valueOther.GetCount() ); //伤害对象
valueResult.Append( damageValueList, 0, damageValueList.GetCount() ); //伤害值
valueResult.Append( damageResultList, 0, damageResultList.GetCount() ); //击打效果
//现在不需要反馈,杀了就杀了
//m_pEventProcessModule->DoEvent( pObejct->Self(), NFED_ON_CLIENT_USE_SKILL_RESULT, valueResult );
}
return 0;
}