public void Enter(Action _action, Track _track) { this.hit = false; this.collideCountMap.Clear(); this.collideTimeMap.Clear(); this.type_Filters[0] = this.bFilterHero; this.type_Filters[1] = this.bFileterMonter; this.type_Filters[2] = this.bFileterOrgan; this.type_Filters[3] = this.bFilterEye; this.type_actorList[0] = this.triggerHeroList; this.type_actorList[1] = this.triggerMonsterList; this.type_actorList[2] = this.triggerOrganList; this.type_actorList[3] = this.triggerEyeList; this.triggerActor = _action.GetActorHandle(this.triggerId); if (this.bUseTriggerObj) { if (!this.triggerActor) { return; } if (AGE_Helper.GetCollisionShape(this.triggerActor.get_handle()) == null) { return; } } this.attackActor = _action.GetActorHandle(this.attackerId); this.skillContext = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); }
private void TriggerBullet() { BulletSkill skill = null; if (this.actorObj != 0) { int count = this.actorObj.handle.SkillControl.SpawnedBullets.Count; for (int i = 0; i < count; i++) { skill = this.actorObj.handle.SkillControl.SpawnedBullets[i]; if ((skill != null) && (skill.CurAction != 0)) { skill.CurAction.handle.refParams.SetRefParam("_TriggerBullet", true); if (this.bGatherTime) { SkillUseContext refParamObject = skill.CurAction.handle.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject != null) { refParamObject.GatherTime = this.lastTime / 0x3e8; if (refParamObject.GatherTime <= 0) { refParamObject.GatherTime = 1; } skill.lifeTime = this.triggerTime * refParamObject.GatherTime; } } } } } }
private void SpawnBullet(Action _action) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); for (int i = 0; i < this.spawnMax; i++) { PoolObjHandle <BulletSkill> handle = this.skillControl.SpawnBullet(refParamObject, this.ActionName, this.bDeadRemove); VInt3 zero = VInt3.zero; if ((handle != 0) && (handle.handle.CurAction != null)) { int index = 0; if (this.transArray.Length < 0) { zero = VInt3.zero; } else { if (this.bRandom) { index = FrameRandom.Random((uint)this.transArray.Length); } else { index = i % this.transArray.Length; } zero = this.transArray[index]; } handle.handle.CurAction.refParams.SetRefParam("_BulletPos", zero); } } }
public void CopyData(ref MoveBulletDurationContext r) { this.length = r.length; this.targetId = r.targetId; this.destId = r.destId; this.MoveType = r.MoveType; this.targetPosition = r.targetPosition; this.offsetDir = r.offsetDir; this.velocity = r.velocity; this.acceleration = r.acceleration; this.distance = r.distance; this.gravity = r.gravity; this.bMoveRotate = r.bMoveRotate; this.bAdjustSpeed = r.bAdjustSpeed; this.bBulletUseDir = r.bBulletUseDir; this.bUseIndicatorDir = r.bUseIndicatorDir; this.bReachDestStop = r.bReachDestStop; this.bResetMoveDistance = r.bResetMoveDistance; this.skillContext = r.skillContext; this.destPosition = r.destPosition; this.lastTime = r.lastTime; this.hitHeight = r.hitHeight; this.tarActor = r.tarActor; this.moveActor = r.moveActor; this.gravityControler = r.gravityControler; this.stopCondtion = r.stopCondtion; this.moveDirection = r.moveDirection; this.lerpDirection = r.lerpDirection; this.lastVelocity = r.lastVelocity; this.lastLerpVelocity = r.lastLerpVelocity; }
public override void Process(Action _action, Track _track) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId); if (actorHandle == 0) { if (ActionManager.Instance.isPrintLog) { } } else { SkillComponent skillControl = actorHandle.handle.SkillControl; if (skillControl == null) { if (ActionManager.Instance.isPrintLog) { } } else { SkillSlot slot; SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (((refParamObject != null) && skillControl.TryGetSkillSlot(refParamObject.SlotType, out slot)) && (slot != null)) { slot.StartSkillCD(); } } } }
private void SpawnBullet(AGE.Action _action) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); for (int i = 0; i < this.spawnMax; i++) { int index = 0; VInt3 zero = VInt3.zero; if (this.transArray.Length < 0) { zero = VInt3.zero; } else { if (this.bRandom) { index = FrameRandom.Random((uint)this.transArray.Length); } else { index = i % this.transArray.Length; } zero = this.transArray[index]; } refParamObject.BulletPos = zero; PoolObjHandle <BulletSkill> handle = this.skillControl.SpawnBullet(refParamObject, this.ActionName, this.bDeadRemove, this.bAgeImmeExcute); } }
private void InitContext(Action _action) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(1); PoolObjHandle <ActorRoot> handle2 = _action.GetActorHandle(0); if ((actorHandle != 0) && (handle2 != 0)) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); BuffSkill skill = _action.refParams.GetRefParamObject <BuffSkill>("SkillObj"); ResDT_SkillFunc outSkillFunc = null; if ((skill != null) && skill.FindSkillFunc((int)this.SkillFuncType, out outSkillFunc)) { this.m_context.inTargetObj = actorHandle; this.m_context.inOriginator = handle2; this.m_context.inUseContext = refParamObject; this.m_context.inSkillFunc = outSkillFunc; this.m_context.LocalParams = new ResDT_IntParamArrayNode[6]; for (int i = 0; i < 6; i++) { this.m_context.LocalParams[i] = new ResDT_IntParamArrayNode(); this.m_context.LocalParams[i].iParam = 0; } this.m_context.inAction = _action; this.m_context.inBuffSkill = new PoolObjHandle <BuffSkill>(skill); this.m_context.inDoCount = 0; this.m_context.inOverlayCount = skill.GetOverlayCount(); this.m_context.inLastEffect = true; this.m_context.InitSkillFuncContext(); this.bInit = true; } } }
public override void Process(AGE.Action _action, Track _track) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId); if (actorHandle == 0) { if (ActionManager.Instance.isPrintLog) { } } else { if (this.bImmediateRevive) { this.bCheckFilter = actorHandle.handle.ActorControl.IsEnableReviveContext(); } else if (!this.bOnlySelf) { this.FilterActorType(actorHandle); this.FilterActorCamp(actorHandle); } else { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (((refParamObject == null) || (refParamObject.Originator == 0)) || (refParamObject.Originator.handle.ActorControl == null)) { object[] inParameters = new object[] { _action.name }; DebugHelper.Assert(false, "Failed find orignal actor of this skill. action:{0}", inParameters); return; } this.bCheckFilter = refParamObject.Originator == actorHandle; } base.Process(_action, _track); } }
public static void ReviveAllHeros() { int inSkillCombineId = (int)Singleton <PVEReviveHeros> .instance.m_WishBuffId[(int)Singleton <PVEReviveHeros> .instance.m_iSelectedBuffItem]; Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer(); if ((hostPlayer != null) && (hostPlayer.Captain != 0)) { hostPlayer.Captain.handle.ActorControl.SetReviveContext(0, 0x2710, false, false, false); hostPlayer.Captain.handle.ActorControl.Revive(false); SkillUseContext inContext = new SkillUseContext(); inContext.SetOriginator(hostPlayer.Captain); hostPlayer.Captain.handle.SkillControl.SpawnBuff(hostPlayer.Captain, inContext, inSkillCombineId, true); ReadonlyContext <PoolObjHandle <ActorRoot> > allHeroes = hostPlayer.GetAllHeroes(); int count = allHeroes.Count; for (int i = 0; i < count; i++) { if (((allHeroes[i] != 0) && (allHeroes[i] != hostPlayer.Captain)) && (allHeroes[i] != 0)) { PoolObjHandle <ActorRoot> handle = allHeroes[i]; handle.handle.ActorControl.SetReviveContext(0, 0x2710, false, false, false); PoolObjHandle <ActorRoot> handle2 = allHeroes[i]; handle2.handle.ActorControl.Revive(false); inContext.SetOriginator(allHeroes[i]); PoolObjHandle <ActorRoot> handle3 = allHeroes[i]; handle3.handle.SkillControl.SpawnBuff(allHeroes[i], inContext, inSkillCombineId, true); } } m_iRemainReviveNum--; Singleton <PVEReviveHeros> .instance.ReviveHerosSucess(); } }
private void SpawnBullet(Action _action) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); for (int i = 0; i < this.spawnMax; i++) { VInt3 bulletPos = VInt3.zero; if (this.transArray.Length < 0) { bulletPos = VInt3.zero; } else { int num; if (this.bRandom) { num = (int)FrameRandom.Random((uint)this.transArray.Length); } else { num = i % this.transArray.Length; } bulletPos = this.transArray[num]; } refParamObject.BulletPos = bulletPos; PoolObjHandle <BulletSkill> poolObjHandle = this.skillControl.SpawnBullet(refParamObject, this.ActionName, this.bDeadRemove, this.bAgeImmeExcute, 0, 0); } }
public override void Process(Action _action, Track _track) { PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId); if (!actorHandle) { if (ActionManager.Instance.isPrintLog) { } return; } SkillComponent skillControl = actorHandle.get_handle().SkillControl; if (skillControl == null) { if (ActionManager.Instance.isPrintLog) { } return; } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); SkillSlot skillSlot; if (refParamObject != null && skillControl.TryGetSkillSlot(refParamObject.SlotType, out skillSlot) && skillSlot != null) { skillSlot.CurSkillEnergyCostTick(); } }
private void TriggerBullet() { if (!this.actorObj) { return; } int count = this.actorObj.get_handle().SkillControl.SpawnedBullets.get_Count(); for (int i = 0; i < count; i++) { BulletSkill bulletSkill = this.actorObj.get_handle().SkillControl.SpawnedBullets.get_Item(i); if (bulletSkill != null && bulletSkill.CurAction) { bulletSkill.CurAction.get_handle().refParams.SetRefParam("_TriggerBullet", true); if (this.bGatherTime) { SkillUseContext refParamObject = bulletSkill.CurAction.get_handle().refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject != null) { refParamObject.GatherTime = this.lastTime / 1000; if (refParamObject.GatherTime <= 0) { refParamObject.GatherTime = 1; } bulletSkill.lifeTime = this.triggerTime * refParamObject.GatherTime; } } bulletSkill.CurAction.get_handle().refParams.AddRefParam("_BulletRealFlyingTime", bulletSkill.lifeTime); } } }
public void ProcessInner(Action _action, Track _track, int delta) { VInt3 location = this.moveActor.handle.location; if ((this.MoveType == ActorMoveType.Target) && (this.tarActor != 0)) { this.destPosition = this.tarActor.handle.location; if ((this.tarActor != 0) && (this.tarActor.handle.CharInfo != null)) { CActorInfo charInfo = this.tarActor.handle.CharInfo; this.hitHeight = charInfo.iBulletHeight; VInt3 a = this.moveActor.handle.location - this.destPosition; a.y = 0; a = a.NormalizeTo(0x3e8); this.destPosition += IntMath.Divide(a, (long)charInfo.iCollisionSize.x, 0x3e8L); } this.destPosition.y += this.hitHeight; } this.moveDirection = this.destPosition - location; this.lerpDirection = this.moveDirection; if (this.bMoveRotate) { this.RotateMoveBullet(this.moveDirection); } int newMagn = (this.velocity * delta) / 0x3e8; if ((newMagn * newMagn) >= this.moveDirection.sqrMagnitudeLong2D) { this.moveActor.handle.location = this.destPosition; this.stopCondtion = true; } else { VInt3 num4; if (this.gravity < 0) { VInt num5; this.moveDirection.y = 0; num4 = location + this.moveDirection.NormalizeTo(newMagn); num4.y += this.gravityControler.GetMotionDeltaDistance(delta); if (PathfindingUtility.GetGroundY(this.destPosition, out num5) && (num4.y < num5.i)) { num4.y = num5.i; } } else { num4 = location + this.moveDirection.NormalizeTo(newMagn); } this.moveActor.handle.location = num4; } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject != null) { refParamObject.EffectPos = this.moveActor.handle.location; refParamObject.EffectDir = this.moveDirection; } }
public override void Leave(Action _action, Track _track) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); this.targetActor.handle.SkillControl.SpawnBuff(refParamObject.Originator, refParamObject, this.TargetSkillCombine_1, false); this.targetActor.handle.SkillControl.SpawnBuff(refParamObject.Originator, refParamObject, this.TargetSkillCombine_2, false); this.targetActor.handle.SkillControl.SpawnBuff(refParamObject.Originator, refParamObject, this.TargetSkillCombine_3, false); base.Leave(_action, _track); }
private void StartSkillContextCD(Action _action, ref SkillSlot slot) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject != null && this.skillControl.TryGetSkillSlot(refParamObject.SlotType, out slot) && slot != null) { slot.StartSkillCD(); } }
public override void Process(Action _action, Track _track) { this.actor = _action.GetActorHandle(this.targetId); if (!this.actor) { if (ActionManager.Instance.isPrintLog) { } return; } ActorRoot handle = this.actor.get_handle(); SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); PoolObjHandle <ActorRoot> originator = refParamObject.Originator; int num = 0; if (originator && refParamObject != null) { SkillComponent skillControl = originator.get_handle().SkillControl; SkillSlot skillSlot; if (skillControl.TryGetSkillSlot(refParamObject.SlotType, out skillSlot) && skillSlot != null) { num = skillSlot.GetSkillLevel() - 1; } } if (num < 0) { num = 0; } if (this.type == SetCollisionTick.ColliderType.Box) { VCollisionBox collisionShape = SetCollisionTick.GetCollisionShape <VCollisionBox>(handle, CollisionShapeType.Box); collisionShape.Pos = this.Pos; collisionShape.Size = new VInt3(this.Size.x + this.SizeGrowthValue.x * num, this.Size.y + this.SizeGrowthValue.y * num, this.Size.z + this.SizeGrowthValue.z * num); collisionShape.dirty = true; collisionShape.ConditionalUpdateShape(); } else if (this.type == SetCollisionTick.ColliderType.Sphere) { VCollisionSphere collisionShape2 = SetCollisionTick.GetCollisionShape <VCollisionSphere>(handle, CollisionShapeType.Sphere); collisionShape2.Pos = this.Pos; collisionShape2.Radius = this.Radius + this.RadiusGrowthValue * num; collisionShape2.dirty = true; collisionShape2.ConditionalUpdateShape(); } else if (this.type == SetCollisionTick.ColliderType.CylinderSector) { VCollisionCylinderSector collisionShape3 = SetCollisionTick.GetCollisionShape <VCollisionCylinderSector>(handle, CollisionShapeType.CylinderSector); collisionShape3.Pos = this.Pos; collisionShape3.Radius = this.SectorRadius; collisionShape3.Height = this.Height; collisionShape3.Degree = this.Degree; collisionShape3.Rotation = this.Rotation; collisionShape3.dirty = true; collisionShape3.ConditionalUpdateShape(); } }
private void TriggerAction(Action _action, ref PoolObjHandle <ActorRoot> target) { if (this.attackActor != 0) { int num; uint objID = target.handle.ObjID; if (this.collideCountMap.TryGetValue(objID, out num)) { num++; this.collideCountMap[objID] = num; } else { this.collideCountMap.Add(objID, 1); } int num3 = 0; if (this.collideTimeMap.TryGetValue(objID, out num3)) { this.collideTimeMap[objID] = this.localTime; } else { this.collideTimeMap.Add(objID, this.localTime); } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if ((refParamObject != null) && (_action.refParams.GetRefParamObject <BaseSkill>("SkillObj") != null)) { this.attackActor.handle.SkillControl.SpawnBuff(refParamObject.Originator, refParamObject, this.SelfSkillCombineID_1, false); this.attackActor.handle.SkillControl.SpawnBuff(refParamObject.Originator, refParamObject, this.SelfSkillCombineID_2, false); this.attackActor.handle.SkillControl.SpawnBuff(refParamObject.Originator, refParamObject, this.SelfSkillCombineID_3, false); if (target != 0) { this.hit = true; if ((target.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && !this.bHitTargetHero) { this.bHitTargetHero = true; this.HitTargetHeroPos = target.handle.location; } refParamObject.EffectDir = this.attackActor.handle.forward; bool flag = false; bool introduced6 = this.attackActor.handle.SkillControl.SpawnBuff(target, refParamObject, this.TargetSkillCombine_1, this.bExtraBuff); flag = introduced6 | this.attackActor.handle.SkillControl.SpawnBuff(target, refParamObject, this.TargetSkillCombine_2, this.bExtraBuff); if (flag | this.attackActor.handle.SkillControl.SpawnBuff(target, refParamObject, this.TargetSkillCombine_3, this.bExtraBuff)) { target.handle.ActorControl.BeAttackHit(this.attackActor); } } if ((this.bTriggerBullet && (this.BulletActionName != null)) && (this.BulletActionName.Length > 0)) { refParamObject.AppointType = SkillRangeAppointType.Target; refParamObject.TargetActor = target; this.attackActor.handle.SkillControl.SpawnBullet(refParamObject, this.BulletActionName, false); } } } }
protected bool ShouldUseNormal(AGE.Action _action, Track _track, ref PoolObjHandle <ActorRoot> Actor) { if ((Actor != 0) && ActorHelper.IsHostCtrlActor(ref Actor)) { return(true); } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); return(((refParamObject != null) && (refParamObject.Originator != 0)) && ActorHelper.IsHostCtrlActor(ref refParamObject.Originator)); }
private void HitTrigger(Action _action) { if (!this.attackActor) { return; } if (this.skillContext != null) { this.skillContext.EffectCountInSingleTrigger = 0; } this.GetCollidedActorList(_action, this.attackActor, this.triggerActor); if (this.collidedActors != null && this.collidedActors.get_Count() > 0) { if (this.bTriggerBounceBullet) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (!refParamObject.TargetActor) { refParamObject.TargetActor = this.collidedActors.get_Item(0); } } SkillChooseTargetEventParam skillChooseTargetEventParam = new SkillChooseTargetEventParam(this.attackActor, this.attackActor, this.collidedActors.get_Count()); Singleton <GameEventSys> .get_instance().SendEvent <SkillChooseTargetEventParam>(GameEventDef.Event_HitTrigger, ref skillChooseTargetEventParam); if (this.TriggerActorCount > 0 && this.TriggerActorCount < this.collidedActors.get_Count()) { this.PriorityTrigger(_action); } else { for (int i = 0; i < this.collidedActors.get_Count(); i++) { PoolObjHandle <ActorRoot> poolObjHandle = this.collidedActors.get_Item(i); this.TriggerAction(_action, ref poolObjHandle); } } } if (this.bTriggerMode) { int count = this.TriggeredBuffContextList.get_Count(); if (count > 0 && this.attackActor) { for (int j = count - 1; j >= 0; j--) { HitTriggerDurationContext.STriggeredBuffContext sTriggeredBuffContext = this.TriggeredBuffContextList.get_Item(j); if (!this.collidedActors.Contains(sTriggeredBuffContext.actor)) { this.attackActor.get_handle().SkillControl.RemoveBuff(sTriggeredBuffContext.actor, sTriggeredBuffContext.buffId); this.TriggeredBuffContextList.RemoveAt(j); } } } } }
public override void Enter(Action _action, Track _track) { base.Enter(_action, _track); this.targetActor = _action.GetActorHandle(this.targetID); this.bFirstTrigger = true; this.iLastTime = 0; this.iLocalTime = 0; this.iTriggerCount = 0; this.context = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); Singleton <GameEventSys> .instance.AddEventHandler <HurtEventResultInfo>(GameEventDef.Event_ActorDamage, new RefAction <HurtEventResultInfo>(this.OnActorDamage)); }
public void Leave(Action _action, Track _track) { if (this.moveActor != 0) { this.moveActor.handle.ObjLinker.RmvCustomMoveLerp(new CustomMoveLerpFunc(this.ActionMoveLerp)); } this.skillContext = null; this.tarActor.Release(); this.moveActor.Release(); this.gravityControler = null; }
public void Leave(AGE.Action _action, Track _track) { if (this.moveActor != 0) { this.moveActor.handle.ObjLinker.RmvCustomMoveLerp(new CustomMoveLerpFunc(this.ActionMoveLerp)); this.moveActor.handle.gameObject.transform.position = (Vector3)this.moveActor.handle.location; } this.skillContext = null; this.tarActor.Release(); this.moveActor.Release(); this.gravityControler = null; }
protected bool ShouldUseNormal(Action _action, Track _track, ref PoolObjHandle <ActorRoot> Actor) { bool flag = Actor && ActorHelper.IsHostCtrlActor(ref Actor); if (flag) { return(true); } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); return(refParamObject != null && refParamObject.Originator && ActorHelper.IsHostCtrlActor(ref refParamObject.Originator)); }
public override void OnUse() { base.OnUse(); this.targetID = 0; this.iTriggerSkillCombineID = 0; this.targetActor.Release(); this.bFirstTrigger = false; this.iLastTime = 0; this.iLocalTime = 0; this.iTriggerCount = 0; this.context = null; }
private void CreateEye(SkillUseContext skillContext) { if (this.actorRoot && this.bEyeObj) { this.actorRoot.handle.ObjLinker.CanMovable = false; Singleton <GameObjMgr> .instance.AddActor(this.actorRoot); EyeWrapper eyeWrapper = this.actorRoot.handle.ActorControl as EyeWrapper; if (eyeWrapper != null) { int num = 0; if (skillContext.Originator) { SkillSlot skillSlot = skillContext.Originator.handle.SkillControl.GetSkillSlot(skillContext.SlotType); if (skillSlot != null) { int skillLevel = skillSlot.GetSkillLevel(); num = Mathf.Max(skillLevel - 1, 0); } } int num2 = this.EyeLifeTime; num2 += this.EyeLiftTimeGrowth * num; if (num2 < 0) { num2 = 0; } eyeWrapper.LifeTime = num2; eyeWrapper.SetPerishTime(this.EyePerishAdvTime); if (this.actorRoot.handle.HorizonMarker != null) { int num3 = this.sightRadius; num3 += this.SightRadiusGrowth * num; if (num3 < 0) { num3 = 0; } this.actorRoot.handle.HorizonMarker.SightRadius = num3; } if (this.actorRoot.handle.SMNode != null) { VCollisionSphere vCollisionSphere = new VCollisionSphere(); vCollisionSphere.Born(this.actorRoot); vCollisionSphere.Pos = VInt3.zero; vCollisionSphere.Radius = 500; vCollisionSphere.dirty = true; vCollisionSphere.ConditionalUpdateShape(); this.actorRoot.handle.SMNode.Attach(); } } } }
private void Init(Action _action, Track _track) { this.actor_ = _action.GetActorHandle(this.attackerId); if (!this.actor_) { this.done_ = true; return; } SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject == null) { this.done_ = true; return; } VInt3 vInt; if (!refParamObject.CalcAttackerDir(out vInt, this.actor_)) { this.done_ = true; return; } if (vInt == VInt3.zero) { return; } if (this.actor_.handle.MovementComponent == null) { return; } this.bRotate = true; this.actor_.handle.MovementComponent.SetRotate(vInt, true); this.actor_.handle.ActorControl.AddNoAbilityFlag(ObjAbilityType.ObjAbility_MoveRotate); this.fromRot = this.actor_.handle.rotation; this.toRot = Quaternion.LookRotation((Vector3)vInt); if (this.length <= 30) { this.actor_.handle.rotation = this.toRot; this.done_ = true; return; } float num = Quaternion.Angle(this.fromRot, this.toRot); if (num > 180.1f) { DebugHelper.Assert(num <= 180.1f); } this.rotTime_ = Mathf.FloorToInt(num * (float)this.length / 180f); DebugHelper.Assert(this.rotTime_ <= this.length); }
public void CopyData(ref MoveBulletDurationContext r) { this.length = r.length; this.targetId = r.targetId; this.destId = r.destId; this.MoveType = r.MoveType; this.targetPosition = r.targetPosition; this.offsetDir = r.offsetDir; this.velocity = r.velocity; this.acceleration = r.acceleration; this.distance = r.distance; this.gravity = r.gravity; this.bMoveRotate = r.bMoveRotate; this.bAdjustSpeed = r.bAdjustSpeed; this.bBulletUseDir = r.bBulletUseDir; this.bUseIndicatorDir = r.bUseIndicatorDir; this.bReachDestStop = r.bReachDestStop; this.bResetMoveDistance = r.bResetMoveDistance; this.skillContext = r.skillContext; this.destPosition = r.destPosition; this.lastTime = r.lastTime; this.hitHeight = r.hitHeight; this.tarActor = r.tarActor; this.originateActor = r.originateActor; this.moveActor = r.moveActor; this.gravityControler = r.gravityControler; this.stopCondtion = r.stopCondtion; this.moveDirection = r.moveDirection; this.lerpDirection = r.lerpDirection; this.lastVelocity = r.lastVelocity; this.lastLerpVelocity = r.lastLerpVelocity; this.zCurPosition = r.zCurPosition; this.xDirection = r.xDirection; this.bMoveOnXAxis = r.bMoveOnXAxis; this.distanceZ0 = r.distanceZ0; this.distanceZ1 = r.distanceZ1; this.distanceX = r.distanceX; this.zDirection = r.zDirection; this.xDestPosition = r.xDestPosition; this.rotateBodyDegreeSpeed = r.rotateBodyDegreeSpeed; this.rotateBodyRadius = r.rotateBodyRadius; this.rotateBodyHeight = r.rotateBodyHeight; this.rotateBodyFindEnemyLatency = r.rotateBodyFindEnemyLatency; this.rotateBodyFindEnemyRadius = r.rotateBodyFindEnemyRadius; this.rotateBodyFindEnemyCd = r.rotateBodyFindEnemyCd; this.rotateBodyBulletCount = r.rotateBodyBulletCount; this.bFindTargetByRotateBodyBullet = r.bFindTargetByRotateBodyBullet; this.rotateBodyCurDirDegreeAngle = r.rotateBodyCurDirDegreeAngle; this.lerpRotateBodyCurDirDegreeAngle = r.lerpRotateBodyCurDirDegreeAngle; }
public override void Enter(Action _action, Track _track) { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); PoolObjHandle <ActorRoot> originator = refParamObject.Originator; if (ActorHelper.IsHostCtrlActor(ref originator)) { this.setFinished = false; } else { this.setFinished = true; } base.Enter(_action, _track); }
public void OnUse() { this.triggerHeroList.Clear(); this.triggerMonsterList.Clear(); this.triggerOrganList.Clear(); this.triggerEyeList.Clear(); this.triggerPriority.Clear(); this.collidedActors.Clear(); this.hit = false; this.residueActorCount = 0; this.bEdgeCheck = false; this.collideCountMap.Clear(); this.collideTimeMap.Clear(); this.attackActor.Release(); this.triggerActor.Release(); this.lastTime = 0; this.localTime = 0; this.deltaTime = 0; this.triggerCount = 0; this.bFirstProcess = true; this.bUseTriggerObj = true; this.bCheckSight = false; this.bHitTargetHero = false; this.HitTargetHeroPos = VInt3.zero; this.bTriggerMode = false; this.bTriggerBounceBullet = false; this.TriggeredBuffContextList.Clear(); this.bFilterEye = true; this.RemoveSkillList.Clear(); this.bFilterMoveDirection = false; this.Angle = -1; int num = 0; while ((long)num < 4L) { this.type_Filters[num] = true; num++; } int num2 = 0; while ((long)num2 < 4L) { this.type_actorList[num2] = null; num2++; } this.skillContext = null; }
private void Init(AGE.Action _action, Track _track) { this.actor_ = _action.GetActorHandle(this.attackerId); if (this.actor_ == 0) { this.done_ = true; } else { SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext"); if (refParamObject == null) { this.done_ = true; } else { VInt3 num; if (!refParamObject.CalcAttackerDir(out num, this.actor_)) { this.done_ = true; } else if ((num != VInt3.zero) && (this.actor_.handle.MovementComponent != null)) { this.bRotate = true; this.actor_.handle.MovementComponent.SetRotate(num, true); this.actor_.handle.ActorControl.AddNoAbilityFlag(ObjAbilityType.ObjAbility_MoveRotate); this.fromRot = this.actor_.handle.rotation; this.toRot = Quaternion.LookRotation((Vector3)num); if (base.length <= 30) { this.actor_.handle.rotation = this.toRot; this.done_ = true; } else { float num2 = Quaternion.Angle(this.fromRot, this.toRot); if (num2 > 180.1f) { DebugHelper.Assert(num2 <= 180.1f); } this.rotTime_ = Mathf.FloorToInt((num2 * base.length) / 180f); DebugHelper.Assert(this.rotTime_ <= base.length); } } } } }