Beispiel #1
0
    public void ChangeNameAck(long nResult)
    {
        if (nResult == 0L)
        {
            TsLog.Log("이름 변경 성공", new object[0]);
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo();
            personInfo.SetCharName(this.m_newName);
            NrTSingleton <NrMainSystem> .Instance.SetLatestPersonID(personInfo.GetPersonID().ToString());

            MsgHandler.Handle("Req_CONNECT_GAMESERVER_REQ", new object[]
            {
                personInfo.GetPersonID()
            });
            FacadeHandler.MoveStage(Scene.Type.PREPAREGAME);
            NrTSingleton <NkQuestManager> .Instance.SortingQuestInGroup();

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHANGENAME_DLG);
        }
        else if (nResult == -20L)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("90"));
            this.m_btOk.SetEnabled(true);
        }
        else
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("91"));
            this.m_btOk.SetEnabled(true);
        }
    }
Beispiel #2
0
 public void ClickForm(object a_oObject)
 {
     TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "ATTACK-FORMATION", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
     SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2;
     FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
     this.Close();
 }
    public void ClickMemberStart(IUIObject obj)
    {
        byte b;

        if (this.m_iCurSelectIndex < 0)
        {
            b = this.GetEmptyRaidBattlePos();
        }
        else
        {
            b = (byte)this.m_iCurSelectIndex;
        }
        ApplyInfo applyInfoFromRaidBattlePos = this.GetApplyInfoFromRaidBattlePos(b);

        if (applyInfoFromRaidBattlePos != null)
        {
            b = this.GetEmptyRaidBattlePos();
        }
        if (b < 0 || b >= 9)
        {
            return;
        }
        SoldierBatch.SOLDIER_BATCH_MODE    = eSOLDIER_BATCH_MODE.MODE_GUILDWAR_MAKEUP;
        SoldierBatch.GuildWarRaidUnique    = this.m_iRaidUnique;
        SoldierBatch.GuildWarRaidBattlePos = b;
        FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
    }
 public void OnBtnClickGoMilitary(IUIObject obj)
 {
     TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "ATTACK-FORMATION", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
     SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_EXPEDITION_MAKEUP;
     SoldierBatch.EXPEDITION_INFO.ExpeditionCreateDataID = (int)this.m_expeditionSearch_info.i16xpeditionCreateDataID;
     SoldierBatch.EXPEDITION_INFO.m_eExpeditionGrade     = (eEXPEDITION_GRADE)this.m_expeditionSearch_info.ui8ExpeditionGrade;
     FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
 }
Beispiel #5
0
 public bool GS_AUTH_SESSION_ACK()
 {
     TsLog.Log("{0}.GS_AUTH_SESSION_ACK", new object[]
     {
         StageSystem.GetCurrentStageName()
     });
     FacadeHandler.MoveStage(Scene.Type.SELECTCHAR);
     return(true);
 }
 public bool OnGameServerConnected()
 {
     TsLog.Log("{0}.Rcv_WS_CONNECT_GAMESERVER_ACK", new object[]
     {
         StageSystem.GetCurrentStageName()
     });
     FacadeHandler.Req_GS_AUTH_SESSION_REQ(NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_UID, NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_siAuthSessionKey, NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID(), 0, 403);
     return(true);
 }
Beispiel #7
0
 public void OnFinish()
 {
     TsAudio.RefreshAllAudioVolumes();
     if (SystemInfo.processorCount == 1)
     {
         TsAudio.SetDisableDownloadAudio(EAudioType.AMBIENT, true);
         TsAudio.SetDisableDownloadAudio(EAudioType.ENVIRONMENT, true);
     }
     FacadeHandler.EndNPATCHDownLoad(false);
 }
 public void SetClearMiddleStage()
 {
     switch (Scene.CurScene)
     {
     case Scene.Type.BATTLE:
     case Scene.Type.CUTSCENE:
     case Scene.Type.SOLDIER_BATCH:
         FacadeHandler.PopStage();
         break;
     }
 }
Beispiel #9
0
    private void ClickPractice(IUIObject obj)
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (charPersonInfo.InfiBattlePersonID != myCharInfo.m_PersonID && charPersonInfo.InfiBattlePersonID > 0L)
            {
                TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMIT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE;
                FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
            }
        }
    }
