Esempio n. 1
0
    public string GetOpenID()
    {
        ApolloAccountInfo accountInfo = this.GetAccountInfo(false);

        if (accountInfo != null)
        {
            return(accountInfo.get_OpenId());
        }
        return(string.Empty);
    }
Esempio n. 2
0
        private void BeginRecord(SCPKG_MULTGAME_BEGINLOAD beginLoadPkg)
        {
            this.ClearRecord();
            if (beginLoadPkg == null)
            {
                return;
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            if (accountInfo == null)
            {
                return;
            }
            uint num = 0u;

            for (int i = 0; i < beginLoadPkg.astCampInfo.Length; i++)
            {
                CSDT_CAMPINFO cSDT_CAMPINFO = beginLoadPkg.astCampInfo[i];
                for (uint num2 = 0u; num2 < cSDT_CAMPINFO.dwPlayerNum; num2 += 1u)
                {
                    CSDT_CAMPPLAYERINFO cSDT_CAMPPLAYERINFO = cSDT_CAMPINFO.astCampPlayerInfo[(int)((UIntPtr)num2)];
                    if (Utility.UTF8Convert(cSDT_CAMPPLAYERINFO.szOpenID) == accountInfo.get_OpenId())
                    {
                        num = cSDT_CAMPPLAYERINFO.stPlayerInfo.astChoiceHero[0].stBaseInfo.stCommonInfo.dwHeroID;
                        break;
                    }
                }
                if (num > 0u)
                {
                    break;
                }
            }
            if (num > 0u)
            {
                this.recordStream = new MemoryStream(1048576);
                this.recordWriter = new BinaryWriter(this.recordStream);
                this.recordWriter.Write(CVersion.GetAppVersion());
                this.recordWriter.Write(CVersion.GetUsedResourceVersion());
                this.recordWriter.Write(CVersion.GetRevisonNumber());
                this.recordWriter.Write(num);
                this.recordWriter.Write(DateTime.get_Now().get_Ticks());
                this.recordWriter.Write(beginLoadPkg.stDeskInfo.bMapType);
                this.recordWriter.Write(beginLoadPkg.stDeskInfo.dwMapId);
                this.recordWriter.Write(masterRoleInfo.Name);
                this.recordWriter.Write(masterRoleInfo.HeadUrl);
                this.recordWriter.Write(masterRoleInfo.m_rankGrade);
                this.recordWriter.Write(masterRoleInfo.m_rankClass);
            }
        }
Esempio n. 3
0
    public void SetUserName()
    {
        if (this.Enable)
        {
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            if (accountInfo != null)
            {
                GSDK.SetUserName(ApolloConfig.platform, accountInfo.get_OpenId());
            }
        }
    }
Esempio n. 4
0
    public void InviteFriendToRoom(string title, string desc, string roomInfo)
    {
        Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false;

        if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            return;
        }
        Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D;

        byte[] array = null;
        if (texture2D)
        {
            array = texture2D.EncodeToPNG();
        }
        int num = 0;

        if (array != null)
        {
            num = array.Length;
        }
        IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService;

        if (apolloSnsService == null)
        {
            return;
        }
        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2)
        {
            ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
            if (accountInfo != null)
            {
                string text = string.Concat(new string[]
                {
                    "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=",
                    accountInfo.get_OpenId(),
                    "&ADTAG=gameobj.msg_invite&",
                    ApolloHelper.QQ_SHARE_GAMEDATA,
                    "=",
                    roomInfo
                });
                string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png";
                apolloSnsService.SendToQQ(2, title, desc, text, text2);
            }
        }
        else
        {
            apolloSnsService.SendToWeixin(title, desc, "MSG_INVITE", array, num, roomInfo);
        }
    }
Esempio n. 5
0
 private void InitTssSdk()
 {
     if (this.bEnableTSS)
     {
         int nPlatform = 1;
         if (ApolloConfig.platform == 1)
         {
             nPlatform = 2;
         }
         ApolloAccountInfo apolloAccountInfo = new ApolloAccountInfo();
         IApollo.get_Instance().GetAccountService().GetRecord(ref apolloAccountInfo);
         this.m_OpenID = apolloAccountInfo.get_OpenId();
         this.CreateTssSDKSys(this.m_OpenID, nPlatform);
     }
 }
