Ejemplo n.º 1
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerChangeUsedRecommendEquipGroupCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerChangeUsedRecommendEquipGroupCommand>();

            frameCommand.cmdData.m_group = msg.stCmdInfo.stCmdPlayerChangeUsedRecommendEquipGroup.bGroup;
            return(frameCommand);
        }
Ejemplo n.º 2
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <SwitchCaptainCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <SwitchCaptainCommand>();

            frameCommand.cmdData.ObjectID = (uint)msg.stCmdInfo.stCmdPlayerSwitchCaptain.iObjectID;
            return(frameCommand);
        }
Ejemplo n.º 3
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerChooseEquipSkillCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerChooseEquipSkillCommand>();

            frameCommand.cmdData.m_iEquipSlotIndex = (int)msg.stCmdInfo.get_stCmdPlayerChooseEquipSkill().bEquipSlotIndex;
            return(frameCommand);
        }
Ejemplo n.º 4
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <AttackActorCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <AttackActorCommand>();

            frameCommand.cmdData.ObjectID = (uint)msg.stCmdInfo.get_stCmdPlayerAttackPlayer().iObjectID;
            return(frameCommand);
        }
Ejemplo n.º 5
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerBuyEquipCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerBuyEquipCommand>();

            frameCommand.cmdData.m_equipID = msg.stCmdInfo.get_stCmdPlayerBuyEquip().wEquipID;
            return(frameCommand);
        }
Ejemplo n.º 6
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerSellEquipCommand> command = FrameCommandFactory.CreateFrameCommand <PlayerSellEquipCommand>();

            command.cmdData.m_equipIndex = msg.stCmdInfo.stCmdPlayerSellEquip.bEquipIndex;
            return(command);
        }
Ejemplo n.º 7
0
        public override void Fight()
        {
            base.Fight();
            this.AddNoAbilityFlag(ObjAbilityType.ObjAbility_Move);
            this.AddNoAbilityFlag(ObjAbilityType.ObjAbility_ImmuneCrit);
            FrameCommand <AttackPositionCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <AttackPositionCommand>();

            frameCommand.cmdId            = 1u;
            frameCommand.cmdData.WorldPos = this.actor.location;
            base.CmdAttackMoveToDest(frameCommand, this.actor.location);
            if (this.isTower)
            {
                this.HitEffect.Reset(this);
            }
            this.actor.ValueComponent.mActorValue[34].baseValue = this.actor.TheStaticData.TheOrganOnlyInfo.PhyArmorHurtRate;
            this._aroundEnemyMonsterCount = 0;
            ValueDataInfo valueDataInfo = this.actor.ValueComponent.mActorValue[3] + this.actor.TheStaticData.TheOrganOnlyInfo.NoEnemyAddPhyDef;

            valueDataInfo = this.actor.ValueComponent.mActorValue[4] + this.actor.TheStaticData.TheOrganOnlyInfo.NoEnemyAddMgcDef;
            if (this.actor.HorizonMarker != null)
            {
                if (FogOfWar.enable)
                {
                    if (this.GetActorSubType() == 1 || this.GetActorSubType() == 4)
                    {
                        this.actor.HorizonMarker.SightRadius = Horizon.QueryFowTowerSightRadius();
                    }
                    this.TarEyeList_ = new List <PoolObjHandle <ActorRoot> >();
                }
                else
                {
                    this.actor.HorizonMarker.SightRadius = this.actor.TheStaticData.TheOrganOnlyInfo.HorizonRadius;
                }
            }
        }