Beispiel #10
0
    private void BattleMatch(IUIObject obj)
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_INFIBATTLE_COOLTIME);
        long curTime     = PublicMethod.GetCurTime();

        if (curTime < charSubData)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("862"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_LEVEL);
            if (myCharInfo.GetLevel() < value)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"),
                    "level",
                    value
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            long num = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_INFIBATTLECOUNT);
            if (num < 0L)
            {
                num = 0L;
            }
            if (num > 0L)
            {
                TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMIT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_INFIBATTLE;
                FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
            }
            else
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("684"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
        }
    }
Beispiel #11
0
 public bool Update_MovingChannel()
 {
     if (this.tickCount + 5000 > Environment.TickCount)
     {
         return(false);
     }
     FacadeHandler.Req_GS_AUTH_SESSION_REQ(this.m_UID, 0, this.m_CID, 1, 404);
     TsLog.Log(string.Concat(new object[]
     {
         "Update_MovingChannel() [",
         this.m_UID,
         " / ",
         this.m_CID,
         "]"
     }), new object[0]);
     return(true);
 }
Beispiel #12
0
    public void OnPlunderStart(IUIObject obj)
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_DELAYTIME);
        long curTime     = PublicMethod.GetCurTime();
        long num         = charSubData - curTime;

        if (num > 0L)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("136"),
                "timestring",
                PublicMethod.ConvertTime(num)
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (myCharInfo != null)
        {
            int  level = myCharInfo.GetLevel();
            long num2;
            if (level > 50)
            {
                num2 = (long)(level * (level - COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD2)));
            }
            else
            {
                num2 = (long)(level * COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD));
            }
            if (num2 > myCharInfo.m_Money)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
        }
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMIT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PLUNDER;
        FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
    }
Beispiel #13
0
    public bool OnGameServerConnected()
    {
        if (NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID() == 0L)
        {
            MsgBoxUI msgBoxUI = (MsgBoxUI)NrTSingleton <FormsManager> .Instance.LoadGroupForm(G_ID.MSGBOX_DLG);

            if (msgBoxUI != null)
            {
                msgBoxUI.SetMsg(new YesDelegate(this._OnMessageBoxOK_QuitGame), null, "경고", "lastpersonid가 0이다,,...\r\n어플을 재실행해주세요.", eMsgType.MB_OK, 2);
            }
        }
        TsLog.LogWarning("{0}.Rcv_WS_CONNECT_GAMESERVER_ACK", new object[]
        {
            StageSystem.GetCurrentStageName()
        });
        FacadeHandler.Req_GS_AUTH_SESSION_REQ(NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_UID, NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_siAuthSessionKey, NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID(), 0, 402);
        return(true);
    }
    public override void Update()
    {
        base.Update();
        MyCharInfoDlg myCharInfoDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MYCHARINFO_DLG) as MyCharInfoDlg;

        if (myCharInfoDlg != null)
        {
            myCharInfoDlg.Update();
        }
        if (this.m_bAniPlay && !this.m_goAnimation.animation.isPlaying)
        {
            SoldierBatch.DailyDungeonDifficulty = this.m_nDifficult;
            SoldierBatch.SOLDIER_BATCH_MODE     = eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON;
            FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
            this.m_bAniPlay        = false;
            this.m_bRestoreReserve = true;
            UIDataManager.MuteSound(false);
        }
    }
Beispiel #15
0
    public void ReLogin(bool bShow = true)
    {
        if (this.m_ReLogin)
        {
            return;
        }
        this.m_bSendPing       = false;
        this.m_nLatestPersonID = 0L;
        BaseNet_Game.GetInstance().Quit();
        BaseNet_Login.GetInstance().Quit();
        NrTSingleton <NkAutoRelogin> .Instance.SetActivity(false);

        Option.SetPause(false);
        TsLog.LogError("NEED REFACTORING - Old Stage Stack System Access!!!!!!!!!!!!", new object[0]);
        FacadeHandler.ClearStageStack();
        FacadeHandler.MoveStage(Scene.Type.LOGIN);
        this.ClearGameInfo(bShow);
        this.m_ReLogin = true;
    }
