Пример #1
0
        public void ReportPingToBeacon()
        {
            List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >();

            list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            if (NetworkAccelerator.started)
            {
                if (NetworkAccelerator.isAccerating())
                {
                    list.Add(new KeyValuePair <string, string>("AccState", "Acc"));
                }
                else
                {
                    list.Add(new KeyValuePair <string, string>("AccState", "Direct"));
                }
            }
            else
            {
                list.Add(new KeyValuePair <string, string>("AccState", "Off"));
            }
            this.m_PingAverage  = 0;
            this.m_PingVariance = 0;
            if (this.m_pingRecords != null && this.m_pingRecords.get_Count() > 100)
            {
                double num = 0.0;
                for (int i = 0; i < this.m_pingRecords.get_Count(); i++)
                {
                    num += this.m_pingRecords.get_Item(i);
                }
                double num2 = num / (double)this.m_pingRecords.get_Count();
                int    num3 = Mathf.FloorToInt((float)num2 / 100f) * 100;
                this.m_PingAverage = num3;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingAverage_" + num3.ToString(), list, true);

                num = 0.0;
                for (int j = 0; j < this.m_pingRecords.get_Count(); j++)
                {
                    num += Math.Pow(this.m_pingRecords.get_Item(j) - num2, 2.0);
                }
                num2 = num / (double)this.m_pingRecords.get_Count();
                num3 = Mathf.FloorToInt((float)num2 / 1000f) * 1000;
                this.m_PingVariance = num3;
                if (num3 <= 10000)
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingVariance_" + num3.ToString(), list, true);
                }
                else
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingVariance_>10000", list, true);
                }
            }
            int value = 0;

            if (this.m_pingWobble != null && this.m_pingWobble.get_Count() > 100)
            {
                int num4 = 0;
                for (int k = 0; k < this.m_pingWobble.get_Count(); k++)
                {
                    if (Mathf.Abs(this.m_pingWobble.get_Item(k)) <= 100f)
                    {
                        num4++;
                    }
                }
                value = Mathf.FloorToInt((float)num4 / (float)this.m_pingWobble.get_Count() * 100f / 10f) * 10;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingWobble<100_" + value.ToString() + "%", list, true);
            }
            if (NetworkAccelerator.started && NetworkAccelerator.isAccerating())
            {
                PlayerPrefs.SetInt("ACC_PING_AVERAGE", this.m_PingAverage);
                PlayerPrefs.SetInt("ACC_PING_VARIANCE", this.m_PingVariance);
                PlayerPrefs.SetInt("ACC_PING_WOBBLE", value);
            }
            else
            {
                PlayerPrefs.SetInt("NOACC_PING_AVERAGE", this.m_PingAverage);
                PlayerPrefs.SetInt("NOACC_PING_VARIANCE", this.m_PingVariance);
                PlayerPrefs.SetInt("NOACC_PING_WOBBLE", value);
            }
            if (PlayerPrefs.HasKey("ACC_PING_AVERAGE") && PlayerPrefs.HasKey("NOACC_PING_AVERAGE"))
            {
                List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> >();
                list2.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
                list2.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
                list2.Add(new KeyValuePair <string, string>("pingAccRate", ((float)PlayerPrefs.GetInt("NOACC_PING_AVERAGE") / (float)PlayerPrefs.GetInt("ACC_PING_AVERAGE")).ToString()));
                list2.Add(new KeyValuePair <string, string>("pingAccDiff", (PlayerPrefs.GetInt("NOACC_PING_AVERAGE") - PlayerPrefs.GetInt("ACC_PING_AVERAGE")).ToString()));
                list2.Add(new KeyValuePair <string, string>("pingVarienceRate", ((float)PlayerPrefs.GetInt("NOACC_PING_VARIANCE") / (float)PlayerPrefs.GetInt("ACC_PING_VARIANCE")).ToString()));
                list2.Add(new KeyValuePair <string, string>("pingWobbleRate", ((float)PlayerPrefs.GetInt("ACC_PING_WOBBLE") / (float)PlayerPrefs.GetInt("NOACC_PING_WOBBLE")).ToString()));
                list2.Add(new KeyValuePair <string, string>("g_version ", "Service" + CVersion.GetResourceVersion()));
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("NetAccStatistics", list2, true);
            }
        }