Ejemplo n.º 8
0
 public void RequestBuyEquip()
 {
     if (((uint)m_frame + m_wrapper.actor.ObjID) % 30 == 0)
     {
         //CBattleEquipSystem battleEquipSystem = (CBattleEquipSystem)CBattleSystem.instance.m_battleEquipSystem;
         //if (battleEquipSystem == null)
         //{
         //    return;
         //}
         m_wrapper.actor.pEquipCtrl.GetQuicklyBuyEquipList();
         {
             for (int i = 0; i < m_wrapper.actor.pEquipCtrl.retlist.Length; i++)
             {
                 if (m_wrapper.actor.pEquipCtrl.retlist[i] > 0)
                 {
                     FrameCommand <PlayerBuyEquipCommand>   frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerBuyEquipCommand>();
                     MGFrameCommand <PlayerBuyEquipCommand> cmd          = SmartReferencePool.instance.Fetch <MGFrameCommand <PlayerBuyEquipCommand> >();
                     frameCommand.cmdData.m_equipID = m_wrapper.actor.pEquipCtrl.retlist[i];
                     cmd.SetFrameCommand(ref frameCommand);
                     cmd.playerID = CPlayerManager.instance.HostPlayerId;
                     GameDefine.BattleNetHandler.WriteMsg(cmd);
                     break;
                 }
             }
         }
     }
 }
Ejemplo n.º 9
0
        private void SendMoveDirection(int moveDegree, uint playerId = 0)
        {
            byte num;

            if (playerId == 0)
            {
                Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

                if (hostPlayer == null)
                {
                    return;
                }
                playerId = hostPlayer.PlayerId;
            }
            this.PreMoveDirection   = moveDegree;
            this.ConfirmDirSndFrame = 0;
            this.FixtimeDirSndFrame = 0;
            FrameCommand <MoveDirectionCommand> command = FrameCommandFactory.CreateFrameCommand <MoveDirectionCommand>();

            command.playerID       = playerId;
            command.cmdData.Degree = (short)moveDegree;
            this.nDirMoveSeq       = (byte)((num = this.nDirMoveSeq) + 1);
            command.cmdData.nSeq   = num;
            command.Send();
        }
Ejemplo n.º 10
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerSellEquipCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerSellEquipCommand>();

            frameCommand.cmdData.m_equipIndex = (int)msg.stCmdInfo.get_stCmdPlayerSellEquip().bEquipIndex;
            return(frameCommand);
        }
Ejemplo n.º 11
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerAttackOrganCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerAttackOrganCommand>();

            frameCommand.cmdData.attackOrganMode = msg.stCmdInfo.stCmdPlayAttackOrganMode.bAttackOrganMode;
            return(frameCommand);
        }
Ejemplo n.º 12
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayLastHitModeCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayLastHitModeCommand>();

            frameCommand.cmdData.LastHitMode = msg.stCmdInfo.get_stCmdPlayLastHitMode().bLastHitMode;
            return(frameCommand);
        }
Ejemplo n.º 13
0
        public void SendLockAttackTarget(uint _targetID)
        {
            FrameCommand <LockAttackTargetCommand> command = FrameCommandFactory.CreateFrameCommand <LockAttackTargetCommand>();

            command.cmdData.LockAttackTarget = _targetID;
            command.Send();
        }
Ejemplo n.º 14
0
        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);
        }
Ejemplo n.º 15
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <SwitchActorSuperKillerCommand> command = FrameCommandFactory.CreateFrameCommand <SwitchActorSuperKillerCommand>();

            command.cmdData.IsSuperKiller = msg.stCmdInfo.stCmdPlayerSwitchSuperKiller.chIsSuperKiller;
            return(command);
        }
Ejemplo n.º 16
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <AttackPositionCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <AttackPositionCommand>();

            frameCommand.cmdData.WorldPos = CommonTools.ToVector3(msg.stCmdInfo.get_stCmdPlayerAttackPosition().stWorldPos);
            return(frameCommand);
        }
Ejemplo n.º 17
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <SwitchActorSwitchGodMode> command = FrameCommandFactory.CreateFrameCommand <SwitchActorSwitchGodMode>();

            command.cmdData.IsGodMode = msg.stCmdInfo.stCmdPlayerSwitchGodMode.chIsGodMode;
            return(command);
        }