Beispiel #16
0
    protected override void OnUpdateAfterStagePrework()
    {
        if (NrTSingleton <NkCharManager> .Instance.CharacterListSetComplete && !this.m_bCalledNextStage)
        {
            if (NrLoadPageScreen.LoginLatestChar)
            {
                if ((NrCharUser)NrTSingleton <NkCharManager> .Instance.GetCharByPersonID(NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID()) == null)
                {
                    MsgBoxUI msgBoxUI = (MsgBoxUI)NrTSingleton <FormsManager> .Instance.LoadGroupForm(G_ID.MSGBOX_DLG);

                    if (msgBoxUI != null)
                    {
                        msgBoxUI.SetMsg(new YesDelegate(this._OnMessageBoxOK_QuitGame), null, "경고", "캐릭터 정보를 읽어오는데 실패하였습니다...\r\n어플을 재실행해주세요.", eMsgType.MB_OK, 2);
                        NrLoadPageScreen.ShowHideLoadingImg(false);
                    }
                    TsLog.LogWarning("CID {0} User not found!", new object[]
                    {
                        NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID()
                    });
                }
                else
                {
                    TsLog.LogWarning("StagePacketMsgHandler.CONNECT_GAMESERVER_REQ=============", new object[0]);
                    MsgHandler.Handle("Req_CONNECT_GAMESERVER_REQ", new object[]
                    {
                        NrTSingleton <NrMainSystem> .Instance.GetLatestPersonID()
                    });
                    NrTSingleton <NkQuestManager> .Instance.SortingQuestInGroup();

                    FacadeHandler.MoveStage(Scene.Type.PREPAREGAME);
                }
            }
            else
            {
                TsLog.LogWarning("==========NEXT STAGE=============", new object[0]);
                FacadeHandler.MoveStage(Scene.Type.SELECTCHAR);
            }
            this.m_bCalledNextStage = true;
        }
    }
 public override void OnEnter()
 {
     TsLog.Log("====== {0}.OnEnter", new object[]
     {
         base.GetType().FullName
     });
     Scene.ChangeSceneType(this.SceneType());
     Scene.ChangeSubSceneType(Scene.SubType.EMPTY);
     FacadeHandler.NotifyUnityVersion();
     this._InitSubStages();
     TsSceneSwitcher.Instance.ClearAllScene();
     CommonTasks.ClearAssetBundleResources(true);
     this.scenePath = string.Format("map/fx_charactercreate_mobile{0}", Option.extAsset);
     base.StartTaskSerial(CommonTasks.InitializeChangeScene());
     base.StartTaskSerial(CommonTasks.LoadEmptyMainScene());
     base.StartTaskSerial(CommonTasks.LoadLevelSubScene(this.scenePath, Option.defaultStackName));
     base.StartTaskSerial(this._MoveSubStageSelect());
     base.StartTaskSerial(CommonTasks.LoadEnvironment(true));
     base.StartTaskSerial(this._PostProcessSelectCharScene());
     base.StartTaskSerial(CommonTasks.MemoryCleaning(true, 8));
     base.StartTaskSerial(CommonTasks.FinalizeChangeScene(true));
     base.StartTaskSerial(this._LoginCheck());
 }
    public bool OnWebCall(string WebCall)
    {
        bool flag = false;

        Debug.Log("OnWebCall = " + WebCall);
        if (WebCall.Contains("close"))
        {
            TsPlatform.Operator.CloseWebView();
            if (Scene.CurScene == Scene.Type.LOGIN)
            {
                NrMobileAuthSystem.Instance.Auth.DeleteAuthInfo();
            }
            MsgHandler.Handle("ShowPlatformLogin", new object[0]);
            return(true);
        }
        if (WebCall.Contains("InternetConnnetError"))
        {
            Debug.Log("!!!!!!!InternetConnnetError!!");
            MsgHandler.Handle("InternetConnnetErrorMessage", new object[0]);
            TsPlatform.Operator.CloseWebView();
            MsgHandler.Handle("ShowPlatformLogin", new object[0]);
            return(true);
        }
        string value = "mobile/android_server_list_proc.aspx";

        if (WebCall.Length == 0 || !WebCall.Contains(value))
        {
            return(true);
        }
        if (WebCall.Contains(value))
        {
            string[] array = WebCall.Split(new char[]
            {
                '?'
            });
            if (array.Length < 1)
            {
                return(flag);
            }
            string[] array2 = array[1].Split(new char[]
            {
                '&'
            });
            string text = string.Empty;
            if (array2.Length >= 0)
            {
                string[] array3 = array2[0].Split(new char[]
                {
                    '='
                });
                if (array3.Length > 0)
                {
                    text = array3[1];
                }
            }
            string text2 = text;
            switch (text2)
            {
            case "0":
            {
                TsPlatform.Operator.CloseWebView();
                string text3 = array2[1].Split(new char[]
                    {
                        '='
                    })[1];
                string text4 = array2[2].Split(new char[]
                    {
                        '='
                    })[1];
                string text5 = array2[3].Split(new char[]
                    {
                        '='
                    })[1];
                string text6 = array2[4].Split(new char[]
                    {
                        '='
                    })[1];
                string text7 = array2[5].Split(new char[]
                    {
                        '='
                    })[1];
                string text8 = array2[7].Split(new char[]
                    {
                        '='
                    })[1];
                if (!string.IsNullOrEmpty(text5))
                {
                    long num2 = 0L;
                    long.TryParse(text5, out num2);
                    NrTSingleton <NrMainSystem> .Instance.SetLatestPersonID(num2.ToString());
                }
                long cID = TsPlatform.Operator.GetCID();
                if (cID != 0L)
                {
                    NrTSingleton <NrMainSystem> .Instance.SetLatestPersonID(cID.ToString());
                }
                NrTSingleton <NrMainSystem> .Instance.m_strWorldServerIP = text3.Trim();
                if (!int.TryParse(text4.Trim(), out NrTSingleton <NrMainSystem> .Instance.m_nWorldServerPort))
                {
                    NrTSingleton <NrMainSystem> .Instance.m_nWorldServerPort = Client.GetWorldServerPort();
                }
                NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_szAuthKey     = text6.Trim();
                NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nSerialNumber = long.Parse(text7.Trim());
                PlayerPrefs.SetString(NrPrefsKey.PLAYER_PREFS_MOBILEAUTHKEY, NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_szAuthKey);
                if (text8.Equals(NrGlobalReference.CDNTYPE))
                {
                    NrTSingleton <NrGlobalReference> .Instance.ChangeEdgeDataCDNPath();
                }
                if (text8.Equals(NrGlobalReference.CDNTYPEUS))
                {
                    NrTSingleton <NrGlobalReference> .Instance.ChangeEdgeDataCDNPath();
                }
                Debug.LogError(string.Concat(new string[]
                    {
                        "======================== CDNTYPE : ",
                        NrGlobalReference.CDNTYPE,
                        " === CDNTYPEUS ",
                        NrGlobalReference.CDNTYPEUS,
                        " === ",
                        text8
                    }));
                if (NrTSingleton <NrGlobalReference> .Instance.localWWW)
                {
                    FacadeHandler.MoveStage(Scene.Type.INITIALIZE);
                }
                else
                {
                    FacadeHandler.MoveStage(Scene.Type.NPATCH_DOWNLOAD);
                }
                ErrorCollectorManager.Start(Application.dataPath, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceAreaInfo().szOriginalDataCDNPath, new ECHandler(), long.Parse(text7.Trim()), NrTSingleton <NkClientLogic> .Instance.GetPlayerPlatformType(), (int)NrTSingleton <NkClientLogic> .Instance.AuthPlatformType, NrTSingleton <NrGlobalReference> .Instance.STR_MOBILE_VER);
                TsLog.LogWarning("OnWecall Complete!!!", new object[0]);
                flag = true;
                break;
            }

            case "errMsg":
            {
                TsPlatform.Operator.CloseWebView();
                this.DeleteAuthInfo();
                string text9 = array2[1].Split(new char[]
                    {
                        '='
                    })[1];
                text9 = WWW.UnEscapeURL(text9);
                MsgHandler.Handle("LoginFailed", new object[]
                    {
                        text9
                    });
                flag = true;
                break;
            }

            case "ReLogin":
                TsPlatform.Operator.CloseWebView();
                this.DeleteAuthInfo();
                MsgHandler.Handle("LoginFailed", new object[]
                {
                    text
                });
                flag = true;
                break;
            }
            if (!flag)
            {
                this.DeleteAuthInfo();
                MsgHandler.Handle("LoginFailed", new object[]
                {
                    "WebCallError"
                });
                flag = true;
            }
        }
        return(flag);
    }
