Пример #1
0
    private static bool checkGPU_Tegra(string[] tokens)
    {
        bool flag = false;
        int  num  = 0;

        for (int i = 1; i < tokens.Length; i++)
        {
            if (DeviceCheckSys.TryGetInt(ref num, tokens[i]))
            {
                flag = true;
                if (num >= 4)
                {
                    return(true);
                }
                if (num == 3)
                {
                    return(true);
                }
            }
            else
            {
                string text = tokens[i];
                if (text == "k1")
                {
                    return(true);
                }
            }
        }
        return(!flag);
    }
Пример #2
0
        public override void OnStateEnter()
        {
            if (DeviceCheckSys.CheckDeviceIsValid())
            {
                if (!DeviceCheckSys.CheckAvailMemory())
                {
                    Singleton <CUIManager> .GetInstance().OpenTips(Singleton <CTextManager> .GetInstance().GetText("CheckDevice_QuitGame_CurMemNotEnough"), false, 1f, null, new object[0]);
                }
                Singleton <ResourceLoader> .GetInstance().LoadScene("EmptySceneWithCamera", null);

                if (Application.internetReachability == NetworkReachability.NotReachable)
                {
                    Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.CheckDevice_Quit, new CUIEventManager.OnUIEventHandler(this.OnExitGame));

                    Singleton <CUIManager> .GetInstance().OpenMessageBox(Singleton <CTextManager> .GetInstance().GetText("VersionUpdate_NetworkUnReachable"), enUIEventID.CheckDevice_Quit, false);
                }
                else
                {
                    MonoSingleton <CVersionUpdateSystem> .GetInstance().StartVersionUpdate(new Assets.Scripts.GameSystem.CVersionUpdateSystem.OnVersionUpdateComplete(this.OnVersionUpdateComplete));
                }
            }
            else
            {
                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.CheckDevice_Quit, new CUIEventManager.OnUIEventHandler(this.OnExitGame));

                Singleton <CUIManager> .GetInstance().OpenMessageBox(Singleton <CTextManager> .GetInstance().GetText("CheckDevice_QuitGame"), enUIEventID.CheckDevice_Quit, false);
            }
        }
Пример #3
0
    private static bool checkGPU_Adreno(string[] tokens)
    {
        int num = 0;

        for (int i = 1; i < tokens.Length; i++)
        {
            if (DeviceCheckSys.TryGetInt(ref num, tokens[i]))
            {
                if (num < 200)
                {
                    return(false);
                }
                if (num < 300)
                {
                    return(num > 220);
                }
                if (num < 400)
                {
                    return(num >= 320 || num >= 305);
                }
                if (num >= 400)
                {
                    return(num >= 410 || true);
                }
            }
        }
        return(false);
    }
Пример #4
0
    private static bool checkGPU_Mali(string[] tokens)
    {
        int num = 0;

        for (int i = 1; i < tokens.Length; i++)
        {
            string text = tokens[i];
            if (text.get_Length() >= 3)
            {
                int  num2 = text.LastIndexOf("mp");
                bool flag = text.get_Chars(0) == 't';
                if (num2 > 0)
                {
                    int num3 = flag ? 1 : 0;
                    text = text.Substring(num3, num2 - num3);
                    DeviceCheckSys.TryGetInt(ref num, text);
                }
                else
                {
                    if (flag)
                    {
                        text = text.Substring(1);
                    }
                    if (DeviceCheckSys.TryGetInt(ref num, text))
                    {
                        for (int j = i + 1; j < tokens.Length; j++)
                        {
                            text = tokens[j];
                            if (text.IndexOf("mp") >= 0)
                            {
                                break;
                            }
                        }
                    }
                }
                if (num > 0)
                {
                    if (num < 400)
                    {
                        return(false);
                    }
                    if (num < 500)
                    {
                        return(num == 400 || num == 450);
                    }
                    if (num < 700)
                    {
                        return(flag && (num >= 620 || true));
                    }
                    return(flag);
                }
            }
        }
        return(false);
    }
Пример #5
0
 public static void DecideDynamicParticleLOD()
 {
     if (DeviceCheckSys.GetAvailMemoryMegaBytes() > 300 || DeviceCheckSys.GetTotalMemoryMegaBytes() > 1100)
     {
         GameSettings.m_dynamicParticleLOD = true;
     }
     else
     {
         GameSettings.m_dynamicParticleLOD = false;
     }
 }