Ejemplo n.º 18
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <SvrNtfChgFrameLaterCommand> command = FrameCommandFactory.CreateFrameCommand <SvrNtfChgFrameLaterCommand>();

            command.cmdData.LaterNum = msg.stCmdInfo.stCmdSvrNtfChgFrameLater.bKFrameLaterNum;
            return(command);
        }
Ejemplo n.º 19
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <LockAttackTargetCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <LockAttackTargetCommand>();

            frameCommand.cmdData.LockAttackTarget = msg.stCmdInfo.get_stCmdPlayerLockAttackTarget().dwLockAttackTarget;
            return(frameCommand);
        }
Ejemplo n.º 20
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <MoveToPosCommand> command = FrameCommandFactory.CreateFrameCommand <MoveToPosCommand>();

            command.cmdData.destPosition = CommonTools.ToVector3(msg.stCmdInfo.stCmdPlayerMove.stWorldPos);
            return(command);
        }
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerAddGoldCoinInBattleCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerAddGoldCoinInBattleCommand>();

            frameCommand.cmdData.m_addValue = msg.stCmdInfo.get_stCmdPlayerAddGoldCoinInBattle().dwAddValue;
            return(frameCommand);
        }
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <SwitchActorAutoAICommand> frameCommand = FrameCommandFactory.CreateFrameCommand <SwitchActorAutoAICommand>();

            frameCommand.cmdData.IsAutoAI = msg.stCmdInfo.get_stCmdPlayerSwithAutoAI().chIsAutoAI;
            return(frameCommand);
        }
Ejemplo n.º 23
0
        public override void Process(AGE.Action _action, Track _track)
        {
            Vector3    targetPos  = this.TargetPos;
            GameObject gameObject = _action.GetGameObject(this.destId);

            if (gameObject != null)
            {
                targetPos = gameObject.transform.position;
            }
            Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.srcId);

            if ((actorHandle == 0) || ((hostPlayer.Captain != 0) && (actorHandle == hostPlayer.Captain)))
            {
                if (hostPlayer.Captain.handle.ActorControl != null)
                {
                    FrameCommandFactory.CreateFrameCommand <StopMoveCommand>().Send();
                    FrameCommand <MoveToPosCommand> command2 = FrameCommandFactory.CreateFrameCommand <MoveToPosCommand>();
                    command2.cmdData.destPosition = (VInt3)targetPos;
                    command2.Send();
                }
            }
            else if (actorHandle != 0)
            {
                actorHandle.handle.ActorControl.RealMovePosition((VInt3)targetPos, 0);
            }
        }
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerCheatCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerCheatCommand>();

            frameCommand.cmdData.CheatType = msg.stCmdInfo.stCmdPlayerCheat.bCheatType;
            return(frameCommand);
        }
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerInOutEquipShopCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerInOutEquipShopCommand>();

            frameCommand.cmdData.m_inOut = msg.stCmdInfo.get_stCmdPlayerInOutEquipShop().bInOut;
            return(frameCommand);
        }
Ejemplo n.º 26
0
        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);
                }
            }
        }
Ejemplo n.º 27
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <SvrNtfGameOverCommand> command = FrameCommandFactory.CreateFrameCommand <SvrNtfGameOverCommand>();

            command.cmdData.m_bWinCamp = msg.stCmdInfo.stCmdSvrNtfGameover.bWinCamp;
            return(command);
        }
Ejemplo n.º 28
0
        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);
            }
        }
Ejemplo n.º 29
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayAttackTargetModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayAttackTargetModeCommand>();

            command.cmdData.AttackTargetMode = msg.stCmdInfo.stCmdPlayerAttackTargetMode.chAttackTargetMode;
            return(command);
        }
Ejemplo n.º 30
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayCommonAttackModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayCommonAttackModeCommand>();

            command.cmdData.CommonAttackMode = msg.stCmdInfo.stCmdPlayCommonAttackMode.bCommonAttackMode;
            return(command);
        }