Esempio n. 1
0
        private static void SendPlayerCommonAttackMode()
        {
            FrameCommand <PlayCommonAttackModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayCommonAttackModeCommand>();

            command.cmdData.CommonAttackMode = (byte)_normalAttackType;
            command.Send();
        }
Esempio n. 2
0
        private static void SendPlayerAttackTargetMode()
        {
            FrameCommand <PlayAttackTargetModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayAttackTargetModeCommand>();

            command.cmdData.AttackTargetMode = (sbyte)_selectType;
            command.Send();
        }
Esempio n. 3
0
 private static void SendPlayerCommonAttackMode()
 {
     if (!Singleton <WatchController> .GetInstance().IsWatching)
     {
         FrameCommand <PlayCommonAttackModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayCommonAttackModeCommand>();
         command.cmdData.CommonAttackMode = (byte)_normalAttackType;
         command.Send();
     }
 }
Esempio n. 4
0
 private static void SendPlayerAttackTargetMode()
 {
     if (!Singleton <WatchController> .GetInstance().IsWatching)
     {
         FrameCommand <PlayAttackTargetModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayAttackTargetModeCommand>();
         command.cmdData.AttackTargetMode = (sbyte)_selectType;
         command.Send();
     }
 }
Esempio n. 5
0
        private static void SendPlayerCommonAttackMode()
        {
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                return;
            }
            FrameCommand <PlayCommonAttackModeCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayCommonAttackModeCommand>();

            frameCommand.cmdData.CommonAttackMode = (byte)GameSettings._normalAttackType;
            frameCommand.Send();
        }
Esempio n. 6
0
        private static void SendPlayerLastHitMode()
        {
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                return;
            }
            FrameCommand <PlayLastHitModeCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayLastHitModeCommand>();

            frameCommand.cmdData.LastHitMode = (byte)GameSettings._lastHitMode;
            frameCommand.Send();
        }
Esempio n. 7
0
        private static void SendPlayerAttackTargetMode()
        {
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                return;
            }
            FrameCommand <PlayAttackTargetModeCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <PlayAttackTargetModeCommand>();

            frameCommand.cmdData.AttackTargetMode = (sbyte)GameSettings._selectType;
            frameCommand.Send();
        }
Esempio n. 8
0
        private static void HandleGameOverCommand(uint dwFrqNo, CSDT_FRAPBOOT_GAMEOVERNTF OverNtf)
        {
            IFrameCommand command = null;
            FrameCommand <SvrNtfGameOverCommand> command2 = FrameCommandFactory.CreateFrameCommand <SvrNtfGameOverCommand>();

            command2.cmdData.m_bWinCamp = OverNtf.bWinCamp;
            command = command2;
            if (command != null)
            {
                command.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(command);
            }
        }
Esempio n. 9
0
        private static void HandleGameOverCommand(uint dwFrqNo, CSDT_FRAPBOOT_GAMEOVERNTF OverNtf)
        {
            FrameCommand <SvrNtfGameOverCommand> frameCommand = FrameCommandFactory.CreateSCSyncFrameCommand <SvrNtfGameOverCommand>();

            frameCommand.cmdData.m_bWinCamp = OverNtf.bWinCamp;
            IFrameCommand frameCommand2 = frameCommand;

            if (frameCommand2 != null)
            {
                frameCommand2.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(frameCommand2);
            }
        }
Esempio n. 10
0
        private void HandleAIChgSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_AISTATE AIState)
        {
            IFrameCommand command = null;
            FrameCommand <AutoAIChgCommand> command2 = FrameCommandFactory.CreateFrameCommand <AutoAIChgCommand>();

            command2.cmdData.m_autoType = AIState.bType;
            command2.cmdData.m_playerID = AIState.dwPlayerObjID;
            command = command2;
            if (command != null)
            {
                command.playerID = AIState.dwPlayerObjID;
                command.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(command);
            }
        }
Esempio n. 11
0
        private void HandleAssistChgSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_ASSISTSTATE assistChgState)
        {
            IFrameCommand command = null;
            FrameCommand <AssistStateChgCommand> command2 = FrameCommandFactory.CreateFrameCommand <AssistStateChgCommand>();

            command2.cmdData.m_chgType        = assistChgState.bType;
            command2.cmdData.m_aiPlayerID     = assistChgState.dwAiPlayerObjID;
            command2.cmdData.m_masterPlayerID = assistChgState.dwMasterObjID;
            command = command2;
            if (command != null)
            {
                command.playerID = assistChgState.dwAiPlayerObjID;
                command.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(command);
            }
        }
Esempio n. 12
0
        private static void HandleGamePauseCommand(uint dwFrqNo, CSDT_FRAPBOOT_PAUSE pauseNtf)
        {
            FrameCommand <PauseResumeGameCommand> frameCommand = FrameCommandFactory.CreateSCSyncFrameCommand <PauseResumeGameCommand>();

            frameCommand.cmdData.PauseCommand   = pauseNtf.bType;
            frameCommand.cmdData.PauseByCamp    = pauseNtf.bCamp;
            frameCommand.cmdData.CampPauseTimes = new byte[pauseNtf.szCampPauseNum.Length];
            Buffer.BlockCopy(pauseNtf.szCampPauseNum, 0, frameCommand.cmdData.CampPauseTimes, 0, pauseNtf.szCampPauseNum.Length);
            IFrameCommand frameCommand2 = frameCommand;

            if (frameCommand2 != null)
            {
                frameCommand2.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(frameCommand2);
            }
        }
Esempio n. 13
0
        private static void HandleAIChgSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_AISTATE AIState)
        {
            FrameCommand <AutoAIChgCommand> frameCommand = FrameCommandFactory.CreateSCSyncFrameCommand <AutoAIChgCommand>();

            frameCommand.cmdData.m_autoType = AIState.bType;
            frameCommand.cmdData.m_playerID = AIState.dwPlayerObjID;
            IFrameCommand frameCommand2 = frameCommand;

            if (frameCommand2 != null)
            {
                frameCommand2.playerID = AIState.dwPlayerObjID;
                frameCommand2.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(frameCommand2);
            }
            else if ((FrameWindow._frameExceptionCounter += 1) <= 30)
            {
                BuglyAgent.ReportException(new Exception("CreateFrameCommandException"), "create aiChange frame command error!");
            }
        }
Esempio n. 14
0
        private static void HandleAIChgSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_AISTATE AIState)
        {
            IFrameCommand command = null;
            FrameCommand <AutoAIChgCommand> command2 = FrameCommandFactory.CreateFrameCommand <AutoAIChgCommand>();

            command2.cmdData.m_autoType = AIState.bType;
            command2.cmdData.m_playerID = AIState.dwPlayerObjID;
            command = command2;
            if (command != null)
            {
                command.playerID = AIState.dwPlayerObjID;
                command.frameNum = dwFrqNo;
                Singleton <FrameSynchr> .GetInstance().PushFrameCommand(command);
            }
            else
            {
                _frameExceptionCounter = (byte)(_frameExceptionCounter + 1);
                if (_frameExceptionCounter <= 30)
                {
                    BuglyAgent.ReportException(new Exception("CreateFrameCommandException"), "create aiChange frame command error!");
                }
            }
        }