Пример #6
0
 public static void DecideDynamicParticleLOD()
 {
     if ((DeviceCheckSys.GetAvailMemoryMegaBytes() > 300) || (DeviceCheckSys.GetTotalMemoryMegaBytes() > 1100))
     {
         m_dynamicParticleLOD = true;
     }
     else
     {
         m_dynamicParticleLOD = false;
     }
 }
Пример #7
0
        private void OnLoginSceneCompleted()
        {
            Singleton <CSoundManager> .GetInstance().PostEvent("Login_Play", null);

            Singleton <CLoginSystem> .GetInstance().Draw();

            if (GameDataMgr.GetGlobeValue(244) == 1u && !DeviceCheckSys.CheckAvailMemory() && DeviceCheckSys.GetRecordCurMemNotEnoughPopTimes() < 3)
            {
                Singleton <CUIManager> .GetInstance().OpenMessageBox(Singleton <CTextManager> .GetInstance().GetText("CheckDevice_QuitGame_CurMemNotEnough"), false);

                DeviceCheckSys.RecordCurMemNotEnoughPopTimes();
            }
        }
Пример #8
0
        public void EndGame()
        {
            if (Singleton <BattleLogic> .instance.isRuning)
            {
                Singleton <LobbyLogic> .GetInstance().StopGameEndTimer();

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

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

                MonoSingleton <GameLoader> .instance.AdvanceStopLoad();

                Singleton <FrameSynchr> .instance.bEscape = false;
                Singleton <CBattleGuideManager> .GetInstance().resetPause();

                if (this.gameInfo != null)
                {
                    this.gameInfo.EndGame();
                }
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("GameBuild.EndGame", null, true);

                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>("GameType", this.m_kGameType.ToString()),
                    new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()),
                    new KeyValuePair <string, string>("LoadingTime", this.m_fLoadingTime.ToString())
                };
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_LoadingBattle", events, true);

                float num = (Singleton <FrameSynchr> .GetInstance().LogicFrameTick * 0.016667f) * 0.001f;
                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>("GameType", this.m_kGameType.ToString()),
                    new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()),
                    new KeyValuePair <string, string>("Max_FPS", Singleton <CBattleSystem> .GetInstance().m_MaxBattleFPS.ToString()),
                    new KeyValuePair <string, string>("Min_FPS", Singleton <CBattleSystem> .GetInstance().m_MinBattleFPS.ToString()),
                    new KeyValuePair <string, string>("Avg_FPS", Singleton <CBattleSystem> .GetInstance().m_AveBattleFPS.ToString()),
                    new KeyValuePair <string, string>("Ab_FPS_time", Singleton <BattleLogic> .GetInstance().m_Ab_FPS_time.ToString()),
                    new KeyValuePair <string, string>("Abnormal_FPS", Singleton <BattleLogic> .GetInstance().m_Abnormal_FPS_Count.ToString()),
                    new KeyValuePair <string, string>("Min_Ping", Singleton <FrameSynchr> .instance.m_MinPing.ToString()),
                    new KeyValuePair <string, string>("Max_Ping", Singleton <FrameSynchr> .instance.m_MaxPing.ToString()),
                    new KeyValuePair <string, string>("Avg_Ping", Singleton <FrameSynchr> .instance.m_AvePing.ToString()),
                    new KeyValuePair <string, string>("Abnormal_Ping", Singleton <FrameSynchr> .instance.m_Abnormal_PingCount.ToString()),
                    new KeyValuePair <string, string>("Param_Battle_Time", num.ToString()),
                    new KeyValuePair <string, string>("BattleSvr_Reconnect", Singleton <NetworkModule> .GetInstance().m_GameReconnetCount.ToString()),
                    new KeyValuePair <string, string>("GameSvr_Reconnect", Singleton <NetworkModule> .GetInstance().m_lobbyReconnetCount.ToString()),
                    new KeyValuePair <string, string>("Drag_Times", string.Empty)
                };
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_PVPBattle_Summary", list2, true);

                List <KeyValuePair <string, string> > list3 = new List <KeyValuePair <string, string> >();
                float num2 = Singleton <BattleLogic> .GetInstance().m_fAveFPS / ((float)Singleton <BattleLogic> .GetInstance().m_fpsCount);

                list3.Add(new KeyValuePair <string, string>("AveFPS", num2.ToString()));
                list3.Add(new KeyValuePair <string, string>("<10FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt10.ToString()));
                list3.Add(new KeyValuePair <string, string>("<18FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt18.ToString()));
                if (this.m_eventsLoadingTime != null)
                {
                    for (int i = 0; i < this.m_eventsLoadingTime.Count; i++)
                    {
                        KeyValuePair <string, string> item = this.m_eventsLoadingTime[i];
                        list3.Add(item);
                    }
                }
                Singleton <BeaconHelper> .GetInstance().EventBase(ref list3);

                if (num2 >= 25f)
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 25", list3, true);

                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 25_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list3, true);
                }
                else if ((num2 >= 20f) && (num2 < 25f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 20", list3, true);

                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 20_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list3, true);
                }
                else if ((num2 >= 18f) && (num2 < 20f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 18", list3, true);

                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 18_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list3, true);
                }
                else if ((num2 >= 15f) && (num2 < 18f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 15", list3, true);

                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 15_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list3, true);
                }
                else if ((num2 >= 10f) && (num2 < 15f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 10", list3, true);

                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 10_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list3, true);
                }
                else
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave < 10", list3, true);

                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave < 10_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list3, true);
                }
                float num4 = ((float)Singleton <BattleLogic> .GetInstance().m_fpsCunt10) / ((float)Singleton <BattleLogic> .GetInstance().m_fpsCount);
                int   num5 = Mathf.CeilToInt((num4 * 100f) / 10f) * 10;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_<=10_Percent:" + num5.ToString() + "%", null, true);

                float num6 = ((float)(Singleton <BattleLogic> .GetInstance().m_fpsCunt18 + Singleton <BattleLogic> .GetInstance().m_fpsCunt10)) / ((float)Singleton <BattleLogic> .GetInstance().m_fpsCount);
                int   num7 = Mathf.CeilToInt((num6 * 100f) / 10f) * 10;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS<=18_Percent:" + num7.ToString() + "%", null, true);

                this.m_eventsLoadingTime.Clear();
                Singleton <FrameSynchr> .instance.ReportPingToBeacon();

                try
                {
                    CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x1388);
                    msg.stPkgData.stCltPerformance.iMapID     = this.m_iMapId;
                    msg.stPkgData.stCltPerformance.iPlayerCnt = Singleton <GamePlayerCenter> .instance.GetAllPlayers().Count;

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

                    msg.stPkgData.stCltPerformance.iPingAverage  = Singleton <FrameSynchr> .instance.m_PingAverage;
                    msg.stPkgData.stCltPerformance.iPingVariance = Singleton <FrameSynchr> .instance.m_PingVariance;
                    Utility.StringToByteArray(SystemInfo.deviceModel, ref msg.stPkgData.stCltPerformance.szDeviceModel);
                    Utility.StringToByteArray(SystemInfo.graphicsDeviceName, ref msg.stPkgData.stCltPerformance.szGPUName);
                    msg.stPkgData.stCltPerformance.iCpuCoreNum    = SystemInfo.processorCount;
                    msg.stPkgData.stCltPerformance.iSysMemorySize = SystemInfo.systemMemorySize;
                    msg.stPkgData.stCltPerformance.iAvailMemory   = DeviceCheckSys.GetAvailMemory();
                    Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
                }
                catch (Exception exception)
                {
                    Debug.Log(exception.Message);
                }
                Singleton <BattleStatistic> .instance.unInitEvent();

                MonoSingleton <DialogueProcessor> .GetInstance().Uninit();

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

                Singleton <LobbyLogic> .instance.inMultiRoom    = false;
                Singleton <LobbyLogic> .instance.inMultiGame    = false;
                Singleton <BattleLogic> .GetInstance().isRuning = false;

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

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

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

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

                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 <CSoundManager> .GetInstance().UnloadBanks(CSoundManager.BankType.Battle);

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

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

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

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

                this.m_kGameType = COM_GAME_TYPE.COM_GAME_TYPE_MAX;
                this.m_iMapId    = 0;
                Singleton <BattleStatistic> .instance.PostEndGame();
            }
        }