Beispiel #19
0
 public void OnAttackMakeUp(IUIObject obj)
 {
     TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "ATTACK-FORMATION", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
     SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP;
     FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
 }
Beispiel #20
0
 protected override void OnUpdateAfterStagePrework()
 {
     FacadeHandler.MoveStage(Scene.Type.LOGIN);
 }
Beispiel #21
0
 protected override void OnUpdateAfterStagePrework()
 {
     if (NPatchLauncherBehaviour.Instance.IsFinish)
     {
         if (NPatchLauncherBehaviour.Instance.ErrorString == string.Empty)
         {
             if ((int)Launcher.Instance._status.totalSize > 0)
             {
                 FacadeHandler.EndNPATCHDownLoad(true);
                 if (!this.bPatchEnd)
                 {
                     if (!Launcher.Instance.IsFullPatchLevel)
                     {
                         NrTSingleton <MATEventManager> .Instance.MeasureEvent("Content DL end");
                     }
                     else
                     {
                         NrTSingleton <MATEventManager> .Instance.MeasureEvent("Add Content DL end");
                     }
                 }
                 this.bPatchEnd = true;
             }
             else
             {
                 FacadeHandler.EndNPATCHDownLoad(false);
             }
         }
         else
         {
             new MB_PatchError
             {
                 OK = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("40")
             }.Show(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("41"), NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("2"), MessageBox.Type.OK);
         }
         return;
     }
     if (this.PreDownloadDlg != null)
     {
         float num = 0f;
         this.PreDownloadDlg.SetTotalProgress(0f, 0f, string.Empty);
         long   num2       = Launcher.Instance._status.totalSize;
         long   num3       = Launcher.Instance._status.totalProcessedSize;
         string taskStatus = Launcher.Instance._status.taskStatus;
         if (num2 == 0L || num3 == 0L)
         {
         }
         num3 = Launcher.Instance._status.taskProcessedSize;
         num2 = Launcher.Instance._status.taskSize;
         float num4 = (float)num3 / (float)num2;
         if (Launcher.Instance._status.fullPackCount * 2 > Launcher.Instance._status.totalTaskProcessedCount)
         {
             int   fullPackCount = Launcher.Instance._status.fullPackCount;
             float num5          = 1f / (float)fullPackCount;
             if (Launcher.Instance._status.taskType == TASKTYPE.DOWNLOAD)
             {
                 num3 = (long)Launcher.Instance._status.totalTaskProcessedCount;
                 num2 = (long)Launcher.Instance._status.fullPackCount;
                 if (Launcher.Instance._status.totalTaskProcessedCount <= 0)
                 {
                     num = num4 * num5 * 0.8f;
                 }
                 else
                 {
                     if (num4 == 1f)
                     {
                         num = ((float)Launcher.Instance._status.totalTaskProcessedCount - 1f) * num5 * 0.8f + num4 * num5 * 0.8f;
                     }
                     else
                     {
                         num = (float)Launcher.Instance._status.totalTaskProcessedCount * num5 * 0.8f + num4 * num5 * 0.8f;
                     }
                     if (num > 0.8f)
                     {
                         num = 0.8f;
                     }
                 }
             }
             else if (Launcher.Instance._status.taskType == TASKTYPE.INSTALL)
             {
                 int num6 = Launcher.Instance._status.totalTaskProcessedCount - Launcher.Instance._status.fullPackCount;
                 num = (float)num6 * num5 * 0.1f + num4 * num5 * 0.1f + 0.8f;
             }
         }
         else
         {
             num2 = (long)(Launcher.Instance._status.totalTaskCount - Launcher.Instance._status.fullPackCount * 2);
             num3 = (long)(Launcher.Instance._status.totalTaskProcessedCount - Launcher.Instance._status.fullPackCount * 2);
             num  = (float)num3 / (float)num2 * 0.1f + 0.9f;
             if (num > 1f)
             {
                 num = 1f;
             }
             if (Time.realtimeSinceStartup - this.fTime > 0.2f)
             {
                 this.fTime = Time.realtimeSinceStartup;
             }
         }
         if (Launcher.Instance.IsRunning)
         {
             this.PreDownloadDlg.SetTotalProgress(num, num4, taskStatus);
         }
         else
         {
             this.PreDownloadDlg.UpdateTotalProgress(num, num4, num2, taskStatus);
         }
     }
 }
 private void On_Click_GameStart(IUIObject a_oObject)
 {
     FacadeHandler.MoveStage(Scene.Type.INITIALIZE);
 }
    public void Other()
    {
        if (NkInputManager.GetKeyUp(KeyCode.F9))
        {
        }
        if (NkInputManager.GetKeyUp(KeyCode.F10))
        {
            NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NEWEXPLORATION_MAIN_DLG);
        }
        if (NkInputManager.GetKeyUp(KeyCode.Z) && NkInputManager.GetKey(KeyCode.LeftShift))
        {
            GameObject gameObject = GameObject.Find("back light");
            if (gameObject != null)
            {
                gameObject.SetActive(false);
            }
        }
        if (NkInputManager.GetKeyUp(KeyCode.Q) && NkInputManager.GetKey(KeyCode.LeftShift))
        {
            NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.QUEST_GM_DLG);
        }
        if (NkInputManager.GetKeyUp(KeyCode.C) && NkInputManager.GetKey(KeyCode.LeftShift))
        {
            Screen.fullScreen = !Screen.fullScreen;
        }
        if (NkInputManager.GetKeyUp(KeyCode.C) && NkInputManager.GetKey(KeyCode.RightShift))
        {
            NkWorldMapATB worldMapATB = NrTSingleton <MapManager> .Instance.GetWorldMapATB();

            if (worldMapATB != null)
            {
                worldMapATB.ShowCellGrid();
            }
        }
        if (NkInputManager.GetKeyUp(KeyCode.U) && NkInputManager.GetKey(KeyCode.RightShift))
        {
            GUICamera.ShowUI_Toggle();
        }
        if (NkInputManager.GetKeyUp(KeyCode.D) && NkInputManager.GetKey(KeyCode.LeftShift))
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MESSAGE_DLG))
            {
                NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.MESSAGE_DLG);
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.Hide(G_ID.MESSAGE_DLG);
            }
        }
        if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKey(KeyCode.LeftControl) && NkInputManager.GetKeyUp(KeyCode.D))
        {
            NrTSingleton <MapManager> .Instance.ShowDestPosition(true);
        }
        if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKey(KeyCode.LeftAlt) && NkInputManager.GetKeyUp(KeyCode.D))
        {
            NrTSingleton <MapManager> .Instance.ShowDestPosition(false);
        }
        if (NkInputManager.GetKeyDown(KeyCode.Alpha1) && NkInputManager.GetKey(KeyCode.LeftShift) && Scene.CurScene != Scene.Type.BATTLE)
        {
            NrTSingleton <NkCharManager> .Instance.ToggleShowCharUnique();

            NrTSingleton <NkQuestManager> .Instance.ToggleQeustUnique();
        }
        if (NkInputManager.GetKeyDown(KeyCode.P) && NkInputManager.GetKey(KeyCode.LeftShift))
        {
            NrTSingleton <NrAutoPath> .Instance.ShowRPPoint();
        }
        if (NkInputManager.GetKeyDown(KeyCode.P) && NkInputManager.GetKey(KeyCode.RightShift))
        {
            NrTSingleton <NrAutoPath> .Instance.ClearRPPoint();
        }
        if (!NkInputManager.GetKey(KeyCode.LeftAlt) || NkInputManager.GetKeyUp(KeyCode.K))
        {
        }
        if (NkInputManager.GetKeyUp(KeyCode.S) && NkInputManager.GetKey(KeyCode.LeftShift))
        {
            if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.DLG_AUDIO))
            {
                NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_AUDIO);
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.Hide(G_ID.DLG_AUDIO);
            }
        }
        if (!NkInputManager.GetKeyUp(KeyCode.Alpha2) || NkInputManager.GetKey(KeyCode.LeftShift))
        {
        }
        if (NkInputManager.GetKeyUp(KeyCode.A) && NkInputManager.GetKey(KeyCode.LeftShift) && !Scene.IsCurScene(Scene.Type.SOLDIER_BATCH))
        {
            SoldierBatch.SOLDIER_BATCH_MODE        = eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP;
            SoldierBatch.GUILDBOSS_INFO.m_i16Floor = 1;
            FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
        }
    }