Пример #2
0
        public void ReportPingToBeacon()
        {
            List <KeyValuePair <string, string> > events = new List <KeyValuePair <string, string> > {
                new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()),
                new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString())
            };

            if (NetworkAccelerator.started)
            {
                if (NetworkAccelerator.isAccerating())
                {
                    events.Add(new KeyValuePair <string, string>("AccState", "Acc"));
                }
                else
                {
                    events.Add(new KeyValuePair <string, string>("AccState", "Direct"));
                }
            }
            else
            {
                events.Add(new KeyValuePair <string, string>("AccState", "Off"));
            }
            this.m_PingAverage  = 0;
            this.m_PingVariance = 0;
            if ((this.m_pingRecords != null) && (this.m_pingRecords.Count > 100))
            {
                double num  = 0.0;
                double num2 = 0.0;
                for (int i = 0; i < this.m_pingRecords.Count; i++)
                {
                    num += (double)this.m_pingRecords[i];
                }
                num2 = num / ((double)this.m_pingRecords.Count);
                int num4 = Mathf.FloorToInt(((float)num2) / 50f) * 50;
                this.m_PingAverage = num4;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingAverage_" + num4.ToString(), events, true);

                num = 0.0;
                for (int j = 0; j < this.m_pingRecords.Count; j++)
                {
                    num += Math.Pow(((double)this.m_pingRecords[j]) - num2, 2.0);
                }
                num2 = num / ((double)this.m_pingRecords.Count);
                num4 = Mathf.FloorToInt(((float)num2) / 1000f) * 0x3e8;
                this.m_PingVariance = num4;
                if (num4 <= 0x2710)
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingVariance_" + num4.ToString(), events, true);
                }
                else
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingVariance_>10000", events, true);
                }
            }
            int num6 = 0;

            if ((this.m_pingWobble != null) && (this.m_pingWobble.Count > 100))
            {
                int num7 = 0;
                for (int k = 0; k < this.m_pingWobble.Count; k++)
                {
                    if (Mathf.Abs((float)((double)this.m_pingWobble[k])) <= 100f)
                    {
                        num7++;
                    }
                }
                num6 = Mathf.FloorToInt(((((float)num7) / ((float)this.m_pingWobble.Count)) * 100f) / 10f) * 10;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("PingWobble<100_" + num6.ToString() + "%", events, true);
            }
            if (NetworkAccelerator.started && NetworkAccelerator.isAccerating())
            {
                PlayerPrefs.SetInt("ACC_PING_AVERAGE", this.m_PingAverage);
                PlayerPrefs.SetInt("ACC_PING_VARIANCE", this.m_PingVariance);
                PlayerPrefs.SetInt("ACC_PING_WOBBLE", num6);
            }
            else
            {
                PlayerPrefs.SetInt("NOACC_PING_AVERAGE", this.m_PingAverage);
                PlayerPrefs.SetInt("NOACC_PING_VARIANCE", this.m_PingVariance);
                PlayerPrefs.SetInt("NOACC_PING_WOBBLE", num6);
            }
            if (PlayerPrefs.HasKey("ACC_PING_AVERAGE") && PlayerPrefs.HasKey("NOACC_PING_AVERAGE"))
            {
                List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> > {
                    new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()),
                    new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString())
                };
                float num9 = ((float)PlayerPrefs.GetInt("NOACC_PING_AVERAGE")) / ((float)PlayerPrefs.GetInt("ACC_PING_AVERAGE"));
                list2.Add(new KeyValuePair <string, string>("pingAccRate", num9.ToString()));
                int num10 = PlayerPrefs.GetInt("NOACC_PING_AVERAGE") - PlayerPrefs.GetInt("ACC_PING_AVERAGE");
                list2.Add(new KeyValuePair <string, string>("pingAccDiff", num10.ToString()));
                float num11 = ((float)PlayerPrefs.GetInt("NOACC_PING_VARIANCE")) / ((float)PlayerPrefs.GetInt("ACC_PING_VARIANCE"));
                list2.Add(new KeyValuePair <string, string>("pingVarienceRate", num9.ToString()));
                float num12 = ((float)PlayerPrefs.GetInt("ACC_PING_WOBBLE")) / ((float)PlayerPrefs.GetInt("NOACC_PING_WOBBLE"));
                list2.Add(new KeyValuePair <string, string>("pingWobbleRate", num12.ToString()));
                list2.Add(new KeyValuePair <string, string>("g_version ", "Service" + CVersion.GetResourceVersion()));
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("NetAccStatistics", list2, true);
            }
        }
        public void DoApolloReport()
        {
            string openID = Singleton <ApolloHelper> .GetInstance().GetOpenID();

            int mapId = Singleton <GameContextEx> .GetInstance().GameContextCommonInfo.MapId;

            COM_GAME_TYPE gameType = Singleton <GameContextEx> .GetInstance().GameContextCommonInfo.GameType;

            List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >();

            list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list.Add(new KeyValuePair <string, string>("openid", openID));
            list.Add(new KeyValuePair <string, string>("GameType", gameType.ToString()));
            list.Add(new KeyValuePair <string, string>("MapID", mapId.ToString()));
            list.Add(new KeyValuePair <string, string>("LoadingTime", Singleton <GameBuilderEx> .GetInstance().LastLoadingTime.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_LoadingBattle", list, true);

            List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> >();

            list2.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list2.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list2.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list2.Add(new KeyValuePair <string, string>("openid", openID));
            list2.Add(new KeyValuePair <string, string>("totaltime", Singleton <CHeroSelectBaseSystem> .instance.m_fOpenHeroSelectForm.ToString()));
            list2.Add(new KeyValuePair <string, string>("gameType", gameType.ToString()));
            list2.Add(new KeyValuePair <string, string>("role_list", string.Empty));
            list2.Add(new KeyValuePair <string, string>("errorCode", string.Empty));
            list2.Add(new KeyValuePair <string, string>("error_msg", string.Empty));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_EnterGame", list2, true);

            float num = Singleton <FrameSynchr> .GetInstance().LogicFrameTick * 0.001f;

            List <KeyValuePair <string, string> > list3 = new List <KeyValuePair <string, string> >();

            list3.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list3.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list3.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list3.Add(new KeyValuePair <string, string>("openid", openID));
            list3.Add(new KeyValuePair <string, string>("GameType", gameType.ToString()));
            list3.Add(new KeyValuePair <string, string>("MapID", mapId.ToString()));
            list3.Add(new KeyValuePair <string, string>("Battle_Time", num.ToString()));
            list3.Add(new KeyValuePair <string, string>("music", GameSettings.EnableMusic.ToString()));
            list3.Add(new KeyValuePair <string, string>("quality", GameSettings.RenderQuality.ToString()));
            list3.Add(new KeyValuePair <string, string>("status", "1"));
            list3.Add(new KeyValuePair <string, string>("Quality_Mode", GameSettings.ModelLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("Quality_Particle", GameSettings.ParticleLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdAverage", Singleton <FrameSynchr> .instance.m_receiveMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdMax", Singleton <FrameSynchr> .instance.m_receiveMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdAverage", Singleton <FrameSynchr> .instance.m_execMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdMax", Singleton <FrameSynchr> .instance.m_execMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("MaxEndBlockWaitNum", Singleton <FrameSynchr> .instance.m_maxEndBlockWaitNum.ToString()));
            list3.Add(new KeyValuePair <string, string>("MaxExecuteFrameOnce", Singleton <FrameSynchr> .instance.m_maxExcuteFrameOnce.ToString()));
            List <KeyValuePair <string, string> > list4 = Singleton <DataReportSys> .GetInstance().ReportFPSToBeacon();

            for (int i = 0; i < list4.get_Count(); i++)
            {
                list3.Add(list4.get_Item(i));
            }
            list3.Add(new KeyValuePair <string, string>("LOD_Down", Singleton <BattleLogic> .GetInstance().m_iAutoLODState.ToString()));
            if (NetworkAccelerator.started)
            {
                if (NetworkAccelerator.isAccerating())
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Acc"));
                }
                else
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Direct"));
                }
            }
            else
            {
                list3.Add(new KeyValuePair <string, string>("AccState", "Off"));
            }
            int num2 = 0;

            if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak&& MonoSingleton <VoiceSys> .GetInstance().UseMic)
            {
                num2 = 2;
            }
            else if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak)
            {
                num2 = 1;
            }
            list3.Add(new KeyValuePair <string, string>("Mic", num2.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_PVPBattle_Summary", list3, true);

            this._eventsLoadingTime.Clear();
            try
            {
                float num3 = (float)Singleton <DataReportSys> .GetInstance().FPS10Count / (float)Singleton <DataReportSys> .GetInstance().FPSCount;

                int   iFps10PercentNum = Mathf.CeilToInt(num3 * 100f / 10f) * 10;
                float num4             = (float)(Singleton <DataReportSys> .GetInstance().FPS10Count + Singleton <DataReportSys> .GetInstance().FPS18Count) / (float)Singleton <DataReportSys> .GetInstance().FPSCount;

                int   iFps18PercentNum = Mathf.CeilToInt(num4 * 100f / 10f) * 10;
                CSPkg cSPkg            = NetworkModule.CreateDefaultCSPKG(5000u);
                cSPkg.stPkgData.stCltPerformance.iMapID     = mapId;
                cSPkg.stPkgData.stCltPerformance.iPlayerCnt = Singleton <GamePlayerCenter> .instance.GetAllPlayers().get_Count();

                cSPkg.stPkgData.stCltPerformance.chModelLOD       = (sbyte)GameSettings.ModelLOD;
                cSPkg.stPkgData.stCltPerformance.chParticleLOD    = (sbyte)GameSettings.ParticleLOD;
                cSPkg.stPkgData.stCltPerformance.chCameraHeight   = (sbyte)GameSettings.CameraHeight;
                cSPkg.stPkgData.stCltPerformance.chEnableOutline  = (GameSettings.EnableOutline ? 1 : 0);
                cSPkg.stPkgData.stCltPerformance.iFps10PercentNum = iFps10PercentNum;
                cSPkg.stPkgData.stCltPerformance.iFps18PercentNum = iFps18PercentNum;
                cSPkg.stPkgData.stCltPerformance.iAveFps          = Singleton <DataReportSys> .GetInstance().FPSAVE;

                cSPkg.stPkgData.stCltPerformance.iPingAverage = Singleton <DataReportSys> .GetInstance().HeartPingAve;

                cSPkg.stPkgData.stCltPerformance.iPingVariance = Singleton <DataReportSys> .GetInstance().HeartPingVar;

                Utility.StringToByteArray(SystemInfo.deviceModel, ref cSPkg.stPkgData.stCltPerformance.szDeviceModel);
                Utility.StringToByteArray(SystemInfo.graphicsDeviceName, ref cSPkg.stPkgData.stCltPerformance.szGPUName);
                cSPkg.stPkgData.stCltPerformance.iCpuCoreNum    = SystemInfo.processorCount;
                cSPkg.stPkgData.stCltPerformance.iSysMemorySize = SystemInfo.systemMemorySize;
                cSPkg.stPkgData.stCltPerformance.iAvailMemory   = DeviceCheckSys.GetAvailMemory();
                Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
            }
            catch (Exception ex)
            {
                Debug.Log(ex.get_Message());
            }
        }
Пример #4
0
        public void DoApolloReport()
        {
            string openID = Singleton <ApolloHelper> .GetInstance().GetOpenID();

            int mapId = Singleton <GameContextEx> .GetInstance().GameContextCommonInfo.MapId;

            COM_GAME_TYPE gameType = Singleton <GameContextEx> .GetInstance().GameContextCommonInfo.GameType;

            List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >();

            list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list.Add(new KeyValuePair <string, string>("openid", openID));
            list.Add(new KeyValuePair <string, string>("GameType", gameType.ToString()));
            list.Add(new KeyValuePair <string, string>("MapID", mapId.ToString()));
            list.Add(new KeyValuePair <string, string>("LoadingTime", Singleton <GameBuilderEx> .GetInstance().LastLoadingTime.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_LoadingBattle", list, true);

            List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> >();

            list2.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list2.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list2.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list2.Add(new KeyValuePair <string, string>("openid", openID));
            list2.Add(new KeyValuePair <string, string>("totaltime", Singleton <CHeroSelectBaseSystem> .get_instance().m_fOpenHeroSelectForm.ToString()));
            list2.Add(new KeyValuePair <string, string>("gameType", gameType.ToString()));
            list2.Add(new KeyValuePair <string, string>("role_list", string.Empty));
            list2.Add(new KeyValuePair <string, string>("errorCode", string.Empty));
            list2.Add(new KeyValuePair <string, string>("error_msg", string.Empty));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_EnterGame", list2, true);

            float num = Singleton <FrameSynchr> .GetInstance().LogicFrameTick * 0.001f;

            Singleton <FrameSynchr> .GetInstance().PingVariance();

            List <KeyValuePair <string, string> > list3 = new List <KeyValuePair <string, string> >();

            list3.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list3.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list3.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list3.Add(new KeyValuePair <string, string>("openid", openID));
            list3.Add(new KeyValuePair <string, string>("GameType", gameType.ToString()));
            list3.Add(new KeyValuePair <string, string>("MapID", mapId.ToString()));
            list3.Add(new KeyValuePair <string, string>("Max_FPS", Singleton <CBattleSystem> .GetInstance().m_MaxBattleFPS.ToString()));
            list3.Add(new KeyValuePair <string, string>("Min_FPS", Singleton <CBattleSystem> .GetInstance().m_MinBattleFPS.ToString()));
            float num2 = -1f;

            if (Singleton <CBattleSystem> .GetInstance().m_BattleFPSCount > 0f)
            {
                num2 = Singleton <CBattleSystem> .GetInstance().m_AveBattleFPS / Singleton <CBattleSystem> .GetInstance().m_BattleFPSCount;
            }
            list3.Add(new KeyValuePair <string, string>("Avg_FPS", num2.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ab_FPS_time", Singleton <BattleLogic> .GetInstance().m_Ab_FPS_time.ToString()));
            list3.Add(new KeyValuePair <string, string>("Abnormal_FPS", Singleton <BattleLogic> .GetInstance().m_Abnormal_FPS_Count.ToString()));
            list3.Add(new KeyValuePair <string, string>("Less10FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt10.ToString()));
            list3.Add(new KeyValuePair <string, string>("Less18FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt18.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ab_4FPS_time", Singleton <BattleLogic> .GetInstance().m_Ab_4FPS_time.ToString()));
            list3.Add(new KeyValuePair <string, string>("Abnormal_4FPS", Singleton <BattleLogic> .GetInstance().m_Abnormal_4FPS_Count.ToString()));
            list3.Add(new KeyValuePair <string, string>("Min_Ping", Singleton <FrameSynchr> .get_instance().m_MinPing.ToString()));
            list3.Add(new KeyValuePair <string, string>("Max_Ping", Singleton <FrameSynchr> .get_instance().m_MaxPing.ToString()));
            list3.Add(new KeyValuePair <string, string>("Avg_Ping", Singleton <FrameSynchr> .get_instance().m_AvePing.ToString()));
            list3.Add(new KeyValuePair <string, string>("Abnormal_Ping", Singleton <FrameSynchr> .get_instance().m_Abnormal_PingCount.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ping300", Singleton <FrameSynchr> .get_instance().m_ping300Count.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ping150to300", Singleton <FrameSynchr> .get_instance().m_ping150to300.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ping150", Singleton <FrameSynchr> .get_instance().m_ping150.ToString()));
            list3.Add(new KeyValuePair <string, string>("LostpingCount", Singleton <FrameSynchr> .get_instance().m_pingLost.ToString()));
            list3.Add(new KeyValuePair <string, string>("PingSeqCount", Singleton <FrameSynchr> .get_instance().m_LastReceiveHeartSeq.ToString()));
            list3.Add(new KeyValuePair <string, string>("PingVariance", Singleton <FrameSynchr> .get_instance().m_PingVariance.ToString()));
            list3.Add(new KeyValuePair <string, string>("Battle_Time", num.ToString()));
            list3.Add(new KeyValuePair <string, string>("BattleSvr_Reconnect", Singleton <NetworkModule> .GetInstance().m_GameReconnetCount.ToString()));
            list3.Add(new KeyValuePair <string, string>("GameSvr_Reconnect", Singleton <NetworkModule> .GetInstance().m_lobbyReconnetCount.ToString()));
            list3.Add(new KeyValuePair <string, string>("music", GameSettings.EnableMusic.ToString()));
            list3.Add(new KeyValuePair <string, string>("quality", GameSettings.RenderQuality.ToString()));
            list3.Add(new KeyValuePair <string, string>("status", "1"));
            list3.Add(new KeyValuePair <string, string>("Quality_Mode", GameSettings.ModelLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("Quality_Particle", GameSettings.ParticleLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdAverage", Singleton <FrameSynchr> .get_instance().m_receiveMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdMax", Singleton <FrameSynchr> .get_instance().m_receiveMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdAverage", Singleton <FrameSynchr> .get_instance().m_execMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdMax", Singleton <FrameSynchr> .get_instance().m_execMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("LOD_Down", Singleton <BattleLogic> .GetInstance().m_iAutoLODState.ToString()));
            if (NetworkAccelerator.started)
            {
                if (NetworkAccelerator.isAccerating())
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Acc"));
                }
                else
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Direct"));
                }
            }
            else
            {
                list3.Add(new KeyValuePair <string, string>("AccState", "Off"));
            }
            int num3 = 0;

            if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak&& MonoSingleton <VoiceSys> .GetInstance().UseMic)
            {
                num3 = 2;
            }
            else if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak)
            {
                num3 = 1;
            }
            list3.Add(new KeyValuePair <string, string>("Mic", num3.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_PVPBattle_Summary", list3, true);

            this._eventsLoadingTime.Clear();
            try
            {
                float num4 = (float)Singleton <BattleLogic> .GetInstance().m_fpsCunt10 / (float)Singleton <BattleLogic> .GetInstance().m_fpsCount;

                int   iFps10PercentNum = Mathf.CeilToInt(num4 * 100f / 10f) * 10;
                float num5             = (float)(Singleton <BattleLogic> .GetInstance().m_fpsCunt18 + Singleton <BattleLogic> .GetInstance().m_fpsCunt10) / (float)Singleton <BattleLogic> .GetInstance().m_fpsCount;

                int   iFps18PercentNum = Mathf.CeilToInt(num5 * 100f / 10f) * 10;
                CSPkg cSPkg            = NetworkModule.CreateDefaultCSPKG(5000u);
                cSPkg.stPkgData.get_stCltPerformance().iMapID     = mapId;
                cSPkg.stPkgData.get_stCltPerformance().iPlayerCnt = Singleton <GamePlayerCenter> .get_instance().GetAllPlayers().get_Count();

                cSPkg.stPkgData.get_stCltPerformance().chModelLOD       = (sbyte)GameSettings.ModelLOD;
                cSPkg.stPkgData.get_stCltPerformance().chParticleLOD    = (sbyte)GameSettings.ParticleLOD;
                cSPkg.stPkgData.get_stCltPerformance().chCameraHeight   = (sbyte)GameSettings.CameraHeight;
                cSPkg.stPkgData.get_stCltPerformance().chEnableOutline  = ((!GameSettings.EnableOutline) ? 0 : 1);
                cSPkg.stPkgData.get_stCltPerformance().iFps10PercentNum = iFps10PercentNum;
                cSPkg.stPkgData.get_stCltPerformance().iFps18PercentNum = iFps18PercentNum;
                cSPkg.stPkgData.get_stCltPerformance().iAveFps          = (int)Singleton <CBattleSystem> .GetInstance().m_AveBattleFPS;

                cSPkg.stPkgData.get_stCltPerformance().iPingAverage = Singleton <FrameSynchr> .get_instance().m_PingAverage;

                cSPkg.stPkgData.get_stCltPerformance().iPingVariance = Singleton <FrameSynchr> .get_instance().m_PingVariance;

                Utility.StringToByteArray(SystemInfo.deviceModel, ref cSPkg.stPkgData.get_stCltPerformance().szDeviceModel);
                Utility.StringToByteArray(SystemInfo.graphicsDeviceName, ref cSPkg.stPkgData.get_stCltPerformance().szGPUName);
                cSPkg.stPkgData.get_stCltPerformance().iCpuCoreNum    = SystemInfo.processorCount;
                cSPkg.stPkgData.get_stCltPerformance().iSysMemorySize = SystemInfo.systemMemorySize;
                cSPkg.stPkgData.get_stCltPerformance().iAvailMemory   = DeviceCheckSys.GetAvailMemory();
                Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
            }
            catch (Exception ex)
            {
                Debug.Log(ex.get_Message());
            }
        }
Пример #5
0
        public void EndGame()
        {
            if (!Singleton <BattleLogic> .get_instance().isRuning)
            {
                return;
            }
            try
            {
                DebugHelper.CustomLog("Prepare GameBuilder EndGame");
            }
            catch (Exception)
            {
            }
            MonoSingleton <GSDKsys> .GetInstance().EndSpeed();

            Singleton <GameLogic> .GetInstance().HashCheckFreq = 500u;

            Singleton <GameLogic> .GetInstance().SnakeTraceMasks = 0u;

            Singleton <GameLogic> .GetInstance().SnakeTraceSize = 1024000u;

            Singleton <LobbyLogic> .GetInstance().StopGameEndTimer();

            Singleton <LobbyLogic> .GetInstance().StopSettleMsgTimer();

            Singleton <LobbyLogic> .GetInstance().StopSettlePanelTimer();

            MonoSingleton <GameLoader> .get_instance().AdvanceStopLoad();

            Singleton <WatchController> .GetInstance().Stop();

            Singleton <FrameWindow> .GetInstance().ResetSendCmdSeq();

            Singleton <CBattleGuideManager> .GetInstance().resetPause();

            MonoSingleton <ShareSys> .get_instance().SendQQGameTeamStateChgMsg(ShareSys.QQGameTeamEventType.end, 0, 0, 0u, string.Empty);

            Singleton <StarSystem> .GetInstance().EndGame();

            Singleton <WinLoseByStarSys> .GetInstance().EndGame();

            Singleton <CMatchingSystem> .GetInstance().EndGame();

            string openID = Singleton <ApolloHelper> .GetInstance().GetOpenID();

            List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >();

            list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list.Add(new KeyValuePair <string, string>("openid", openID));
            list.Add(new KeyValuePair <string, string>("GameType", this.m_kGameType.ToString()));
            list.Add(new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()));
            list.Add(new KeyValuePair <string, string>("LoadingTime", this.m_fLoadingTime.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_LoadingBattle", list, true);

            List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> >();

            list2.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list2.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list2.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list2.Add(new KeyValuePair <string, string>("openid", openID));
            list2.Add(new KeyValuePair <string, string>("totaltime", Singleton <CHeroSelectBaseSystem> .get_instance().m_fOpenHeroSelectForm.ToString()));
            list2.Add(new KeyValuePair <string, string>("gameType", this.m_kGameType.ToString()));
            list2.Add(new KeyValuePair <string, string>("role_list", string.Empty));
            list2.Add(new KeyValuePair <string, string>("errorCode", string.Empty));
            list2.Add(new KeyValuePair <string, string>("error_msg", string.Empty));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_EnterGame", list2, true);

            float num = Singleton <FrameSynchr> .GetInstance().LogicFrameTick * 0.001f;

            Singleton <FrameSynchr> .GetInstance().PingVariance();

            List <KeyValuePair <string, string> > list3 = new List <KeyValuePair <string, string> >();

            list3.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list3.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list3.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list3.Add(new KeyValuePair <string, string>("openid", openID));
            list3.Add(new KeyValuePair <string, string>("GameType", this.m_kGameType.ToString()));
            list3.Add(new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()));
            list3.Add(new KeyValuePair <string, string>("Max_FPS", Singleton <CBattleSystem> .GetInstance().m_MaxBattleFPS.ToString()));
            list3.Add(new KeyValuePair <string, string>("Min_FPS", Singleton <CBattleSystem> .GetInstance().m_MinBattleFPS.ToString()));
            float num2 = -1f;

            if (Singleton <CBattleSystem> .GetInstance().m_BattleFPSCount > 0f)
            {
                num2 = Singleton <CBattleSystem> .GetInstance().m_AveBattleFPS / Singleton <CBattleSystem> .GetInstance().m_BattleFPSCount;
            }
            list3.Add(new KeyValuePair <string, string>("Avg_FPS", num2.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ab_FPS_time", Singleton <BattleLogic> .GetInstance().m_Ab_FPS_time.ToString()));
            list3.Add(new KeyValuePair <string, string>("Abnormal_FPS", Singleton <BattleLogic> .GetInstance().m_Abnormal_FPS_Count.ToString()));
            list3.Add(new KeyValuePair <string, string>("Less10FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt10.ToString()));
            list3.Add(new KeyValuePair <string, string>("Less18FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt18.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ab_4FPS_time", Singleton <BattleLogic> .GetInstance().m_Ab_4FPS_time.ToString()));
            list3.Add(new KeyValuePair <string, string>("Abnormal_4FPS", Singleton <BattleLogic> .GetInstance().m_Abnormal_4FPS_Count.ToString()));
            list3.Add(new KeyValuePair <string, string>("Min_Ping", Singleton <FrameSynchr> .get_instance().m_MinPing.ToString()));
            list3.Add(new KeyValuePair <string, string>("Max_Ping", Singleton <FrameSynchr> .get_instance().m_MaxPing.ToString()));
            list3.Add(new KeyValuePair <string, string>("Avg_Ping", Singleton <FrameSynchr> .get_instance().m_AvePing.ToString()));
            list3.Add(new KeyValuePair <string, string>("Abnormal_Ping", Singleton <FrameSynchr> .get_instance().m_Abnormal_PingCount.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ping300", Singleton <FrameSynchr> .get_instance().m_ping300Count.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ping150to300", Singleton <FrameSynchr> .get_instance().m_ping150to300.ToString()));
            list3.Add(new KeyValuePair <string, string>("Ping150", Singleton <FrameSynchr> .get_instance().m_ping150.ToString()));
            list3.Add(new KeyValuePair <string, string>("LostpingCount", Singleton <FrameSynchr> .get_instance().m_pingLost.ToString()));
            list3.Add(new KeyValuePair <string, string>("PingSeqCount", Singleton <FrameSynchr> .get_instance().m_LastReceiveHeartSeq.ToString()));
            list3.Add(new KeyValuePair <string, string>("PingVariance", Singleton <FrameSynchr> .get_instance().m_PingVariance.ToString()));
            list3.Add(new KeyValuePair <string, string>("Battle_Time", num.ToString()));
            list3.Add(new KeyValuePair <string, string>("BattleSvr_Reconnect", Singleton <NetworkModule> .GetInstance().m_GameReconnetCount.ToString()));
            list3.Add(new KeyValuePair <string, string>("GameSvr_Reconnect", Singleton <NetworkModule> .GetInstance().m_lobbyReconnetCount.ToString()));
            list3.Add(new KeyValuePair <string, string>("music", GameSettings.EnableMusic.ToString()));
            list3.Add(new KeyValuePair <string, string>("quality", GameSettings.RenderQuality.ToString()));
            list3.Add(new KeyValuePair <string, string>("status", "1"));
            list3.Add(new KeyValuePair <string, string>("Quality_Mode", GameSettings.ModelLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("Quality_Particle", GameSettings.ParticleLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdAverage", Singleton <FrameSynchr> .get_instance().m_receiveMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdMax", Singleton <FrameSynchr> .get_instance().m_receiveMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdAverage", Singleton <FrameSynchr> .get_instance().m_execMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdMax", Singleton <FrameSynchr> .get_instance().m_execMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("LOD_Down", Singleton <BattleLogic> .GetInstance().m_iAutoLODState.ToString()));
            if (NetworkAccelerator.started)
            {
                if (NetworkAccelerator.isAccerating())
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Acc"));
                }
                else
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Direct"));
                }
            }
            else
            {
                list3.Add(new KeyValuePair <string, string>("AccState", "Off"));
            }
            int num3 = 0;

            if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak&& MonoSingleton <VoiceSys> .GetInstance().UseMic)
            {
                num3 = 2;
            }
            else if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak)
            {
                num3 = 1;
            }
            list3.Add(new KeyValuePair <string, string>("Mic", num3.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_PVPBattle_Summary", list3, true);

            this.m_eventsLoadingTime.Clear();
            try
            {
                float num4 = (float)Singleton <BattleLogic> .GetInstance().m_fpsCunt10 / (float)Singleton <BattleLogic> .GetInstance().m_fpsCount;

                int   iFps10PercentNum = Mathf.CeilToInt(num4 * 100f / 10f) * 10;
                float num5             = (float)(Singleton <BattleLogic> .GetInstance().m_fpsCunt18 + Singleton <BattleLogic> .GetInstance().m_fpsCunt10) / (float)Singleton <BattleLogic> .GetInstance().m_fpsCount;

                int   iFps18PercentNum = Mathf.CeilToInt(num5 * 100f / 10f) * 10;
                CSPkg cSPkg            = NetworkModule.CreateDefaultCSPKG(5000u);
                cSPkg.stPkgData.get_stCltPerformance().iMapID     = this.m_iMapId;
                cSPkg.stPkgData.get_stCltPerformance().iPlayerCnt = Singleton <GamePlayerCenter> .get_instance().GetAllPlayers().get_Count();

                cSPkg.stPkgData.get_stCltPerformance().chModelLOD       = (sbyte)GameSettings.ModelLOD;
                cSPkg.stPkgData.get_stCltPerformance().chParticleLOD    = (sbyte)GameSettings.ParticleLOD;
                cSPkg.stPkgData.get_stCltPerformance().chCameraHeight   = (sbyte)GameSettings.CameraHeight;
                cSPkg.stPkgData.get_stCltPerformance().chEnableOutline  = ((!GameSettings.EnableOutline) ? 0 : 1);
                cSPkg.stPkgData.get_stCltPerformance().iFps10PercentNum = iFps10PercentNum;
                cSPkg.stPkgData.get_stCltPerformance().iFps18PercentNum = iFps18PercentNum;
                cSPkg.stPkgData.get_stCltPerformance().iAveFps          = (int)Singleton <CBattleSystem> .GetInstance().m_AveBattleFPS;

                cSPkg.stPkgData.get_stCltPerformance().iPingAverage = Singleton <FrameSynchr> .get_instance().m_PingAverage;

                cSPkg.stPkgData.get_stCltPerformance().iPingVariance = Singleton <FrameSynchr> .get_instance().m_PingVariance;

                Utility.StringToByteArray(SystemInfo.deviceModel, ref cSPkg.stPkgData.get_stCltPerformance().szDeviceModel);
                Utility.StringToByteArray(SystemInfo.graphicsDeviceName, ref cSPkg.stPkgData.get_stCltPerformance().szGPUName);
                cSPkg.stPkgData.get_stCltPerformance().iCpuCoreNum    = SystemInfo.processorCount;
                cSPkg.stPkgData.get_stCltPerformance().iSysMemorySize = SystemInfo.systemMemorySize;
                cSPkg.stPkgData.get_stCltPerformance().iAvailMemory   = DeviceCheckSys.GetAvailMemory();
                cSPkg.stPkgData.get_stCltPerformance().iIsTongCai     = ((!MonoSingleton <CTongCaiSys> .GetInstance().IsCanUseTongCai()) ? 0 : 1);
                int iIsSpeedUp;
                if (NetworkAccelerator.started)
                {
                    if (NetworkAccelerator.isAccerating())
                    {
                        iIsSpeedUp = 1;
                    }
                    else
                    {
                        iIsSpeedUp = 2;
                    }
                }
                else
                {
                    iIsSpeedUp = 0;
                }
                if (MonoSingleton <GSDKsys> .GetInstance().enabled)
                {
                    iIsSpeedUp = 4;
                }
                cSPkg.stPkgData.get_stCltPerformance().iIsSpeedUp = iIsSpeedUp;
                Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
            }
            catch (Exception ex)
            {
                Debug.Log(ex.get_Message());
            }
            MonoSingleton <DialogueProcessor> .GetInstance().Uninit();

            Singleton <TipProcessor> .GetInstance().Uninit();

            Singleton <LobbyLogic> .get_instance().inMultiRoom = false;

            Singleton <LobbyLogic> .get_instance().inMultiGame = false;

            Singleton <LobbyLogic> .GetInstance().reconnGameInfo = null;

            Singleton <BattleLogic> .GetInstance().isRuning = false;

            Singleton <BattleLogic> .GetInstance().isFighting = false;

            Singleton <BattleLogic> .GetInstance().isGameOver = false;

            Singleton <BattleLogic> .GetInstance().isWaitMultiStart = false;

            Singleton <NetworkModule> .GetInstance().CloseGameServerConnect(true);

            Singleton <ShenFuSystem> .get_instance().ClearAll();

            MonoSingleton <ActionManager> .GetInstance().ForceStop();

            Singleton <GameObjMgr> .GetInstance().ClearActor();

            Singleton <SceneManagement> .GetInstance().Clear();

            MonoSingleton <SceneMgr> .GetInstance().ClearAll();

            Singleton <GamePlayerCenter> .GetInstance().ClearAllPlayers();

            Singleton <ActorDataCenter> .get_instance().ClearHeroServerData();

            Singleton <FrameSynchr> .GetInstance().ResetSynchr();

            Singleton <GameReplayModule> .GetInstance().OnGameEnd();

            Singleton <BattleLogic> .GetInstance().ResetBattleSystem();

            ActionManager.Instance.frameMode = false;
            MonoSingleton <VoiceInteractionSys> .get_instance().OnEndGame();

            if (!Singleton <GameStateCtrl> .get_instance().isLobbyState)
            {
                DebugHelper.CustomLog("GotoLobbyState by EndGame");
                Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");
            }
            Singleton <BattleSkillHudControl> .DestroyInstance();

            this.m_kGameType = 12;
            this.m_iMapId    = 0;
            try
            {
                FogOfWar.EndLevel();
            }
            catch (DllNotFoundException ex2)
            {
                DebugHelper.Assert(false, "FOW Exception {0} {1}", new object[]
                {
                    ex2.get_Message(),
                    ex2.get_StackTrace()
                });
            }
            Singleton <BattleStatistic> .get_instance().PostEndGame();

            try
            {
                DebugHelper.CustomLog("Finish GameBuilder EndGame");
            }
            catch (Exception)
            {
            }
        }
        public void EndGame()
        {
            if (!Singleton <BattleLogic> .instance.isRuning)
            {
                return;
            }
            try
            {
                DebugHelper.CustomLog("Prepare GameBuilder EndGame");
            }
            catch (Exception)
            {
            }
            MonoSingleton <TGPSDKSys> .GetInstance().EnablePhone(false);

            MonoSingleton <GSDKsys> .GetInstance().EndSpeed();

            Singleton <GameLogic> .GetInstance().HashCheckFreq = 500u;

            Singleton <GameLogic> .GetInstance().SnakeTraceMasks = 0u;

            Singleton <GameLogic> .GetInstance().SnakeTraceSize = 1024000u;

            Singleton <LobbyLogic> .GetInstance().StopGameEndTimer();

            Singleton <LobbyLogic> .GetInstance().StopSettleMsgTimer();

            Singleton <LobbyLogic> .GetInstance().StopSettlePanelTimer();

            MonoSingleton <GameLoader> .instance.AdvanceStopLoad();

            Singleton <WatchController> .GetInstance().Stop();

            Singleton <FrameWindow> .GetInstance().ResetSendCmdSeq();

            Singleton <CBattleGuideManager> .GetInstance().resetPause();

            MonoSingleton <ShareSys> .instance.SendQQGameTeamStateChgMsg(ShareSys.QQGameTeamEventType.end, COM_ROOM_TYPE.COM_ROOM_TYPE_NULL, 0, 0u, string.Empty, 0u, 0u);

            Singleton <StarSystem> .GetInstance().EndGame();

            Singleton <WinLoseByStarSys> .GetInstance().EndGame();

            Singleton <CMatchingSystem> .GetInstance().EndGame();

            string openID = Singleton <ApolloHelper> .GetInstance().GetOpenID();

            List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >();

            list.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list.Add(new KeyValuePair <string, string>("openid", openID));
            list.Add(new KeyValuePair <string, string>("GameType", this.m_kGameType.ToString()));
            list.Add(new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()));
            list.Add(new KeyValuePair <string, string>("LoadingTime", this.m_fLoadingTime.ToString()));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_LoadingBattle", list, true);

            List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> >();

            list2.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list2.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list2.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()));
            list2.Add(new KeyValuePair <string, string>("openid", openID));
            list2.Add(new KeyValuePair <string, string>("totaltime", Singleton <CHeroSelectBaseSystem> .instance.m_fOpenHeroSelectForm.ToString()));
            list2.Add(new KeyValuePair <string, string>("gameType", this.m_kGameType.ToString()));
            list2.Add(new KeyValuePair <string, string>("role_list", string.Empty));
            list2.Add(new KeyValuePair <string, string>("errorCode", string.Empty));
            list2.Add(new KeyValuePair <string, string>("error_msg", string.Empty));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_EnterGame", list2, true);

            float num = (float)Singleton <DataReportSys> .GetInstance().GameTime;

            List <KeyValuePair <string, string> > list3 = new List <KeyValuePair <string, string> >();

            list3.Add(new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()));
            list3.Add(new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()));
            list3.Add(new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().GetPlatformStr()));
            list3.Add(new KeyValuePair <string, string>("openid", openID));
            list3.Add(new KeyValuePair <string, string>("GameType", this.m_kGameType.ToString()));
            list3.Add(new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()));
            list3.Add(new KeyValuePair <string, string>("Battle_Time", num.ToString()));
            list3.Add(new KeyValuePair <string, string>("music", GameSettings.EnableMusic.ToString()));
            list3.Add(new KeyValuePair <string, string>("quality", GameSettings.RenderQuality.ToString()));
            list3.Add(new KeyValuePair <string, string>("status", "1"));
            list3.Add(new KeyValuePair <string, string>("Quality_Mode", GameSettings.ModelLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("Quality_Particle", GameSettings.ParticleLOD.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdAverage", Singleton <FrameSynchr> .instance.m_receiveMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("receiveMoveCmdMax", Singleton <FrameSynchr> .instance.m_receiveMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdAverage", Singleton <FrameSynchr> .instance.m_execMoveCmdAverage.ToString()));
            list3.Add(new KeyValuePair <string, string>("execMoveCmdMax", Singleton <FrameSynchr> .instance.m_execMoveCmdMax.ToString()));
            list3.Add(new KeyValuePair <string, string>("LOD_Down", Singleton <BattleLogic> .GetInstance().m_iAutoLODState.ToString()));
            if (NetworkAccelerator.started)
            {
                if (NetworkAccelerator.isAccerating())
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Acc"));
                }
                else
                {
                    list3.Add(new KeyValuePair <string, string>("AccState", "Direct"));
                }
            }
            else
            {
                list3.Add(new KeyValuePair <string, string>("AccState", "Off"));
            }
            list3.Add(new KeyValuePair <string, string>("MnaState", MonoSingleton <GSDKsys> .GetInstance().m_GsdkSpeedFlag.ToString()));
            int num2 = 0;

            if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak&& MonoSingleton <VoiceSys> .GetInstance().UseMic)
            {
                num2 = 2;
            }
            else if (MonoSingleton <VoiceSys> .GetInstance().UseSpeak)
            {
                num2 = 1;
            }
            list3.Add(new KeyValuePair <string, string>("Mic", num2.ToString()));
            list3.Add(new KeyValuePair <string, string>("NetWorkType", CVersionUpdateSystem.Android_GetNetworkType().ToString()));
            list3.Add(new KeyValuePair <string, string>("vport", NetworkAccelerator.GetConnectIPstr()));
            List <KeyValuePair <string, string> > list4 = Singleton <DataReportSys> .GetInstance().ReportPingToBeacon();

            for (int i = 0; i < list4.get_Count(); i++)
            {
                list3.Add(list4.get_Item(i));
            }
            list4 = Singleton <DataReportSys> .GetInstance().ReportFPSToBeacon();

            for (int j = 0; j < list4.get_Count(); j++)
            {
                list3.Add(list4.get_Item(j));
            }
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_PVPBattle_Summary", list3, true);

            this.m_eventsLoadingTime.Clear();
            try
            {
                float num3 = (float)Singleton <DataReportSys> .GetInstance().FPS10Count / (float)Singleton <DataReportSys> .GetInstance().FPSCount;

                int   iFps10PercentNum = Mathf.CeilToInt(num3 * 100f / 10f) * 10;
                float num4             = (float)(Singleton <DataReportSys> .GetInstance().FPS10Count + Singleton <DataReportSys> .GetInstance().FPS18Count) / (float)Singleton <DataReportSys> .GetInstance().FPSCount;

                int   iFps18PercentNum = Mathf.CeilToInt(num4 * 100f / 10f) * 10;
                CSPkg cSPkg            = NetworkModule.CreateDefaultCSPKG(5000u);
                cSPkg.stPkgData.stCltPerformance.iMapID     = this.m_iMapId;
                cSPkg.stPkgData.stCltPerformance.iPlayerCnt = Singleton <GamePlayerCenter> .instance.GetAllPlayers().get_Count();

                cSPkg.stPkgData.stCltPerformance.chModelLOD       = (sbyte)GameSettings.ModelLOD;
                cSPkg.stPkgData.stCltPerformance.chParticleLOD    = (sbyte)GameSettings.ParticleLOD;
                cSPkg.stPkgData.stCltPerformance.chCameraHeight   = (sbyte)GameSettings.CameraHeight;
                cSPkg.stPkgData.stCltPerformance.chEnableOutline  = (GameSettings.EnableOutline ? 1 : 0);
                cSPkg.stPkgData.stCltPerformance.iFps10PercentNum = iFps10PercentNum;
                cSPkg.stPkgData.stCltPerformance.iFps18PercentNum = iFps18PercentNum;
                cSPkg.stPkgData.stCltPerformance.iAveFps          = Singleton <DataReportSys> .GetInstance().FPSAVE;

                cSPkg.stPkgData.stCltPerformance.iPingAverage = Singleton <DataReportSys> .GetInstance().HeartPingAve;

                cSPkg.stPkgData.stCltPerformance.iPingVariance = Singleton <DataReportSys> .GetInstance().HeartPingVar;

                Utility.StringToByteArray(SystemInfo.deviceModel, ref cSPkg.stPkgData.stCltPerformance.szDeviceModel);
                Utility.StringToByteArray(SystemInfo.graphicsDeviceName, ref cSPkg.stPkgData.stCltPerformance.szGPUName);
                cSPkg.stPkgData.stCltPerformance.iCpuCoreNum    = SystemInfo.processorCount;
                cSPkg.stPkgData.stCltPerformance.iSysMemorySize = SystemInfo.systemMemorySize;
                cSPkg.stPkgData.stCltPerformance.iAvailMemory   = DeviceCheckSys.GetAvailMemory();
                cSPkg.stPkgData.stCltPerformance.iIsTongCai     = (MonoSingleton <CTongCaiSys> .GetInstance().IsCanUseTongCai() ? 1 : 0);
                int num5;
                if (NetworkAccelerator.started)
                {
                    if (NetworkAccelerator.isAccerating())
                    {
                        num5 = 1;
                    }
                    else
                    {
                        num5 = 2;
                    }
                }
                else
                {
                    num5 = 0;
                }
                if (MonoSingleton <GSDKsys> .GetInstance().UseGSdkSpeed)
                {
                    num5 = 4 + num5;
                }
                cSPkg.stPkgData.stCltPerformance.iIsSpeedUp = num5;
                Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, false);
            }
            catch (Exception ex)
            {
                Debug.Log(ex.get_Message());
            }
            MonoSingleton <DialogueProcessor> .GetInstance().Uninit();

            Singleton <TipProcessor> .GetInstance().Uninit();

            Singleton <LobbyLogic> .instance.inMultiRoom         = false;
            Singleton <LobbyLogic> .instance.inMultiGame         = false;
            Singleton <LobbyLogic> .GetInstance().reconnGameInfo = null;

            Singleton <BattleLogic> .GetInstance().isRuning = false;

            Singleton <BattleLogic> .GetInstance().isFighting = false;

            Singleton <BattleLogic> .GetInstance().isGameOver = false;

            Singleton <BattleLogic> .GetInstance().isWaitMultiStart = false;

            Singleton <NetworkModule> .GetInstance().CloseGameServerConnect(true);

            NetworkAccelerator.ClearConnectIP();
            Singleton <ShenFuSystem> .instance.ClearAll();

            MonoSingleton <ActionManager> .GetInstance().ForceStop();

            Singleton <GameObjMgr> .GetInstance().ClearActor();

            Singleton <SceneManagement> .GetInstance().Clear();

            MonoSingleton <SceneMgr> .GetInstance().ClearAll();

            Singleton <GamePlayerCenter> .GetInstance().ClearAllPlayers();

            Singleton <ActorDataCenter> .instance.ClearHeroServerData();

            Singleton <FrameSynchr> .GetInstance().ResetSynchr();

            Singleton <GameReplayModule> .GetInstance().OnGameEnd();

            Singleton <BattleLogic> .GetInstance().ResetBattleSystem();

            ActionManager.Instance.frameMode = false;
            MonoSingleton <VoiceInteractionSys> .instance.OnEndGame();

            Singleton <CBattleGuideManager> .instance.OnEndGame();

            Singleton <DataReportSys> .GetInstance().ClearAllData();

            if (!Singleton <GameStateCtrl> .instance.isLobbyState)
            {
                DebugHelper.CustomLog("GotoLobbyState by EndGame");
                Singleton <GameStateCtrl> .GetInstance().GotoState("LobbyState");
            }
            Singleton <BattleSkillHudControl> .DestroyInstance();

            this.m_kGameType = COM_GAME_TYPE.COM_GAME_TYPE_MAX;
            this.m_iMapId    = 0;
            try
            {
                FogOfWar.EndLevel();
            }
            catch (DllNotFoundException ex2)
            {
                DebugHelper.Assert(false, "FOW Exception {0} {1}", new object[]
                {
                    ex2.get_Message(),
                    ex2.get_StackTrace()
                });
            }
            Singleton <BattleStatistic> .instance.PostEndGame();

            try
            {
                DebugHelper.CustomLog("Finish GameBuilder EndGame");
            }
            catch (Exception)
            {
            }
        }