Esempio n. 1
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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
        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);
        }
Esempio n. 6
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);
        }
Esempio n. 7
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);
        }
        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);
        }
 public bool TransProtocol(FRAME_CMD_PKG msg)
 {
     msg.stCmdInfo.stCmdSignalMiniMapPosition.bSignalID = this.m_signalID;
     CommonTools.FromVector3(this.m_worldPos, ref msg.stCmdInfo.stCmdSignalMiniMapPosition.stWorldPos);
     msg.stCmdInfo.stCmdSignalMiniMapPosition.bElementType = this.m_elementType;
     return(true);
 }
Esempio n. 10
0
 public bool TransProtocol(ref FRAME_CMD_PKG msg)
 {
     msg.stCmdInfo.stCmdPlayerLearnSkill.dwHeroObjID = this.dwHeroID;
     msg.stCmdInfo.stCmdPlayerLearnSkill.bSlotType   = this.bSlotType;
     msg.stCmdInfo.stCmdPlayerLearnSkill.bSkillLevel = this.bSkillLevel;
     return(true);
 }
Esempio n. 11
0
 private void PackCmd2Msg(ref IFrameCommand cmd, CSDT_GAMING_UPER_INFO msg)
 {
     if (cmd.isCSSync)
     {
         msg.bType    = 2;
         msg.dwCmdSeq = cmd.cmdId;
         msg.stUperDt.construct((long)msg.bType);
         msg.stUperDt.get_stCSInfo().stCSSyncDt.construct((long)cmd.cmdType);
         cmd.TransProtocol(msg.stUperDt.get_stCSInfo());
     }
     else
     {
         msg.bType    = 1;
         msg.dwCmdSeq = cmd.cmdId;
         msg.stUperDt.construct((long)msg.bType);
         msg.stUperDt.get_stCCInfo().construct();
         FRAME_CMD_PKG fRAME_CMD_PKG = FrameCommandFactory.CreateCommandPKG(cmd);
         cmd.TransProtocol(fRAME_CMD_PKG);
         int num = 0;
         TdrError.ErrorType errorType     = fRAME_CMD_PKG.pack(ref msg.stUperDt.get_stCCInfo().szBuff, 64, ref num, 0u);
         msg.stUperDt.get_stCCInfo().wLen = (ushort)num;
         DebugHelper.Assert(errorType == 0);
         fRAME_CMD_PKG.Release();
     }
 }
        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);
        }
Esempio n. 13
0
 public bool TransProtocol(FRAME_CMD_PKG msg)
 {
     msg.stCmdInfo.stCmdSignalMiniMapTarget.bType         = this.m_type;
     msg.stCmdInfo.stCmdSignalMiniMapTarget.bSignalID     = this.m_signalID;
     msg.stCmdInfo.stCmdSignalMiniMapTarget.dwTargetObjID = this.m_targetObjID;
     return(true);
 }
Esempio n. 14
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);
        }
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerCheatCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayerCheatCommand>();

            frameCommand.cmdData.CheatType = msg.stCmdInfo.stCmdPlayerCheat.bCheatType;
            return(frameCommand);
        }
Esempio n. 16
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);
        }
Esempio n. 17
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);
        }
        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);
        }
Esempio n. 19
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);
        }
Esempio n. 20
0
 public bool TransProtocol(ref FRAME_CMD_PKG msg)
 {
     msg.stCmdInfo.stCmdPlayerLearnTalent.dwHeroObjID   = this.HeroObjID;
     msg.stCmdInfo.stCmdPlayerLearnTalent.chTalentLevel = this.TalentLevelIndex;
     msg.stCmdInfo.stCmdPlayerLearnTalent.dwTalentID    = this.TalentID;
     return(true);
 }
        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);
        }
Esempio n. 22
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);
        }
        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);
        }
Esempio n. 24
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);
        }
Esempio n. 25
0
        private static void HandleClientClientSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_CC ccSynDt)
        {
            int           usedSize = 0;
            FRAME_CMD_PKG msg      = FRAME_CMD_PKG.New();

            TdrError.ErrorType type = msg.unpack(ref ccSynDt.stSyncInfo.szBuff, ccSynDt.stSyncInfo.wLen, ref usedSize, 0);
            DebugHelper.Assert(type == TdrError.ErrorType.TDR_NO_ERROR);
            if (type == TdrError.ErrorType.TDR_NO_ERROR)
            {
                IFrameCommand command = FrameCommandFactory.CreateFrameCommand(ref msg);
                if (command != null)
                {
                    command.playerID = ccSynDt.dwObjID;
                    command.frameNum = dwFrqNo;
                    Singleton <FrameSynchr> .GetInstance().PushFrameCommand(command);
                }
                else
                {
                    _frameExceptionCounter = (byte)(_frameExceptionCounter + 1);
                    if (_frameExceptionCounter <= 30)
                    {
                        BuglyAgent.ReportException(new Exception("CreateFrameCommandException"), "create ccSync frame command error!");
                    }
                }
            }
            else
            {
                _frameExceptionCounter = (byte)(_frameExceptionCounter + 1);
                if (_frameExceptionCounter <= 30)
                {
                    BuglyAgent.ReportException(new Exception("TdrUnpackException"), "CCSync unpack error!");
                }
            }
            msg.Release();
        }
Esempio n. 26
0
        private static void HandleClientClientSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_CC ccSynDt)
        {
            int           num           = 0;
            FRAME_CMD_PKG fRAME_CMD_PKG = FRAME_CMD_PKG.New();

            TdrError.ErrorType errorType = fRAME_CMD_PKG.unpack(ref ccSynDt.stSyncInfo.szBuff, (int)ccSynDt.stSyncInfo.wLen, ref num, 0u);
            DebugHelper.Assert(errorType == 0);
            if (errorType == null)
            {
                IFrameCommand frameCommand = FrameCommandFactory.CreateFrameCommand(ref fRAME_CMD_PKG);
                if (frameCommand != null)
                {
                    frameCommand.playerID = ccSynDt.dwObjID;
                    frameCommand.frameNum = dwFrqNo;
                    Singleton <FrameSynchr> .GetInstance().PushFrameCommand(frameCommand);
                }
                else if ((FrameWindow._frameExceptionCounter += 1) <= 30)
                {
                    BuglyAgent.ReportException(new Exception("CreateFrameCommandException"), "create ccSync frame command error!");
                }
            }
            else if ((FrameWindow._frameExceptionCounter += 1) <= 30)
            {
                BuglyAgent.ReportException(new Exception("TdrUnpackException"), "CCSync unpack error!");
            }
            fRAME_CMD_PKG.Release();
        }
Esempio 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);
        }
        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);
        }
Esempio 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);
        }
Esempio n. 30
0
        public static IFrameCommand Creator(ref FRAME_CMD_PKG msg)
        {
            FrameCommand <PlayerBuyHorizonEquipCommand> command = FrameCommandFactory.CreateFrameCommand <PlayerBuyHorizonEquipCommand>();

            command.cmdData.m_equipID = msg.stCmdInfo.stCmdPlayerBuyHorizonEquip.wEquipID;
            return(command);
        }