Esempio n. 6
0
    public string GetAccountInfoStr(ref ApolloAccountInfo info)
    {
        string text = "===== Account Info =====\n";

        text += string.Format("OpenId:{0}\n", info.get_OpenId());
        text += string.Format("Pf:{0}\n", info.get_Pf());
        text += string.Format("PfKey:{0}\n", info.get_PfKey());
        text += string.Format("Platform:{0}\n", info.get_Platform());
        text += "TokenList Begin:\n";
        using (ListView <ApolloToken> .Enumerator enumerator = info.get_TokenList().GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                ApolloToken current = enumerator.get_Current();
                text += string.Format("{0}:{1}\n", current.get_Type(), current.get_Value());
            }
        }
        text += "TokenList End:\n";
        text += "===== Account Info =====";
        return(text);
    }
Esempio n. 7
0
        public static string GetBindQQGroupSignature()
        {
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            if (accountInfo != null)
            {
                string text = string.Concat(new object[]
                {
                    accountInfo.get_OpenId(),
                    "_",
                    Singleton <ApolloHelper> .GetInstance().GetAppId(),
                    "_",
                    Singleton <ApolloHelper> .GetInstance().GetAppKey(),
                    "_",
                    CGuildHelper.GetGroupGuildId(),
                    "_",
                    CGuildHelper.GetGuildLogicWorldId()
                });
                Debug.Log("signature=" + text);
                return(Utility.CreateMD5Hash(text));
            }
            return(string.Empty);
        }
Esempio n. 8
0
    private void OnLogin(ApolloPlatform platform)
    {
        if (this.m_IsSwitchToLoginPlatform)
        {
            return;
        }
        Singleton <CUIManager> .GetInstance().OpenSendMsgAlert(5, enUIEventID.None);

        this.m_IsSwitchToLoginPlatform = true;
        if (!this.accountService.IsPlatformInstalled(platform))
        {
            if (this.CurPlatform == 1)
            {
                Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloPlatform>(EventID.ApolloHelper_Platform_Not_Installed, 1);

                return;
            }
            if (this.CurPlatform != 2 && this.CurPlatform != 257)
            {
                Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloPlatform>(EventID.ApolloHelper_Platform_Not_Installed, platform);

                return;
            }
        }
        if (!this.m_IsLoginEventHandlerRegistered)
        {
            this.m_IsLoginEventHandlerRegistered = true;
            this.accountService.add_LoginEvent(new AccountLoginHandle(this.OnLoginEvent));
        }
        ApolloAccountInfo accountInfo = this.GetAccountInfo(false);

        if (accountInfo != null)
        {
            this.m_LastOpenID = accountInfo.get_OpenId();
        }
        this.accountService.Login(platform);
    }
Esempio n. 9
0
        public void InitWechatLink()
        {
            if (ApolloConfig.platform != 1)
            {
                return;
            }
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            string text   = "Smoba";
            string openId = accountInfo.get_OpenId();
            string text2  = "qq";
            string text3  = string.Empty;
            string text4  = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID.ToString();

            string text5 = string.Empty;
            string text6 = string.Empty;

            using (ListView <ApolloToken> .Enumerator enumerator = accountInfo.get_TokenList().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ApolloToken current = enumerator.get_Current();
                    if (ApolloConfig.platform == 1)
                    {
                        if (current.get_Type() == 1)
                        {
                            text5 = current.get_Value();
                        }
                    }
                    else if (ApolloConfig.platform == 2)
                    {
                        if (current.get_Type() == 3)
                        {
                            text6 = current.get_Value();
                        }
                        if (current.get_Type() == 1)
                        {
                            text5 = current.get_Value();
                        }
                    }
                }
            }
            if (ApolloConfig.platform == 2)
            {
                text2 = "qq";
                if (Application.platform == RuntimePlatform.Android)
                {
                    text3 = "1";
                }
                else if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    text3 = "2";
                }
            }
            else if (ApolloConfig.platform == 1)
            {
                text2 = "wx";
                if (Application.platform == RuntimePlatform.Android)
                {
                    text3 = "3";
                }
                else if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    text3 = "4";
                }
            }
            string text7 = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString();

            string text8 = ApolloConfig.appID;

            if (ApolloConfig.platform == 1)
            {
                text8 = ApolloConfig.WXAppID;
            }
            string appVersion = CVersion.GetAppVersion();
            string text9      = "1";
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary.Add("sOpenId", openId);
            dictionary.Add("sServiceType", text);
            dictionary.Add("sAcountType", text2);
            dictionary.Add("sArea", text3);
            dictionary.Add("sPartition", text7);
            dictionary.Add("sAppId", text8);
            dictionary.Add("sRoleId", text4);
            dictionary.Add("sAccessToken", text5);
            dictionary.Add("sPayToken", text6);
            dictionary.Add("sGameVer", appVersion);
            dictionary.Add("sPlatID", text9);
            this.m_bShowWeixinZone = false;
            if (ApolloConfig.platform == 1 && this.m_bOpenWeixinZone)
            {
                int @int = PlayerPrefs.GetInt("SHOW_WEIXINZONE");
                if (@int >= 1)
                {
                    this.m_bShowWeixinZone = true;
                }
                WeChatLink.Instance.BeginGetGameZoneUrl(dictionary, new Action <Dictionary <string, string> >(this.OnGetGameZoneUrl));
            }
        }
