当前位置: 首页>>代码示例>>C++>>正文


C++ OWN_IMPACT::MarkCriticalFlag方法代码示例

本文整理汇总了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
		}
开发者ID:uvbs,项目名称:wx2Server,代码行数:7,代码来源:StdImpact001.cpp

示例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;
		}
开发者ID:uvbs,项目名称:wx2Server,代码行数:54,代码来源:Impact_Core.cpp

示例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
}
开发者ID:uvbs,项目名称:wx2Server,代码行数:15,代码来源:StdImpact069.cpp


注:本文中的OWN_IMPACT::MarkCriticalFlag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。