本文整理汇总了C++中OWN_IMPACT::SetSkillID方法的典型用法代码示例。如果您正苦于以下问题:C++ OWN_IMPACT::SetSkillID方法的具体用法?C++ OWN_IMPACT::SetSkillID怎么用?C++ OWN_IMPACT::SetSkillID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWN_IMPACT
的用法示例。
在下文中一共展示了OWN_IMPACT::SetSkillID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendImpactToUnit
BOOL ImpactCore_T::SendImpactToUnit(Obj_Character& rTar, ID_t nDataIndex, ObjID_t nSender, Time_t nDelayTime, BOOL bCriticalFlag, INT nRefixRate, INT nReserveParam1, INT nReserveParam2) const
{
__ENTER_FUNCTION
OWN_IMPACT impact;
if(INVALID_ID == nDataIndex)
{
return FALSE;
}
//根据nDataIndex对应的效果逻辑初始化rImp
if(TRUE == InitImpactFromData(nDataIndex, impact, rTar, nReserveParam1))
{
//获得逻辑对象
ImpactLogic_T const* pLogic = Impact_GetLogic(impact);
if(NULL==pLogic)
{
Assert(NULL=="[ImpactCore_T::SendImpactToUnit]: Can't find sprcific logic for this impact.");
return FALSE;
}
//设置会心标记
if(TRUE == bCriticalFlag)
{
impact.MarkCriticalFlag();
}
if(0!=nRefixRate)
{
//向效果逻辑设置修正率
pLogic->RefixPowerByRate(impact, nRefixRate);
}
if(0>nDelayTime)
{
nDelayTime = 0;
}
Scene* pScene = rTar.getScene();
Obj_Character* pChar = NULL;
if(NULL!=pScene)
{
Obj* pObj = pScene->GetSpecificObjByID( nSender );
if( IsCharacterObj(pObj->GetObjType()) )
{
pChar = static_cast<Obj_Character*>(pObj);
SkillInfo_T& rSkillInfo = pChar->GetSkillInfo();
impact.SetSkillID( rSkillInfo.GetSkillID() );
rSkillInfo.SetSendSkillImpactID(impact.GetDataIndex());
}
pScene->GetEventCore().RegisterImpactEvent(rTar.GetID(), nSender, impact, nDelayTime);
return TRUE;
}
}
// start to fill impact struct
return TRUE;
__LEAVE_FUNCTION
return FALSE;
}