Пример #9
0
    private static bool checkGPU_PowerVR(string[] tokens)
    {
        bool flag   = false;
        bool result = false;
        int  num    = 0;

        for (int i = 1; i < tokens.Length; i++)
        {
            string text = tokens[i];
            if (text == "sgx")
            {
                flag = true;
            }
            else
            {
                if (text == "rogue")
                {
                    result = true;
                    break;
                }
                if (flag)
                {
                    int num2 = text.IndexOf("mp");
                    if (num2 > 0)
                    {
                        DeviceCheckSys.TryGetInt(ref num, text.Substring(0, num2));
                    }
                    else if (DeviceCheckSys.TryGetInt(ref num, text))
                    {
                        for (int j = i + 1; j < tokens.Length; j++)
                        {
                            text = tokens[j].ToLower();
                            if (text.IndexOf("mp") >= 0)
                            {
                                break;
                            }
                        }
                    }
                    if (num > 0)
                    {
                        return(num >= 543 && (num == 543 || num != 544 || true));
                    }
                }
                else if (text.get_Length() > 4)
                {
                    char c  = text.get_Chars(0);
                    char c2 = text.get_Chars(1);
                    if (c == 'g')
                    {
                        if (c2 >= '0' && c2 <= '9')
                        {
                            DeviceCheckSys.TryGetInt(ref num, text.Substring(1));
                        }
                        else
                        {
                            DeviceCheckSys.TryGetInt(ref num, text.Substring(2));
                        }
                        if (num > 0)
                        {
                            return(num >= 7000 || (num >= 6000 && num >= 6100 && (num >= 6400 || true)));
                        }
                    }
                }
            }
        }
        return(result);
    }
        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());
            }
        }
