Exemplo n.º 1
0
 private static void SendPlayerCommonAttackMode()
 {
     if (!Singleton <WatchController> .GetInstance().IsWatching)
     {
         FrameCommand <PlayCommonAttackModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayCommonAttackModeCommand>();
         command.cmdData.CommonAttackMode = (byte)_normalAttackType;
         command.Send();
     }
 }
Exemplo n.º 2
0
 private static void SendPlayerAttackTargetMode()
 {
     if (!Singleton <WatchController> .GetInstance().IsWatching)
     {
         FrameCommand <PlayAttackTargetModeCommand> command = FrameCommandFactory.CreateFrameCommand <PlayAttackTargetModeCommand>();
         command.cmdData.AttackTargetMode = (sbyte)_selectType;
         command.Send();
     }
 }
Exemplo n.º 3
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();
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
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();
        }
Exemplo n.º 6
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);
            }
        }
Exemplo n.º 7
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);
            }
        }
Exemplo n.º 8
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);
            }
        }
Exemplo n.º 9
0
        private void HandleClientClientSyncCommand(uint dwFrqNo, CSDT_FRAPBOOT_CC ccSynDt)
        {
            int           usedSize = 0;
            FRAME_CMD_PKG msg      = new FRAME_CMD_PKG();

            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);
                }
            }
        }
Exemplo n.º 10
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!");
                }
            }
        }