本文整理汇总了C++中OWN_IMPACT::MarkCriticalFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ OWN_IMPACT::MarkCriticalFlag方法的具体用法?C++ OWN_IMPACT::MarkCriticalFlag怎么用?C++ OWN_IMPACT::MarkCriticalFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWN_IMPACT
的用法示例。
在下文中一共展示了OWN_IMPACT::MarkCriticalFlag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDamage
VOID StdImpact001_T::CriticalRefix(OWN_IMPACT& rImp) const
{
__ENTER_FUNCTION
SetDamage(rImp, GetDamage(rImp)*2);
rImp.MarkCriticalFlag();
__LEAVE_FUNCTION
}
示例2: 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;
}
示例3: SetDamageNear
VOID StdImpact069_T::CriticalRefix(OWN_IMPACT& rImp) const
{
__ENTER_FUNCTION
SetDamageNear(rImp, GetDamageNear(rImp)*2);
SetDamageFar(rImp, GetDamageFar(rImp)*2);
SetDamageMagicNear(rImp, GetDamageMagicNear(rImp)*2);
SetDamageMagicFar(rImp, GetDamageMagicFar(rImp)*2);
SetDamageGold(rImp, GetDamageGold(rImp)*2);
SetDamageWood(rImp, GetDamageWood(rImp)*2);
SetDamageWater(rImp, GetDamageWater(rImp)*2);
SetDamageFire(rImp, GetDamageFire(rImp)*2);
SetDamageSoil(rImp, GetDamageSoil(rImp)*2);
rImp.MarkCriticalFlag();
__LEAVE_FUNCTION
}