Esempio n. 1
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. 2
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!");
                }
            }
        }