Пример #11
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());
            }
        }
Пример #12
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)
            {
            }
        }
Пример #13
0
        public void EndGame()
        {
            if (Singleton <BattleLogic> .instance.isRuning)
            {
                try
                {
                    DebugHelper.CustomLog("Prepare GameBuilder EndGame");
                }
                catch (Exception)
                {
                }
                Singleton <LobbyLogic> .GetInstance().StopGameEndTimer();

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

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

                MonoSingleton <GameLoader> .instance.AdvanceStopLoad();

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

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

                if (this.gameInfo != null)
                {
                    this.gameInfo.EndGame();
                }
                string openID = Singleton <ApolloHelper> .GetInstance().GetOpenID();

                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("GameBuild.EndGame", null, true);

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

                List <KeyValuePair <string, string> > list2 = new List <KeyValuePair <string, string> > {
                    new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()),
                    new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()),
                    new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()),
                    new KeyValuePair <string, string>("openid", openID),
                    new KeyValuePair <string, string>("totaltime", Singleton <CHeroSelectBaseSystem> .instance.m_fOpenHeroSelectForm.ToString()),
                    new KeyValuePair <string, string>("gameType", this.m_kGameType.ToString()),
                    new KeyValuePair <string, string>("role_list", string.Empty),
                    new KeyValuePair <string, string>("errorCode", string.Empty),
                    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> > {
                    new KeyValuePair <string, string>("g_version", CVersion.GetAppVersion()),
                    new KeyValuePair <string, string>("WorldID", MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString()),
                    new KeyValuePair <string, string>("platform", Singleton <ApolloHelper> .GetInstance().CurPlatform.ToString()),
                    new KeyValuePair <string, string>("openid", openID),
                    new KeyValuePair <string, string>("GameType", this.m_kGameType.ToString()),
                    new KeyValuePair <string, string>("MapID", this.m_iMapId.ToString()),
                    new KeyValuePair <string, string>("Max_FPS", Singleton <CBattleSystem> .GetInstance().m_MaxBattleFPS.ToString()),
                    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>("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> .instance.m_MinPing.ToString()));
                list3.Add(new KeyValuePair <string, string>("Max_Ping", Singleton <FrameSynchr> .instance.m_MaxPing.ToString()));
                list3.Add(new KeyValuePair <string, string>("Avg_Ping", Singleton <FrameSynchr> .instance.m_AvePing.ToString()));
                list3.Add(new KeyValuePair <string, string>("Abnormal_Ping", Singleton <FrameSynchr> .instance.m_Abnormal_PingCount.ToString()));
                list3.Add(new KeyValuePair <string, string>("Ping300", Singleton <FrameSynchr> .instance.m_ping300Count.ToString()));
                list3.Add(new KeyValuePair <string, string>("Ping150to300", Singleton <FrameSynchr> .instance.m_ping150to300.ToString()));
                list3.Add(new KeyValuePair <string, string>("Ping150", Singleton <FrameSynchr> .instance.m_ping150.ToString()));
                list3.Add(new KeyValuePair <string, string>("LostpingCount", Singleton <FrameSynchr> .instance.m_pingLost.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"));
                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);

                List <KeyValuePair <string, string> > list4 = new List <KeyValuePair <string, string> >();
                float num4 = Singleton <BattleLogic> .GetInstance().m_fAveFPS / ((float)Singleton <BattleLogic> .GetInstance().m_fpsCount);

                list4.Add(new KeyValuePair <string, string>("AveFPS", num4.ToString()));
                list4.Add(new KeyValuePair <string, string>("<10FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt10.ToString()));
                list4.Add(new KeyValuePair <string, string>("<18FPSCount", Singleton <BattleLogic> .GetInstance().m_fpsCunt18.ToString()));
                list4.Add(new KeyValuePair <string, string>("Quality_Mode", GameSettings.ModelLOD.ToString()));
                list4.Add(new KeyValuePair <string, string>("Quality_Particle", GameSettings.ParticleLOD.ToString()));
                if (Singleton <BattleLogic> .GetInstance().GetCurLvelContext() != null)
                {
                    list4.Add(new KeyValuePair <string, string>("MapId", Singleton <BattleLogic> .GetInstance().GetCurLvelContext().m_mapID.ToString()));
                }
                if (this.m_eventsLoadingTime != null)
                {
                    for (int i = 0; i < this.m_eventsLoadingTime.Count; i++)
                    {
                        KeyValuePair <string, string> item = this.m_eventsLoadingTime[i];
                        list4.Add(item);
                    }
                }
                Singleton <BeaconHelper> .GetInstance().EventBase(ref list4);

                if (num4 >= 25f)
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 25_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list4, true);
                }
                else if ((num4 >= 20f) && (num4 < 25f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 20_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list4, true);
                }
                else if ((num4 >= 18f) && (num4 < 20f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 18_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list4, true);
                }
                else if ((num4 >= 15f) && (num4 < 18f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 15_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list4, true);
                }
                else if ((num4 >= 10f) && (num4 < 15f))
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave >= 10_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list4, true);
                }
                else
                {
                    Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_ave < 10_" + Singleton <BattleLogic> .GetInstance().GetLevelTypeDescription(), list4, true);
                }
                float num6 = ((float)Singleton <BattleLogic> .GetInstance().m_fpsCunt10) / ((float)Singleton <BattleLogic> .GetInstance().m_fpsCount);
                int   num7 = Mathf.CeilToInt((num6 * 100f) / 10f) * 10;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS_<=10_Percent:" + num7.ToString() + "%", list4, true);

                float num8 = ((float)(Singleton <BattleLogic> .GetInstance().m_fpsCunt18 + Singleton <BattleLogic> .GetInstance().m_fpsCunt10)) / ((float)Singleton <BattleLogic> .GetInstance().m_fpsCount);
                int   num9 = Mathf.CeilToInt((num8 * 100f) / 10f) * 10;
                Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Event_FPS<=18_Percent:" + num9.ToString() + "%", list4, true);

                this.m_eventsLoadingTime.Clear();
                Singleton <FrameSynchr> .instance.ReportPingToBeacon();

                try
                {
                    CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x1388);
                    msg.stPkgData.stCltPerformance.iMapID     = this.m_iMapId;
                    msg.stPkgData.stCltPerformance.iPlayerCnt = Singleton <GamePlayerCenter> .instance.GetAllPlayers().Count;

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

                    msg.stPkgData.stCltPerformance.iPingAverage  = Singleton <FrameSynchr> .instance.m_PingAverage;
                    msg.stPkgData.stCltPerformance.iPingVariance = Singleton <FrameSynchr> .instance.m_PingVariance;
                    Utility.StringToByteArray(SystemInfo.deviceModel, ref msg.stPkgData.stCltPerformance.szDeviceModel);
                    Utility.StringToByteArray(SystemInfo.graphicsDeviceName, ref msg.stPkgData.stCltPerformance.szGPUName);
                    msg.stPkgData.stCltPerformance.iCpuCoreNum    = SystemInfo.processorCount;
                    msg.stPkgData.stCltPerformance.iSysMemorySize = SystemInfo.systemMemorySize;
                    msg.stPkgData.stCltPerformance.iAvailMemory   = DeviceCheckSys.GetAvailMemory();
                    Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, false);
                }
                catch (Exception exception)
                {
                    Debug.Log(exception.Message);
                }
                MonoSingleton <DialogueProcessor> .GetInstance().Uninit();

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

                Singleton <LobbyLogic> .instance.inMultiRoom    = false;
                Singleton <LobbyLogic> .instance.inMultiGame    = false;
                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> .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;
                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;
                Singleton <BattleStatistic> .instance.PostEndGame();

                try
                {
                    FrameTracer.Destroy();
                    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)
            {
            }
        }