public uint CommonAttackSearchLowestHpTarget(ObjWrapper _wrapper, int _srchR) { ActorRoot root = null; ActorRoot root2 = null; root = Singleton <TargetSearcher> .GetInstance().GetLowestHpTarget(_wrapper.actor, _wrapper.AttackRange, TargetPriority.TargetPriority_Hero, 0, true, false); if ((root == null) || (root.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)) { root2 = Singleton <TargetSearcher> .GetInstance().GetLowestHpTarget(_wrapper.actor, _wrapper.GreaterRange, TargetPriority.TargetPriority_Hero, 0, true, false); } if ((root2 != null) && (root2.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)) { root = root2; } if (root == null) { root = Singleton <TargetSearcher> .GetInstance().GetNearestEnemy(_wrapper.actor, _srchR, 0, false); } if (root != null) { return(root.ObjID); } root = Singleton <TargetSearcher> .GetInstance().GetNearestEnemy(_wrapper.actor, _srchR, 0, true); if (root != null) { return(root.ObjID); } return(0); }
public IActionResult GetDefaultValues() { ObjWrapper wrapper = _generator.GetDefaultObject(); string t = JsonSerializer.Serialize <ObjWrapper>(wrapper); return(Ok(t)); }
public override void Process(Action _action, Track _track) { base.Process(_action, _track); if (this.targetId < 0) { PoolObjHandle <ActorRoot> captain = Singleton <GamePlayerCenter> .instance.GetHostPlayer().Captain; if (captain && captain.handle.ActorControl != null) { captain.handle.ActorControl.SetObjBehaviMode(this.Mode); } } else { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId); if (!actorHandle) { return; } ObjWrapper actorControl = actorHandle.handle.ActorControl; if (actorControl != null) { actorControl.SetObjBehaviMode(this.Mode); } } }
public void CreateLogicWrapper() { switch (this.TheActorMeta.ActorType) { case ActorTypeDef.Actor_Type_Hero: this.ActorControl = ClassObjPool <HeroWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Monster: this.ActorControl = ClassObjPool <MonsterWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Organ: this.ActorControl = ClassObjPool <OrganWrapper> .Get(); break; case ActorTypeDef.Actor_Type_EYE: this.ActorControl = ClassObjPool <EyeWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Bullet: this.ActorControl = ClassObjPool <BulletWrapper> .Get(); break; } if (this.ActorControl != null) { this.ActorControl.Born(this); } }
public uint CommonAttackSearchNearestTarget(ObjWrapper _wrapper, int _srchR) { ActorRoot root = null; root = Singleton <TargetSearcher> .GetInstance().GetNearestEnemy(_wrapper.actor, _wrapper.AttackRange, TargetPriority.TargetPriority_Hero, 0, false); if (root != null) { return(root.ObjID); } root = Singleton <TargetSearcher> .GetInstance().GetNearestEnemy(_wrapper.actor, _wrapper.GreaterRange, TargetPriority.TargetPriority_Hero, 0, false); if (root != null) { return(root.ObjID); } root = Singleton <TargetSearcher> .GetInstance().GetNearestEnemy(_wrapper.actor, _srchR, 0, false); if (root != null) { return(root.ObjID); } root = Singleton <TargetSearcher> .GetInstance().GetNearestEnemy(_wrapper.actor, _srchR, 0, true); if (root != null) { return(root.ObjID); } return(0); }
public override void Enter(Action _action, Track _track) { base.Enter(_action, _track); this.actorObj = _action.GetActorHandle(this.targetId); PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.attackId); if (!this.actorObj || !actorHandle) { return; } ObjWrapper actorControl = this.actorObj.get_handle().ActorControl; if (actorControl == null) { return; } if (!actorControl.IsDeadState) { actorControl.TerminateMove(); actorControl.ClearMoveCommand(); actorControl.ForceAbortCurUseSkill(); actorControl.SetOutOfControl(true, OutOfControlType.Taunt); actorControl.SetTauntTarget(actorHandle); } }
public bool ActorFilter(ref PoolObjHandle <ActorRoot> act) { if (this.bPlayerCaptain && !this.bTriggerByTeam) { return(act == Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer().Captain); } ActorRoot handle = act.handle; if ((this._targetActorTypeMask != 0 && (this._targetActorTypeMask & 1 << (int)handle.TheActorMeta.ActorType) == 0) || (this._targetActorCampMask != 0 && (this._targetActorCampMask & 1 << (int)handle.TheActorMeta.ActorCamp) == 0) || (this._targetActorSubTypeMask != 0 && (this._targetActorSubTypeMask & 1 << (int)handle.ActorControl.GetActorSubType()) == 0)) { return(false); } if (this.OnlyEffectNotFullHpOrMpActor && handle.ValueComponent != null && handle.ValueComponent.actorHp >= handle.ValueComponent.actorHpTotal && (!handle.ValueComponent.IsEnergyType(EnergyType.MagicResource) || handle.ValueComponent.actorEp >= handle.ValueComponent.actorEpTotal)) { return(false); } if (this.TargetActorOutBattle) { ObjWrapper actorControl = handle.ActorControl; if (actorControl != null && actorControl.IsInBattle) { return(false); } } return(true); }
public override void Enter(AGE.Action _action, Track _track) { base.Enter(_action, _track); this.actorObj = _action.GetActorHandle(this.targetId); PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.attackId); if ((this.actorObj != 0) && (actorHandle != 0)) { ObjWrapper actorControl = this.actorObj.handle.ActorControl; if ((actorControl != null) && !actorControl.IsDeadState) { actorControl.TerminateMove(); actorControl.ClearMoveCommand(); actorControl.ForceAbortCurUseSkill(); actorControl.SetOutOfControl(true, (OutOfControlType)this.subType); switch (this.subType) { case 0: actorControl.SetTauntTarget(actorHandle); break; case 2: actorControl.SetTerrorActor(actorHandle); break; } } } }
public override void Process(Action _action, Track _track) { Vector3 vector = this.TargetPos; GameObject gameObject = _action.GetGameObject(this.destId); if (gameObject != null) { vector = gameObject.transform.position; } Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer(); PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.srcId); if (!actorHandle || (hostPlayer.Captain && actorHandle == hostPlayer.Captain)) { ObjWrapper actorControl = hostPlayer.Captain.get_handle().ActorControl; if (actorControl != null) { FrameCommandFactory.CreateFrameCommand <StopMoveCommand>().Send(); FrameCommand <MoveToPosCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <MoveToPosCommand>(); frameCommand.cmdData.destPosition = (VInt3)vector; frameCommand.Send(); } } else if (actorHandle) { actorHandle.get_handle().ActorControl.RealMovePosition((VInt3)vector, 0u); } }
public void Init(ObjWrapper wrapper) { this.m_wrapper = wrapper; this.showTimeInterv = 0; this.m_needDeginShow = true; this.m_showTimes = 0; Singleton <GameEventSys> .get_instance().RmvEventHandler <DefaultGameEventParam>(GameEventDef.Event_DoubleKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().RmvEventHandler <DefaultGameEventParam>(GameEventDef.Event_TripleKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().RmvEventHandler <DefaultGameEventParam>(GameEventDef.Event_QuataryKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().RmvEventHandler <DefaultGameEventParam>(GameEventDef.Event_PentaKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().RmvEventHandler <DefaultGameEventParam>(GameEventDef.Event_Odyssey, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().RmvEventHandler <DefaultGameEventParam>(GameEventDef.Event_OdysseyBeStopped, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().RmvEventHandler <SettleEventParam>(GameEventDef.Event_SettleComplete, new RefAction <SettleEventParam>(this.OnSettleCompleteShow)); Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_DoubleKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_TripleKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_QuataryKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_PentaKill, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_Odyssey, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_OdysseyBeStopped, new RefAction <DefaultGameEventParam>(this.OnShouldShowProficiencyEffect)); Singleton <GameEventSys> .get_instance().AddEventHandler <SettleEventParam>(GameEventDef.Event_SettleComplete, new RefAction <SettleEventParam>(this.OnSettleCompleteShow)); }
public override void Enter(Action _action, Track _track) { base.Enter(_action, _track); this.actorObj = _action.GetActorHandle(this.targetId); if (!this.actorObj) { return; } ObjWrapper actorControl = this.actorObj.get_handle().ActorControl; if (actorControl == null) { return; } this.PauseAnimation(); actorControl.TerminateMove(); actorControl.ClearMoveCommand(); actorControl.ForceAbortCurUseSkill(); this.actorObj.get_handle().ActorControl.AddNoAbilityFlag(ObjAbilityType.ObjAbility_Move); this.actorObj.get_handle().ActorControl.AddNoAbilityFlag(ObjAbilityType.ObjAbility_Freeze); this.actorObj.get_handle().ActorControl.AddDisableSkillFlag(SkillSlotType.SLOT_SKILL_COUNT, false); if (this.freezeHeight > 0 && this.actorObj.get_handle().isMovable) { VInt vInt = 0; VInt3 location = this.actorObj.get_handle().location; PathfindingUtility.GetGroundY(location, out vInt); location.y = vInt.i + this.freezeHeight; this.actorObj.get_handle().location = location; } }
public void DetachActorRoot() { if (this.ActorObj != null) { if (this.ActorObj.SMNode != null) { this.ActorObj.SMNode.Detach(); this.ActorObj.SMNode.Release(); this.ActorObj.SMNode = null; } this.ActorObj.UninitActor(); this.ActorObj.ObjLinker = null; this.ActorObj.Release(); this.ActorPtr.Release(); this.ActorObj = null; this.myRenderer = null; this.CustomMoveLerp = null; this.ActorControl = null; this.ActorMovement = null; if (this.meshObject != null) { Singleton <CGameObjectPool> .GetInstance().RecycleGameObject(this.meshObject); this.meshObject = null; } } }
public override void OnUse() { base.OnUse(); this.name = string.Empty; this.isMovable = true; this.isRotatable = true; this.myTransform = null; this.ActorMesh = null; this.ActorMeshAnimation = null; this._bVisible = true; this._bInitVisibleDelay = 0; this._bInCamera = false; this.ObjID = 0u; this.TheActorMeta = default(ActorMeta); this.TheStaticData = default(ActorStaticData); this.SelfPtr.Release(); this.ObjLinker = null; this.ActorControl = null; this.ActorAgent = null; this.MovementComponent = null; this.SkillControl = null; this.ValueComponent = null; this.HurtControl = null; this.HudControl = null; this.AnimControl = null; this.BuffHolderComp = null; this.MatHurtEffect = null; this.ShadowEffect = null; this.EquipComponent = null; this.DefaultAttackModeControl = null; this.LockTargetAttackModeControl = null; this.PetControl = null; this.OriginalActorMesh = null; this.OriginalMeshAnim = null; this.shape = null; this.slotList.Clear(); this.bChildUpdate = false; this.SMNode = null; this._location = VInt3.zero; this._forward = VInt3.forward; this._rotation = Quaternion.identity; this.groundY = 0; this.hasReachedNavEdge = false; this.pickFlyY = 0; this.AttackOrderReady = true; this.bOneKiller = false; this.CharInfo = null; this.HorizonMarker = null; this.BornPos = VInt3.zero; this.isRecycled = false; this.BornPos = VInt3.zero; this.PositionRecords = null; this.PositionRecordsLastStamp = 0f; }
public override void Leave(AGE.Action _action, Track _track) { base.Leave(_action, _track); if (this.actorObj != 0) { ObjWrapper actorControl = this.actorObj.handle.ActorControl; if (actorControl != null) { actorControl.SetOutOfControl(false, (OutOfControlType)this.subType); } } }
public void CreateLogicWrapper() { switch (this.TheActorMeta.ActorType) { case ActorTypeDef.Actor_Type_Hero: this.ActorControl = ClassObjPool <HeroWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Monster: this.ActorControl = ClassObjPool <MonsterWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Organ: this.ActorControl = ClassObjPool <OrganWrapper> .Get(); break; case ActorTypeDef.Actor_Type_EYE: this.ActorControl = ClassObjPool <EyeWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Call: this.ActorControl = ClassObjPool <CallActorWrapper> .Get(); break; case ActorTypeDef.Actor_Type_Bullet: this.ActorControl = ClassObjPool <BulletWrapper> .Get(); break; } if (Singleton <WatchController> .GetInstance().CanShowActorIRPosMap() && this.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && (this.TheActorMeta.ActorCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1 || this.TheActorMeta.ActorCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_2)) { if (this.PositionRecords == null) { this.PositionRecords = new List <Vector3>(); } else { this.PositionRecords.Clear(); } this.PositionRecordsLastStamp = 0f; } if (this.ActorControl != null) { this.ActorControl.Born(this); } }
public void MakeDropItemIfNeed(MonsterWrapper InMonster, ObjWrapper InTarget) { DebugHelper.Assert(InMonster != null); ResMonsterCfgInfo cfgInfo = InMonster.cfgInfo; if ((cfgInfo != null) && (cfgInfo.iBufDropID != 0)) { this.MonsterRef = InMonster; if (FrameRandom.Random(0x2710) < cfgInfo.iBufDropRate) { this.SpawnBuf(cfgInfo.iBufDropID); } } }
public override void Leave(Action _action, Track _track) { base.Leave(_action, _track); if (!this.actorObj) { return; } ObjWrapper actorControl = this.actorObj.get_handle().ActorControl; if (actorControl == null) { return; } actorControl.SetOutOfControl(false, OutOfControlType.Taunt); }
public override void Process(Action _action, Track _track, int _localTime) { if (this.CheckCondition == StopCurrentActionSkill.CheckConditionType.ActorDead) { ObjWrapper actorControl = this.checkTargetActor.handle.ActorControl; if (actorControl != null && actorControl.IsDeadState) { BaseSkill refParamObject = _action.refParams.GetRefParamObject <BaseSkill>("SkillObj"); if (refParamObject != null) { refParamObject.Stop(); } } } base.Process(_action, _track, _localTime); }
public void MakeDropItemIfNeed(MonsterWrapper InMonster, ObjWrapper InTarget) { DebugHelper.Assert(InMonster != null); ResMonsterCfgInfo cfgInfo = InMonster.cfgInfo; if (cfgInfo == null || cfgInfo.iBufDropID == 0) { return; } this.MonsterRef = InMonster; ushort num = FrameRandom.Random(10000u); if ((int)num < cfgInfo.iBufDropRate) { this.SpawnBuf(cfgInfo.iBufDropID); } }
public void OnGet() { this.CanMovable = true; this.isStatic = false; this.CharInfo = null; this.ActorObj = null; this.ActorPtr.Release(); this.myRenderer = null; this.bNeedLerp = false; this.GroundSpeed = 0; this.nPreMoveSeq = -1; this.RepairFramesMin = 1; this.FrameBlockIndex = 0; this.CustomMoveLerp = null; this.ActorControl = null; this.ActorMovement = null; }
public override void UpdateLogic(int nDelta) { if (this.showInfoTargetID != 0u && !base.IsValidTargetID(this.showInfoTargetID)) { this.ClearShowTargetInfo(); } if (this.actorPtr) { ObjWrapper actorControl = this.actor.ActorControl; if (actorControl != null) { ObjBehaviMode myBehavior = actorControl.myBehavior; if (myBehavior != ObjBehaviMode.Normal_Attack && (myBehavior <= ObjBehaviMode.UseSkill_0 || myBehavior >= ObjBehaviMode.UseSkill_7)) { this.commonAttackEnemyHeroTargetID = 0u; } } } }
public override void Process(Action _action, Track _track) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId); if (!actorHandle) { if (ActionManager.Instance.isPrintLog) { } return; } ObjWrapper actorControl = actorHandle.get_handle().ActorControl; if (actorControl == null) { if (ActionManager.Instance.isPrintLog) { } return; } if (this.stopMove) { actorControl.TerminateMove(); } if (this.clearMove) { actorControl.ClearMoveCommand(); } if (this.stopCurSkill) { actorControl.ForceAbortCurUseSkill(); } if (this.delayStopCurSkill && !this.stopCurSkill) { actorControl.DelayAbortCurUseSkill(); } if (this.deadControl && actorControl.actor.TheStaticData.TheBaseAttribute.DeadControl && actorControl.IsDeadState) { actorControl.AddNoAbilityFlag(ObjAbilityType.ObjAbility_DeadControl); actorControl.SetDeadMode(ObjDeadMode.DeadState_Idle); } }
public ActionResult GenerateReportJson([FromBody] ObjWrapper obj) { try { return(File(_generator.GenerateCleanReport(obj.student, obj.details).ToArray(), "application/pdf", "generatedReport.pdf")); } catch (Exception ex) { return(BadRequest(ex.ToString())); } /*try * { * //ObjWrapper obj = (ObjWrapper)JsonSerializer.Deserialize<ObjWrapper>(json); * return File(_generator.GenerateCleanReport(obj.student, obj.details), "application/pdf", "generatedReport.pdf"); * } * catch(JsonException ex) * { * return BadRequest(ex.ToString()); * }*/ }
public bool ActorFilter(ref PoolObjHandle<ActorRoot> act) { if (this.bPlayerCaptain && !this.bTriggerByTeam) { return (act == Singleton<GamePlayerCenter>.GetInstance().GetHostPlayer().Captain); } ActorRoot handle = act.handle; if (((this.OnlyEffectNotFullHpOrMpActor && (handle.ValueComponent != null)) && (handle.ValueComponent.actorHp >= handle.ValueComponent.actorHpTotal)) && ((handle.ValueComponent.IsEnergyType(ENERGY_TYPE.Magic) && (handle.ValueComponent.actorEp >= handle.ValueComponent.actorEpTotal)) || !handle.ValueComponent.IsEnergyType(ENERGY_TYPE.Magic))) { return false; } if (this.TargetActorOutBattle) { ObjWrapper actorControl = handle.ActorControl; if ((actorControl != null) && actorControl.IsInBattle) { return false; } } return ((((this._targetActorTypeMask == 0) || ((this._targetActorTypeMask & (((int) 1) << handle.TheActorMeta.ActorType)) != 0)) && ((this._targetActorCampMask == 0) || ((this._targetActorCampMask & (((int) 1) << handle.TheActorMeta.ActorCamp)) != 0))) && ((this._targetActorSubTypeMask == 0) || ((this._targetActorSubTypeMask & (((int) 1) << handle.ActorControl.GetActorSubType())) != 0))); }
public override void Process(Action _action, Track _track) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId); if (actorHandle == 0) { if (ActionManager.Instance.isPrintLog) { } } else { ObjWrapper actorControl = actorHandle.handle.ActorControl; if (actorControl == null) { if (ActionManager.Instance.isPrintLog) { } } else { if (this.stopMove) { actorControl.TerminateMove(); } if (this.clearMove) { actorControl.ClearMoveCommand(); } if (this.stopCurSkill) { actorControl.ForceAbortCurUseSkill(); } if (this.delayStopCurSkill && !this.stopCurSkill) { actorControl.DelayAbortCurUseSkill(); } } } }
public override void Enter(AGE.Action _action, Track _track) { base.Enter(_action, _track); this.actorObj = _action.GetActorHandle(this.targetId); if (this.actorObj != 0) { ObjWrapper actorControl = this.actorObj.handle.ActorControl; if (actorControl != null) { this.PauseAnimation(); actorControl.TerminateMove(); actorControl.ClearMoveCommand(); actorControl.ForceAbortCurUseSkill(); this.actorObj.handle.ActorControl.AddNoAbilityFlag(ObjAbilityType.ObjAbility_Move); this.actorObj.handle.ActorControl.AddDisableSkillFlag(SkillSlotType.SLOT_SKILL_COUNT); if ((this.freezeHeight > 0) && this.actorObj.handle.isMovable) { VInt3 location = this.actorObj.handle.location; location.y += this.freezeHeight; this.actorObj.handle.location = location; } } } }
public uint CommonAttackSearchLowestHpPriorityMonster(ObjWrapper _wrapper, int _srchR) { return(0); }
public void ActorStart() { this.bNeedLerp = (Singleton <FrameSynchr> .instance.bActive && this.ActorObj.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Organ); this.ActorControl = ((this.ActorObj.TheActorMeta.ActorType < ActorTypeDef.Actor_Type_Bullet) ? this.ActorObj.ActorControl : null); this.ActorMovement = (PlayerMovement)this.ActorObj.MovementComponent; }
public uint CommonAttackSearchNearestPriorityHero(ObjWrapper _wrapper, int _srchR) { return(0); }
public void ActorStart() { this.bNeedLerp = (Singleton <FrameSynchr> .instance.bActive && !Singleton <GameReplayModule> .instance.isReplay) && (this.ActorObj.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Organ); this.ActorControl = this.ActorObj.ActorControl; this.ActorMovement = (PlayerMovement)this.ActorObj.MovementComponent; }