Esempio n. 10
0
        private void InitPara()
        {
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            string text   = "Smoba";
            string openId = accountInfo.get_OpenId();
            string text2  = "qq";
            string text3  = string.Empty;
            string text4  = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID.ToString();

            string text5 = string.Empty;
            string text6 = string.Empty;

            using (ListView <ApolloToken> .Enumerator enumerator = accountInfo.get_TokenList().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ApolloToken current = enumerator.get_Current();
                    if (ApolloConfig.platform == 1)
                    {
                        if (current.get_Type() == 1)
                        {
                            text5 = current.get_Value();
                        }
                    }
                    else if (ApolloConfig.platform == 2)
                    {
                        if (current.get_Type() == 3)
                        {
                            text6 = current.get_Value();
                        }
                        if (current.get_Type() == 1)
                        {
                            text5 = current.get_Value();
                        }
                    }
                }
            }
            if (ApolloConfig.platform == 2)
            {
                text2 = "qq";
                if (Application.platform == RuntimePlatform.Android)
                {
                    text3 = "1";
                }
                else if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    text3 = "2";
                }
            }
            else if (ApolloConfig.platform == 1)
            {
                text2 = "wx";
                if (Application.platform == RuntimePlatform.Android)
                {
                    text3 = "3";
                }
                else if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    text3 = "4";
                }
            }
            string text7 = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString();

            string text8 = ApolloConfig.appID;

            if (ApolloConfig.platform == 1)
            {
                text8 = ApolloConfig.WXAppID;
            }
            string     appVersion = CVersion.GetAppVersion();
            string     text9      = "1";
            GameObject gameObject = base.gameObject;

            Pandora.Instance.SetPandoraParent(gameObject);
            Pandora.Instance.SetPanelBaseDepth(1000);
            Pandora.Instance.SetCallback(new Action <Dictionary <string, string> >(this.OnPandoraEvent));
            Pandora.Instance.SetGetDjImageCallback(new Func <GameObject, int, int, int>(this.OnGetDjImageCallback));
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary.Add("sOpenId", openId);
            dictionary.Add("sServiceType", text);
            dictionary.Add("sAcountType", text2);
            dictionary.Add("sArea", text3);
            dictionary.Add("sPartition", text7);
            dictionary.Add("sAppId", text8);
            dictionary.Add("sRoleId", text4);
            dictionary.Add("sAccessToken", text5);
            dictionary.Add("sPayToken", text6);
            dictionary.Add("sGameVer", appVersion);
            dictionary.Add("sPlatID", text9);
            Pandora.Instance.SetUserData(dictionary);
        }
Esempio n. 11
0
    public void ShareInviteFriend(string openId, string title, string desc, string extInfo)
    {
        Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false;

        if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            return;
        }
        Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D;

        if (texture2D == null)
        {
            DebugHelper.Assert(false, "Texture2D  Share/120 == null");
            return;
        }
        byte[] array = texture2D.EncodeToPNG();
        if (array != null)
        {
            int num = array.Length;
        }
        IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService;

        if (apolloSnsService == null)
        {
            DebugHelper.Assert(false, "IApollo.Instance.GetService(ApolloServiceType.Sns) == null");
            return;
        }
        MonoSingleton <ShareSys> .get_instance().OnShareCallBack();

        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2)
        {
            ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
            if (accountInfo != null)
            {
                string text  = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.get_OpenId() + "&ADTAG=gameobj.msg_invite";
                string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png";
                apolloSnsService.SendToQQGameFriend(1, openId, title, desc, text, text2, title, "MSG_INVITE", extInfo);
            }
        }
        else
        {
            apolloSnsService.SendToWXGameFriend(openId, title, desc, "9Wste6_dDgZtoVmC6CQTh0jj29kGEp0jrVSYrGWvtZLvSTDN9fUb-_sNjacaGITt", "messageExt", "MSG_INVITE", extInfo);
        }
    }
