Example #1
0
 BOOL StdImpact004_T::RefixPowerByRate(OWN_IMPACT & rImp, INT nRate) const
 {
     __ENTER_FUNCTION
     nRate += 100;
     SetHpModification(rImp, Float2Int((GetHpModification(rImp)*nRate)/100.0f));
     SetMpModification(rImp, Float2Int((GetMpModification(rImp)*nRate)/100.0f));
     SetRageModification(rImp, Float2Int((GetRageModification(rImp)*nRate)/100.0f));
     SetStrikePointModification(rImp, Float2Int((GetStrikePointModification(rImp)*nRate)/100.0f));
     __LEAVE_FUNCTION
     return TRUE;
 }
Example #2
0
		VOID DS_EMei014_T::OnFadeOut(OWN_IMPACT& rImp, Obj_Character& rMe) const
		{
			__ENTER_FUNCTION
			Obj_Character* pTar=NULL;

			OBJLIST Targets;
			if(FALSE==ScanUnitForTarget(rImp, rMe, *(rMe.getWorldPos()), (FLOAT)GetScanRadius(rImp), GetEffectedObjNumber(rImp), Targets))
			{
				return;
			}
			// init impact
			OWN_IMPACT impact;
			DI_ModifyRage_T const* pImpactLogic = (DI_ModifyRage_T const*)g_ImpactLogicList.GetLogicById(DI_MODIFY_RAGE);
			if(NULL==pImpactLogic)
			{
				AssertEx(FALSE,"[SOT_EMei014_T::OnFadeOut]:Can't find the logic for DI_MODIFY_RAGE. check now.");
				return;
			}

			pImpactLogic->InitStruct(impact);	
			impact.m_nSkillID = rImp.m_nSkillID;
			impact.m_nCasterID = rMe.GetID();
			impact.m_nImpactID = GetSubImpactID(rImp);
			INT nRage = GetRageModification(rImp);
			0<nRage?nRage=-nRage:NULL;
			pImpactLogic->SetRageModification(impact, nRage);
			Scene* pScene = rMe.getScene();
			if(NULL==pScene)
			{
				AssertEx(FALSE,"[SOT_EMei014_T::OnFadeOut]:Empty Scene pointer. check now.");
				return;
			}
			// impacts init finished
			for(INT nIdx=0; Targets.m_Count>nIdx;++nIdx)
			{
				pTar = (Obj_Character*)Targets.m_aObj[nIdx];
				if(NULL==pTar)
				{
					continue;
				}
				pScene->GetEventCore().RegisterBeSkillEvent(pTar->GetID(), rMe.GetID(), BEHAVIOR_TYPE_HOSTILITY, 500);
				pScene->GetEventCore().RegisterImpactEvent(pTar->GetID(), rMe.GetID(), impact, 500);
			}
			return;
			__LEAVE_FUNCTION
		}