private bool SendRequestUseSkillDir(Skill readySkillObj) { VInt3 vInt = VInt3.one; BaseAttackMode currentAttackMode = this.Actor.handle.ActorControl.GetCurrentAttackMode(); FrameCommand <UseDirectionalSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseDirectionalSkillCommand>(); if (currentAttackMode != null) { vInt = currentAttackMode.SelectSkillDirection(this); } frameCommand.cmdData.SlotType = this.SlotType; if (vInt.x == 0 && vInt.z == 0) { vInt = this.Actor.handle.forward; } short degree = (short)((double)(IntMath.atan2(-vInt.z, vInt.x).single * 180f) / 3.1416); frameCommand.cmdData.Degree = degree; if (!this.skillIndicator.GetSkillBtnDrag()) { frameCommand.cmdData.dwObjectID = this.skillTargetId; } frameCommand.Send(); return(true); }
private void RequestUseSkillSelectMode(uint objID) { Skill skill = (this.NextSkillObj == null) ? this.SkillObj : this.NextSkillObj; if (((objID == 0) || (skill == null)) || ((skill.cfgData == null) || !this.IsEnableSkillSlot())) { MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor); } else { PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(objID); if ((actor == 0) || actor.handle.ActorControl.IsDeadState) { MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor); } else if (Singleton <SkillDetectionControl> .GetInstance().Detection((SkillUseRule)skill.cfgData.dwSkillUseRule, this)) { FrameCommand <UseObjectiveSkillCommand> command = FrameCommandFactory.CreateCSSyncFrameCommand <UseObjectiveSkillCommand>(); command.cmdData.ObjectID = objID; command.cmdData.SlotType = this.SlotType; command.cmdData.iSkillID = skill.SkillID; command.Send(true); } else { MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor); } } }
private void RequestUseSkillSelectMode(uint objID) { Skill skill = (this.NextSkillObj == null) ? this.SkillObj : this.NextSkillObj; if (objID == 0u || skill == null || skill.cfgData == null || !this.IsEnableSkillSlot()) { MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor); return; } PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(objID); if (!actor || actor.get_handle().ActorControl.IsDeadState) { MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor); return; } if (Singleton <SkillDetectionControl> .GetInstance().Detection(skill.cfgData.bSkillUseRule, this)) { FrameCommand <UseObjectiveSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseObjectiveSkillCommand>(); frameCommand.cmdData.ObjectID = objID; frameCommand.cmdData.SlotType = this.SlotType; frameCommand.Send(); } else { MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor); } }
public static IFrameCommand Creator(ref CSDT_GAMING_CSSYNCINFO msg) { FrameCommand <MoveDirectionCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <MoveDirectionCommand>(); frameCommand.cmdData.Degree = msg.stCSSyncDt.get_stMove().nDegree; frameCommand.cmdData.nSeq = msg.stCSSyncDt.get_stMove().bSeq; return(frameCommand); }
public static IFrameCommand Creator(ref CSDT_GAMING_CSSYNCINFO msg) { FrameCommand <UsePositionSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UsePositionSkillCommand>(); frameCommand.cmdData.SlotType = (SkillSlotType)msg.stCSSyncDt.stPositionSkill.chSlotType; frameCommand.cmdData.Position = CommonTools.ToVector2(msg.stCSSyncDt.stPositionSkill.stPosition); return(frameCommand); }
public static IFrameCommand Creator(ref CSDT_GAMING_CSSYNCINFO msg) { FrameCommand <UseObjectiveSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseObjectiveSkillCommand>(); frameCommand.cmdData.ObjectID = (uint)msg.stCSSyncDt.get_stObjectiveSkill().iObjectID; frameCommand.cmdData.SlotType = (SkillSlotType)msg.stCSSyncDt.get_stObjectiveSkill().chSlotType; return(frameCommand); }
public static IFrameCommand Creator(ref CSDT_GAMING_CSSYNCINFO msg) { FrameCommand <UseCommonAttackCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseCommonAttackCommand>(); frameCommand.cmdData.Start = (sbyte)msg.stCSSyncDt.stBaseAttack.bStart; frameCommand.cmdData.uiRealObjID = msg.stCSSyncDt.stBaseAttack.dwObjectID; return(frameCommand); }
public static IFrameCommand Creator(ref CSDT_GAMING_CSSYNCINFO msg) { FrameCommand <UseDirectionalSkillCommand> command = FrameCommandFactory.CreateCSSyncFrameCommand <UseDirectionalSkillCommand>(); command.cmdData.Direction = CommonTools.ToVector3(msg.stCSSyncDt.stDirectionSkill.stDirection); command.cmdData.SlotType = (SkillSlotType)msg.stCSSyncDt.stDirectionSkill.chSlotType; command.cmdData.iSkillID = msg.stCSSyncDt.stDirectionSkill.iSkillID; return(command); }
public static IFrameCommand Creator(ref CSDT_GAMING_CSSYNCINFO msg) { FrameCommand <UseDirectionalSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseDirectionalSkillCommand>(); frameCommand.cmdData.Degree = msg.stCSSyncDt.stDirectionSkill.nDegree; frameCommand.cmdData.SlotType = (SkillSlotType)msg.stCSSyncDt.stDirectionSkill.chSlotType; frameCommand.cmdData.dwObjectID = msg.stCSSyncDt.stDirectionSkill.dwObjectID; return(frameCommand); }
private bool SendRequestUseSkillDir(Skill readySkillObj) { VInt3 one = VInt3.one; BaseAttackMode currentAttackMode = this.Actor.handle.ActorControl.GetCurrentAttackMode(); FrameCommand <UseDirectionalSkillCommand> command = FrameCommandFactory.CreateCSSyncFrameCommand <UseDirectionalSkillCommand>(); if (currentAttackMode != null) { one = currentAttackMode.SelectSkillDirection(this); } command.cmdData.SlotType = this.SlotType; command.cmdData.Direction = one; command.cmdData.iSkillID = readySkillObj.SkillID; command.Send(true); return(true); }
private void SendMoveDirection(int moveDegree) { this.PreMoveDirection = moveDegree; this.ConfirmDirSndFrame = 0; this.FixtimeDirSndFrame = 0; FrameCommand <MoveDirectionCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <MoveDirectionCommand>(); frameCommand.cmdData.Degree = (short)moveDegree; if (this.nDirMoveSeq <= 255 && this.nDirMoveSeq >= 0) { Singleton <FrameSynchr> .GetInstance().m_MoveCMDSendTime[(int)this.nDirMoveSeq] = (uint)(Time.realtimeSinceStartup * 1000f); } byte nSeq; this.nDirMoveSeq = (nSeq = this.nDirMoveSeq) + 1; frameCommand.cmdData.nSeq = nSeq; frameCommand.Send(); }
private bool SendRequestUseSkillTarget(Skill readySkillObj) { uint num = 0u; BaseAttackMode currentAttackMode = this.Actor.handle.ActorControl.GetCurrentAttackMode(); FrameCommand <UseObjectiveSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseObjectiveSkillCommand>(); if (currentAttackMode != null) { num = currentAttackMode.SelectSkillTarget(this); } if (num == 0u) { return(false); } frameCommand.cmdData.ObjectID = num; frameCommand.cmdData.SlotType = this.SlotType; frameCommand.Send(); return(true); }
private bool SendRequestUseSkillPos(Skill readySkillObj) { bool flag = false; VInt3 zero = VInt3.zero; BaseAttackMode currentAttackMode = this.Actor.handle.ActorControl.GetCurrentAttackMode(); FrameCommand <UsePositionSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UsePositionSkillCommand>(); if (currentAttackMode != null) { flag = currentAttackMode.SelectSkillPos(this, out zero); } if (flag) { frameCommand.cmdData.Position = new VInt2(zero.x, zero.z); frameCommand.cmdData.SlotType = this.SlotType; frameCommand.Send(); return(true); } return(false); }
private void RequestUseSkillEnemyHeroSelectMode(uint objID) { if (objID == 0u) { return; } PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(objID); if (!actor || actor.handle.ActorControl.IsDeadState) { return; } if (this.CanUseSkillWithEnemyHeroSelectMode()) { Skill arg_5C_0 = (this.NextSkillObj != null) ? this.NextSkillObj : this.SkillObj; FrameCommand <UseObjectiveSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseObjectiveSkillCommand>(); frameCommand.cmdData.ObjectID = objID; frameCommand.cmdData.SlotType = this.SlotType; frameCommand.Send(); } }