Esempio n. 12
0
    private void OnLoginEvent(ApolloResult loginResult, ApolloAccountInfo accountInfo)
    {
        Debug.Log(string.Concat(new object[]
        {
            "*Login*OnLoginEvent called ",
            loginResult,
            " ",
            Time.realtimeSinceStartup
        }));
        this.m_IsSwitchToLoginPlatform = false;
        if (loginResult == null)
        {
            ApolloConfig.platform = (this.CurPlatform = accountInfo.get_Platform());
            if (this.m_LastOpenID != null && accountInfo.get_OpenId() != this.m_LastOpenID)
            {
                Singleton <CUIManager> .GetInstance().OpenMessageBox(Singleton <CTextManager> .GetInstance().GetText("Common_Login_Different_Account_Tip_Force"), enUIEventID.Login_Change_Account_Yes, false);

                return;
            }
            if (this.JudgeLoginAccountInfo(ref accountInfo))
            {
                Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloAccountInfo>(EventID.ApolloHelper_Login_Success, accountInfo);
            }
            else
            {
                Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, 7);
            }
        }
        else if (loginResult == 12)
        {
            BugLocateLogSys.Log(string.Format("Login Fail. User cancel", new object[0]));
            Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Canceled);
        }
        else if (loginResult == 22)
        {
            Debug.Log("Login NeedRealNameAuth.");
            BugLocateLogSys.Log(string.Format("Login NeedRealNameAuth.", new object[0]));
            Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Login_Need_Real_Name_Auth);
        }
        else
        {
            BugLocateLogSys.Log(string.Format("Login Fail. Error code is {0}", loginResult));
            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", "NULL"));
            list.Add(new KeyValuePair <string, string>("totaltime", (Time.time - Singleton <CLoginSystem> .GetInstance().m_fLoginClickTime).ToString()));
            list.Add(new KeyValuePair <string, string>("errorCode", loginResult.ToString()));
            list.Add(new KeyValuePair <string, string>("error_msg", "null"));
            Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("Service_Login_MSDKClientAuth", list, true);

            Singleton <EventRouter> .GetInstance().BroadCastEvent <ApolloResult>(EventID.ApolloHelper_Login_Failed, loginResult);
        }
        if (this.accountService == null)
        {
            BugLocateLogSys.Log("accountService == null");
        }
        this.m_IsLoginReturn = true;
        BugLocateLogSys.Log("LoginEvent Thread:" + Thread.get_CurrentThread().get_ManagedThreadId());
    }
Esempio n. 13
0
 public bool JudgeLoginAccountInfo(ref ApolloAccountInfo accountInfo)
 {
     return((accountInfo.get_Platform() != null || this.IsNoneModeSupport) && !string.IsNullOrEmpty(accountInfo.get_OpenId()));
 }
Esempio n. 14
0
        public void PrepareReport()
        {
            this._eventsLoadingTime.Clear();
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            DebugHelper.Assert(accountInfo != null, "account info is null");
            this._eventsLoadingTime.Add(new KeyValuePair <string, string>("OpenID", (accountInfo == null) ? "0" : accountInfo.get_OpenId()));
            this._eventsLoadingTime.Add(new KeyValuePair <string, string>("LevelID", Singleton <GameContextEx> .GetInstance().GameContextCommonInfo.MapId.ToString()));
            this._eventsLoadingTime.Add(new KeyValuePair <string, string>("isPVPLevel", Singleton <GameContextEx> .GetInstance().IsMobaMode().ToString()));
            this._eventsLoadingTime.Add(new KeyValuePair <string, string>("isPVPMode", Singleton <GameContextEx> .GetInstance().IsMobaMode().ToString()));
            this._eventsLoadingTime.Add(new KeyValuePair <string, string>("bLevelNo", Singleton <GameContextEx> .GetInstance().GameContextSoloInfo.LevelNo.ToString()));
        }
Esempio n. 15
0
        public GameInfoBase StartGame(GameContextBase InGameContext)
        {
            DebugHelper.Assert(InGameContext != null);
            if (InGameContext == null)
            {
                return(null);
            }
            if (Singleton <BattleLogic> .get_instance().isRuning)
            {
                return(null);
            }
            SynchrReport.Reset();
            GameSettings.DecideDynamicParticleLOD();
            Singleton <CHeroSelectBaseSystem> .get_instance().m_fOpenHeroSelectForm = Time.time - Singleton <CHeroSelectBaseSystem> .get_instance().m_fOpenHeroSelectForm;

            this.m_fLoadingTime = Time.time;
            this.m_eventsLoadingTime.Clear();
            ApolloAccountInfo accountInfo = Singleton <ApolloHelper> .GetInstance().GetAccountInfo(false);

            DebugHelper.Assert(accountInfo != null, "account info is null");
            this.m_iMapId    = InGameContext.levelContext.m_mapID;
            this.m_kGameType = InGameContext.levelContext.GetGameType();
            this.m_eventsLoadingTime.Add(new KeyValuePair <string, string>("OpenID", (accountInfo == null) ? "0" : accountInfo.get_OpenId()));
            this.m_eventsLoadingTime.Add(new KeyValuePair <string, string>("LevelID", InGameContext.levelContext.m_mapID.ToString()));
            this.m_eventsLoadingTime.Add(new KeyValuePair <string, string>("isPVPLevel", InGameContext.levelContext.IsMobaMode().ToString()));
            this.m_eventsLoadingTime.Add(new KeyValuePair <string, string>("isPVPMode", InGameContext.levelContext.IsMobaMode().ToString()));
            this.m_eventsLoadingTime.Add(new KeyValuePair <string, string>("bLevelNo", InGameContext.levelContext.m_levelNo.ToString()));
            Singleton <BattleLogic> .GetInstance().isRuning = true;

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

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

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

            ActionManager.Instance.frameMode = true;
            MonoSingleton <ActionManager> .GetInstance().ForceStop();

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

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

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

            MonoSingleton <GameLoader> .GetInstance().ResetLoader();

            InGameContext.PrepareStartup();
            if (!MonoSingleton <GameFramework> .get_instance().EditorPreviewMode)
            {
                DebugHelper.Assert(InGameContext.levelContext != null);
                DebugHelper.Assert(!string.IsNullOrEmpty(InGameContext.levelContext.m_levelDesignFileName));
                if (string.IsNullOrEmpty(InGameContext.levelContext.m_levelArtistFileName))
                {
                    MonoSingleton <GameLoader> .get_instance().AddLevel(InGameContext.levelContext.m_levelDesignFileName);
                }
                else
                {
                    MonoSingleton <GameLoader> .get_instance().AddDesignSerializedLevel(InGameContext.levelContext.m_levelDesignFileName);

                    MonoSingleton <GameLoader> .get_instance().AddArtistSerializedLevel(InGameContext.levelContext.m_levelArtistFileName);
                }
                MonoSingleton <GameLoader> .get_instance().AddSoundBank("Effect_Common");

                MonoSingleton <GameLoader> .get_instance().AddSoundBank("System_Voice");
            }
            GameInfoBase gameInfoBase = InGameContext.CreateGameInfo();

            DebugHelper.Assert(gameInfoBase != null, "can't create game logic object!");
            this.gameInfo = gameInfoBase;
            gameInfoBase.PreBeginPlay();
            Singleton <BattleLogic> .get_instance().m_LevelContext = this.gameInfo.gameContext.levelContext;

            try
            {
                DebugHelper.CustomLog("GameBuilder Start Game: ispvplevel={0} ispvpmode={4} levelid={1} leveltype={6} levelname={3} Gametype={2} pick={5}", new object[]
                {
                    InGameContext.levelContext.IsMobaMode(),
                    InGameContext.levelContext.m_mapID,
                    InGameContext.levelContext.GetGameType(),
                    InGameContext.levelContext.m_levelName,
                    InGameContext.levelContext.IsMobaMode(),
                    InGameContext.levelContext.GetSelectHeroType(),
                    InGameContext.levelContext.m_pveLevelType
                });
                Player hostPlayer = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer();

                if (hostPlayer != null)
                {
                    DebugHelper.CustomLog("HostPlayer player id={1} name={2} ", new object[]
                    {
                        hostPlayer.PlayerId,
                        hostPlayer.Name
                    });
                }
            }
            catch (Exception)
            {
            }
            if (!MonoSingleton <GameFramework> .get_instance().EditorPreviewMode)
            {
                this.m_fLoadProgress = 0f;
                MonoSingleton <GameLoader> .GetInstance().Load(new GameLoader.LoadProgressDelegate(this.onGameLoadProgress), new GameLoader.LoadCompleteDelegate(this.OnGameLoadComplete));

                MonoSingleton <VoiceSys> .GetInstance().HeroSelectTobattle();

                Singleton <GameStateCtrl> .GetInstance().GotoState("LoadingState");
            }
            return(gameInfoBase);
        }