예제 #1
0
    public void ClickOK(IUIObject obj)
    {
        if (this.m_BaseComposeData != null && this.m_NowSelectItemCount > 0 && !this.m_bRequest)
        {
            if (this.bSendServerOK)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("181"),
                    "targetname",
                    NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_BaseComposeData.m_nComposeItemUnique)
                });

                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                msgBoxUI.SetMsg(new YesDelegate(this.OnSendComposeOk), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("1983"), empty, eMsgType.MB_OK_CANCEL, 2);
            }
            else
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("606"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
        }
    }
예제 #2
0
    public void OnClickMilitaryReturn(IUIObject obj)
    {
        MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = obj.Data as MINE_GUILD_CURRENTSTATUS_INFO;

        if (mINE_GUILD_CURRENTSTATUS_INFO == null)
        {
            return;
        }
        if (mINE_GUILD_CURRENTSTATUS_INFO.i64MineID <= 0L)
        {
            return;
        }
        long num = 0L;
        MINE_CONSTANT_Manager instance = MINE_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            num = (long)instance.GetValue(eMINE_CONSTANT.eMINE_CONSTANT_MINE_RETURN_TIME);
        }
        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

        string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("161");

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromMessageBox2,
            "count",
            num.ToString()
        });

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnStartBackMove), mINE_GUILD_CURRENTSTATUS_INFO, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL, 2);
    }
    public void OnClickStartMine(IUIObject obj)
    {
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "FORMATION-COMPLETE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        int tempCount = SoldierBatch.SOLDIERBATCH.GetTempCount();
        int num       = 5;

        if (tempCount <= 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("181"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (tempCount < num)
        {
            this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnCompleteMineBatch), tempCount, num);
            return;
        }
        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

        string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("157");

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnCompleteMineBatch), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2);
    }
예제 #4
0
    private void OnClickApply(IUIObject obj)
    {
        if (this.m_iInputNum < this.m_iMinValue || this.m_iInputNum > this.m_iMaxValue)
        {
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (string.Empty == this.m_strTitle)
            {
                this.m_strTitle = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1643");
            }
            if (string.Empty == this.m_strText)
            {
                this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1644");
            }
            this.m_strMessage = string.Format("{0}({1} ~ {2})", this.m_strText, this.m_iMinValue.ToString(), this.m_iMaxValue.ToString());
            msgBoxUI.SetMsg(null, null, this.m_strTitle, this.m_strMessage, eMsgType.MB_OK, 2);
            return;
        }
        if (this.m_deApply != null)
        {
            this.m_deApply(this, this.m_object_Apply);
        }
        this.Close();
    }
예제 #5
0
    private void OnClickMaxSkillUpdate(IUIObject obj)
    {
        if (Scene.CurScene == Scene.Type.BATTLE)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("547"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (this.m_i32SkillUnique <= 0)
        {
            return;
        }
        if (this.pkSolinfo == null)
        {
            return;
        }
        if (this.nMaxNeedMoney_real > this.nHaveMoney)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            LackGold_dlg lackGold_dlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.GOLDLACK_DLG) as LackGold_dlg;

            if (lackGold_dlg != null)
            {
                lackGold_dlg.SetData(this.nMaxNeedMoney_real - this.nHaveMoney);
            }
            return;
        }
        if (this.pkSolinfo.GetSolPosType() == 2 || this.pkSolinfo.GetSolPosType() == 6)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("357"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        string           empty           = string.Empty;
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(this.m_i32SkillUnique);

        if (battleSkillBase != null)
        {
            string text = ANNUALIZED.Convert(this.nMaxNeedMoney_real);
            int    num  = this.pkSolinfo.GetBattleSkillLevel(this.m_i32SkillUnique) + this.nMaxSkillLevel_real;
            if (this.m_CheckCanMaxSkillUp)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("329"),
                    "skillname",
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey),
                    "level",
                    num.ToString(),
                    "maxskillgold",
                    text
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("330"),
                    "skillname",
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey),
                    "level",
                    num.ToString(),
                    "maxskillgold",
                    text
                });
            }
            msgBoxUI.SetMsg(new YesDelegate(this.OnSendOKSetBattleSkill), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1223"), empty, eMsgType.MB_OK_CANCEL, 2);
        }
    }
예제 #6
0
    public override void Update()
    {
        NrTSingleton <NrUpdateProcessor> .Instance.MainUpdate();

        if (NkInputManager.GetKeyDown(KeyCode.Escape))
        {
            this.m_ResolutionWindow = !this.m_ResolutionWindow;
        }
        if (!TsPlatform.IsEditor || NkInputManager.GetKeyUp(KeyCode.Alpha3))
        {
        }
        if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha3))
        {
            TsLog.LogError("GetMonoHeapSize = {0},  GetMonoUsedSize = {1} , usedHeapSize = {2} ", new object[]
            {
                Profiler.GetMonoHeapSize(),
                Profiler.GetMonoUsedSize(),
                Profiler.usedHeapSize
            });
            MemoryCollection.Print(MemoryCollection.Mode.LoadedAll);
        }
        if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha2))
        {
            NrTSingleton <NrMainSystem> .Instance.CleanUpImmediate();
        }
        if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha4))
        {
            NrTSingleton <FormsManager> .Instance.DeleteAll();
        }
        if (!TsPlatform.IsEditor || !NkInputManager.GetKey(KeyCode.LeftShift) || NkInputManager.GetKeyUp(KeyCode.Alpha0))
        {
        }
        if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha5))
        {
            TsPlatform.FileLog("AppMemory : " + NrTSingleton <NrMainSystem> .Instance.AppMemory);
        }
        if (TsPlatform.IsMobile && !TsPlatform.IsEditor && Input.GetKeyUp(KeyCode.Escape))
        {
            string   text     = "FromESC";
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                string b = msgBoxUI.GetYesObject() as string;
                if (text != null && text == b && this.IsBattleStop())
                {
                    Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg;

                    if (battle_Control_Dlg != null)
                    {
                        battle_Control_Dlg.bESC = false;
                    }
                    this.BattleStopStart(false);
                }
            }
            bool flag = NrTSingleton <FormsManager> .Instance.CloseFormESC();

            if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.ITEMMALL_POPUPSHOP_DLG))
            {
                return;
            }
            if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.TOASTMSG_DLG))
            {
                MsgBoxUI msgBoxUI2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI2 != null)
                {
                    this.BattleStopStart(false);
                    if (Battle.BATTLE != null && !NrTSingleton <ContentsLimitManager> .Instance.IsBattleStopLimit())
                    {
                        Battle_Control_Dlg battle_Control_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg;

                        if (battle_Control_Dlg2 != null)
                        {
                            battle_Control_Dlg2.ShowRetreatWithCancel();
                        }
                    }
                    else
                    {
                        msgBoxUI2.SetMsg(new YesDelegate(this.EscQuitGame), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("7"), NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("38"), eMsgType.MB_OK_CANCEL, 2);
                    }
                }
            }
            else if (!flag && Scene.CurScene != Scene.Type.SELECTCHAR)
            {
                MsgBoxUI msgBoxUI3 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI3 != null)
                {
                    this.BattleStopStart(true);
                    if (Battle.BATTLE != null && !NrTSingleton <ContentsLimitManager> .Instance.IsBattleStopLimit())
                    {
                        Battle_Control_Dlg battle_Control_Dlg3 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg;

                        if (battle_Control_Dlg3 != null)
                        {
                            battle_Control_Dlg3.ShowRetreatWithCancel();
                        }
                    }
                    else
                    {
                        msgBoxUI3.SetMsg(new YesDelegate(this.EscQuitGame), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("7"), NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("38"), eMsgType.MB_OK_CANCEL, 2);
                    }
                }
                NrTSingleton <FiveRocksEventManager> .Instance.Placement("backbutton_click");
            }
        }
        if (NkInputManager.GetKeyDown(KeyCode.Alpha1) && NkInputManager.GetKey(KeyCode.RightShift))
        {
            this.m_bSwitchMyCharInfoGUI = !this.m_bSwitchMyCharInfoGUI;
        }
    }
    public void OnClickReady(IUIObject obj)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        if (!SoldierBatch.BABELTOWER_INFO.IsReadyBattle(charPersonInfo.GetPersonID()))
        {
            if (!SoldierBatch.SOLDIERBATCH.IsHeroBabelBatch())
            {
                string     empty = string.Empty;
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                    "charname",
                    @char.GetCharName()
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
            if (SoldierBatch.BABELTOWER_INFO.Count <= 0)
            {
                SoldierBatch.BABELTOWER_INFO.Count = 1;
            }
            byte count = SoldierBatch.BABELTOWER_INFO.Count;
            int  num;
            if (count == 1)
            {
                num = (int)(12 / count);
            }
            else
            {
                num = (int)(12 / count + 1);
            }
            if (solBatchNum < num)
            {
                string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("21");

                string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("74");

                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    textFromMessageBox2,
                    "currentnum",
                    solBatchNum,
                    "maxnum",
                    num
                });

                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                msgBoxUI.SetMsg(new YesDelegate(this.OnReadyBabel), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2);
                return;
            }
        }
        this.OnReadyBabel(null);
    }
예제 #8
0
    private void Test(IUIObject obj)
    {
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.ClickInit), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("1147"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("100"), eMsgType.MB_OK_CANCEL, 2);
    }
예제 #9
0
    public void ClickNPCInvite(IUIObject obj)
    {
        UIListItemContainer selectItem = this.m_nlbInviteNPC.GetSelectItem();

        if (selectItem == null)
        {
            return;
        }
        if (selectItem.Data == null)
        {
            return;
        }
        AgitNPCData agitNPCData = (AgitNPCData)selectItem.Data;

        if (agitNPCData == null)
        {
            return;
        }
        AgitInfoData agitData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitData(this.m_i16NPCLevel.ToString());

        if (agitData == null)
        {
            return;
        }
        AgitInfoData agitData2 = NrTSingleton <NrBaseTableManager> .Instance.GetAgitData(NrTSingleton <NewGuildManager> .Instance.GetAgitLevel().ToString());

        if (agitData2 == null)
        {
            return;
        }
        NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID);

        if (memberInfoFromPersonID == null)
        {
            return;
        }
        if (memberInfoFromPersonID.GetRank() < NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_OFFICER)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("769"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <NewGuildManager> .Instance.GetFund() < (long)agitData.i32NPCCost)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("754"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (NrTSingleton <NewGuildManager> .Instance.GetAgitNPCSubDataCount() >= (int)agitData2.i8NPCNum)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("770"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        AGIT_NPC_SUB_DATA agitNPCSubDataFromNPCType = NrTSingleton <NewGuildManager> .Instance.GetAgitNPCSubDataFromNPCType(agitNPCData.ui8NPCType);

        if (agitNPCSubDataFromNPCType != null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("771"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode);

        if (charKindInfoFromCode == null)
        {
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("257"),
            "count",
            agitData.i32NPCCost,
            "charname",
            charKindInfoFromCode.GetName(),
            "level",
            this.m_i16NPCLevel
        });

        msgBoxUI.SetMsg(new YesDelegate(this.MsgOKNPCInvite), agitNPCData, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("256"), this.m_strText, eMsgType.MB_OK_CANCEL, 2);
    }
예제 #10
0
    public void SetPushSetting(byte Notice, byte Friend, byte Guild, bool bNotice = false)
    {
        bool[] array = new bool[3];
        bool   flag  = false;

        array[0] = this.PushCheckBoxSetting(this.m_PushBlocks[0], Notice, 0, bNotice);
        array[1] = this.PushCheckBoxSetting(this.m_PushBlocks[1], Friend, 1, bNotice);
        array[2] = this.PushCheckBoxSetting(this.m_PushBlocks[2], Guild, 2, bNotice);
        for (int i = 0; i < 3; i++)
        {
            if (array[i])
            {
                flag = true;
                break;
            }
        }
        if (bNotice && flag)
        {
            Debug.Log("Show MsgBox!!!");
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                StringBuilder stringBuilder      = new StringBuilder();
                string        textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

                string   empty   = string.Empty;
                DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("362"),
                    "time",
                    dueDate.ToString()
                });

                stringBuilder.Append(empty);
                stringBuilder.Append("\n");
                for (int j = 0; j < 3; j++)
                {
                    if (array[j])
                    {
                        if (this.GetPushCheckSetting(this.m_PushBlocks[j]) == 0)
                        {
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                            {
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("364"),
                                "target",
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface((3388 + j).ToString())
                            });
                        }
                        else
                        {
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                            {
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("363"),
                                "target",
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface((3388 + j).ToString())
                            });
                        }
                        stringBuilder.Append(empty);
                        stringBuilder.Append("\n");
                    }
                }
                Debug.Log("ShowMsg : " + stringBuilder.ToString());
                msgBoxUI.SetMsg(null, null, textFromMessageBox, stringBuilder.ToString(), eMsgType.MB_OK, 2);
                msgBoxUI.Show();
            }
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            for (int k = 0; k < 3; k++)
            {
                kMyCharInfo.PushBlock[k] = this.GetPushCheckSetting(this.m_PushBlocks[k]);
            }
        }
    }
예제 #11
0
    protected virtual void ClickTicketList(IUIObject obj)
    {
        UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_nWinID) as UI_UIGuide;

        if (uI_UIGuide != null)
        {
            uI_UIGuide.CloseUI = true;
        }
        else
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.UIGUIDE_DLG);
        }
        if (obj == null)
        {
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.GetCanOpenTicket())
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            return;
        }
        if (obj.Data is eSolRecruitType)
        {
            eSolRecruitType eSolRecruitType   = (eSolRecruitType)((int)obj.Data);
            string          textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1699");

            string text = string.Empty;
            if (eSolRecruitType != eSolRecruitType.SOLRECRUIT_VOUCHER_FREE_HEARTS_RECRUIT)
            {
                if (eSolRecruitType == eSolRecruitType.SOLRECRUIT_ESSENCE_ONE)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("296");
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("127");
                }
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    text,
                    "count",
                    SolRecruitDlg.GetNeedItemNum((int)eSolRecruitType)
                });
            }
            else
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("233");
            }
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), eSolRecruitType, null, null, textFromInterface, text, eMsgType.MB_OK_CANCEL);
            }
        }
        else
        {
            ITEM iTEM = (ITEM)obj.Data;
            if (iTEM != null)
            {
                this.SetGetNowOpenTicket(iTEM);
                this.SolTicketOpen();
                if (this.m_OpenTicket.m_nItemNum > 1)
                {
                    this.m_ReUseTicket = true;
                }
                if (this.m_bTutorial)
                {
                    this.Close();
                }
            }
        }
        this.m_fRequestTime    = Time.time;
        this.m_fScrollPosition = this.m_TicketList.ScrollPosition;
    }
예제 #12
0
    public void OnBtnClickSearch(IUIObject obj)
    {
        string       title       = string.Empty;
        string       text        = string.Empty;
        string       message     = string.Empty;
        byte         b           = (byte)obj.Data;
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo.GetMilitaryList().FindEmptyMineMilitaryIndex() == -1)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("691");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        MINE_DATA      mineDataFromGrade      = BASE_MINE_DATA.GetMineDataFromGrade(b);
        NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(kMyCharInfo.m_PersonID);

        if (memberInfoFromPersonID == null)
        {
            return;
        }
        if (memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("532");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (mineDataFromGrade.MINE_SEARCH_MONEY > kMyCharInfo.m_Money)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (kMyCharInfo.GetLevel() < (int)mineDataFromGrade.POSSIBLELEVEL)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("272");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
            {
                text,
                "count",
                mineDataFromGrade.POSSIBLELEVEL,
                "targetname",
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mineDataFromGrade.MINE_INTERFACEKEY)
            });

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!NrTSingleton <MineManager> .Instance.IsEnoughMineJoinCount())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("405"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsValidMineGrade(b))
        {
            return;
        }
        title = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1316");

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("128");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
        {
            text,
            "count",
            mineDataFromGrade.MINE_SEARCH_MONEY,
            "targetname1",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mineDataFromGrade.MINE_INTERFACEKEY),
            "targetname2",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mineDataFromGrade.MINE_GRADE_INTERFACEKEY)
        });

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnSearch), b, title, message, eMsgType.MB_OK_CANCEL, 2);
    }
예제 #13
0
    private void ClickStart(IUIObject obj)
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
        {
            return;
        }
        NrTSingleton <NrAutoPath> .Instance.ResetData();

        Vector3 lhs  = Vector3.zero;
        Vector2 zero = Vector2.zero;

        if (@char.m_kCharMove == null)
        {
            return;
        }
        int num = 0;

        if (this.m_CurrentQuest != null)
        {
            num = this.m_CurrentQuest.GetQuestCommon().iCastleUnique;
            NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(this.m_CurrentQuest.GetQuestCommon().GiveQuestCharCode);

            if (charKindInfoFromCode != null)
            {
                NrClientNpcPosList clientNpcPosList = NrTSingleton <NkQuestManager> .Instance.GetClientNpcPosList(num);

                if (clientNpcPosList != null)
                {
                    for (int i = 0; i < clientNpcPosList.ClientNpcPosList.Count; i++)
                    {
                        NrClientNpcInfo nrClientNpcInfo = clientNpcPosList.ClientNpcPosList[i];
                        if (nrClientNpcInfo != null && NrTSingleton <NkQuestManager> .Instance.ClinetNpcCreateCheck(nrClientNpcInfo.kStartCon, nrClientNpcInfo.kEndCon) && charKindInfoFromCode.GetCode() == nrClientNpcInfo.strCharCode && num == nrClientNpcInfo.i32MapIndex)
                        {
                            NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                            if (char2 != null && char2.m_kCharMove != null)
                            {
                                lhs    = char2.m_kCharMove.FindFirstPath(num, (short)nrClientNpcInfo.fFixPosX, (short)nrClientNpcInfo.fFixPosY, false);
                                zero.x = nrClientNpcInfo.fFixPosX;
                                zero.y = nrClientNpcInfo.fFixPosY;
                            }
                        }
                    }
                }
                if (lhs == Vector3.zero)
                {
                    NrNpcPos npcPos = NrTSingleton <NrNpcPosManager> .Instance.GetNpcPos(charKindInfoFromCode.GetPosKey(), charKindInfoFromCode.GetCharKind(), num);

                    if (npcPos != null && @char.m_kCharMove != null)
                    {
                        lhs    = @char.m_kCharMove.FindFirstPath(npcPos.nMapIndex, (short)npcPos.kPos.x, (short)npcPos.kPos.z, false);
                        zero.x = npcPos.kPos.x;
                        zero.y = npcPos.kPos.z;
                    }
                }
            }
        }
        else
        {
            num    = this.m_CurrentAdventureInfo.mapIndex;
            lhs    = @char.m_kCharMove.FindFirstPath(num, (short)this.m_CurrentAdventureInfo.destX, (short)this.m_CurrentAdventureInfo.destY, false);
            zero.x = (float)this.m_CurrentAdventureInfo.destX;
            zero.y = (float)this.m_CurrentAdventureInfo.destY;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(0, num))
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        int mapIndex = myCharInfo.m_kCharMapInfo.MapIndex;

        if (num == mapIndex)
        {
            if (lhs != Vector3.zero)
            {
                GS_CHAR_FINDPATH_REQ gS_CHAR_FINDPATH_REQ = new GS_CHAR_FINDPATH_REQ();
                gS_CHAR_FINDPATH_REQ.DestPos.x = lhs.x;
                gS_CHAR_FINDPATH_REQ.DestPos.y = lhs.y;
                gS_CHAR_FINDPATH_REQ.DestPos.z = lhs.z;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_FINDPATH_REQ, gS_CHAR_FINDPATH_REQ);
                TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "QUEST", "AUTOMOVE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
            }
            if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ADVENTURECOLLECT_DLG))
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ADVENTURECOLLECT_DLG);
            }
            base.CloseForm(null);
            NrTSingleton <FormsManager> .Instance.GetForm(G_ID.ADVENTURE_DLG).CloseForm(null);
        }
        else
        {
            string mapName = NrTSingleton <MapManager> .Instance.GetMapName(num);

            if (mapName != string.Empty)
            {
                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI == null)
                {
                    return;
                }
                ICollection gateInfo_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo_Col();

                if (gateInfo_Col == null)
                {
                    return;
                }
                int num2 = 0;
                foreach (GATE_INFO gATE_INFO in gateInfo_Col)
                {
                    if (num == gATE_INFO.DST_MAP_IDX)
                    {
                        num2 = gATE_INFO.GATE_IDX;
                    }
                }
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("4"),
                    "mapname",
                    mapName
                });

                msgBoxUI.SetMsg(new YesDelegate(this.MapWarp), num2, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("3"), empty, eMsgType.MB_OK_CANCEL, 2);
                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("109"));
                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11"));
                this.m_nAutoMoveMapIndex  = num;
                this.m_nAutoMoveGateIndex = num2;
                NrTSingleton <NkQuestManager> .Instance.AutoMoveMapIndex = this.m_nAutoMoveMapIndex;
                NrTSingleton <NkQuestManager> .Instance.AutoMove         = true;
                NrTSingleton <NkQuestManager> .Instance.AutoMoveDestPos  = zero;
            }
        }
    }
예제 #14
0
    public void OnBtnClickSearch(IUIObject obj)
    {
        string       title       = string.Empty;
        string       text        = string.Empty;
        string       message     = string.Empty;
        byte         b           = (byte)obj.Data;
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolCount() == 0)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("528");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (kMyCharInfo.GetMilitaryList().FindEmptyExpeditionMilitaryIndex() == -1)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("765");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(b);

        if (expeditionDataFromGrade.Expedition_SEARCH_MONEY > kMyCharInfo.m_Money)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (kMyCharInfo.GetLevel() < (int)expeditionDataFromGrade.Possiblelevel)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("272");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
            {
                text,
                "count",
                expeditionDataFromGrade.Possiblelevel,
                "targetname",
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_INTERFACEKEY)
            });

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        long num = 0L;
        EXPEDITION_CONSTANT_MANAGER instance = EXPEDITION_CONSTANT_MANAGER.GetInstance();

        if (instance != null)
        {
            num = (long)instance.GetValue(eEXPEDITION_CONSTANT.eEXPEDITION_DAY_COUNT);
        }
        if (num > 0L && kMyCharInfo.GetCharDetail(10) >= num)
        {
            message = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("405");

            Main_UI_SystemMessage.ADDMessage(message, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        title = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1316");

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("128");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref message, new object[]
        {
            text,
            "count",
            expeditionDataFromGrade.Expedition_SEARCH_MONEY,
            "targetname1",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_INTERFACEKEY),
            "targetname2",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_GRADE_INTERFACEKEY)
        });

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnSearch), b, title, message, eMsgType.MB_OK_CANCEL, 2);
    }
예제 #15
0
    public void TabCharMove()
    {
        if (!NrTSingleton <NkQuestManager> .Instance.IsCompletedFirstQuest())
        {
            return;
        }
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser != null)
        {
            if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
            {
                nrCharUser.m_kCharMove.MoveStop(true, true);
                return;
            }
            if (this.bMouseCharMove)
            {
                nrCharUser.m_kCharMove.MoveStop(true, true);
                nrCharUser.m_kCharMove.SendCharMovePacketForKeyBoardMove(true);
                this.bMouseCharMove = false;
                this.SetSafeClickTime(-0.2f);
                return;
            }
        }
        this.UpdateWalkEffect(false);
        if (!NrTSingleton <NkClientLogic> .Instance.IsPickingEnable())
        {
            NrTSingleton <NkClientLogic> .Instance.SetPickingEnable(true);

            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.IsMovable())
        {
            return;
        }
        if (this.fSafeClickTime > 0f && Time.time - this.fSafeClickTime < 0.5f)
        {
            return;
        }
        NrCharUser nrCharUser2 = nrCharUser;

        if (nrCharUser == null)
        {
            return;
        }
        if (nrCharUser2.GetFollowCharPersonID() > 0L)
        {
            NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_STOPAUTOMOVE);
        }
        else
        {
            if (Launcher.Instance.LocalPatchLevel != Launcher.Instance.PatchLevelMax && NrTSingleton <NrAutoPath> .Instance.IsAutoMoving())
            {
                string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168");

                string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("240");

                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                msgBoxUI.SetMsg(new YesDelegate(this.OnAutoMoveStop), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2);
                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320"));
                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321"));
                return;
            }
            NrCharBase pickChar = NrTSingleton <NkClientLogic> .Instance.GetPickChar();

            if (pickChar != null)
            {
                if (NrTSingleton <NkClientLogic> .Instance.GetFocusChar() == null)
                {
                    pickChar.CancelClickMe();
                    nrCharUser2.m_kCharMove.SetTargetChar(null);
                }
                else
                {
                    pickChar.SetClickMe();
                    if (!pickChar.IsCharKindATB(32L))
                    {
                        nrCharUser2.m_kCharMove.SetTargetChar(pickChar);
                    }
                    else
                    {
                        nrCharUser2.m_kCharMove.SetTargetChar(null);
                    }
                }
            }
            else
            {
                NrCharBase targetChar = nrCharUser2.m_kCharMove.GetTargetChar();
                if (targetChar != null)
                {
                    targetChar.CancelClickMe();
                }
                nrCharUser2.m_kCharMove.SetTargetChar(null);
            }
            nrCharUser2.PickingMove();
        }
        Dlg_Collect dlg_Collect = (Dlg_Collect)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_COLLECT);

        if (dlg_Collect != null)
        {
            dlg_Collect.OnClose();
        }
        this.fSafeClickTime = 0f;
    }
예제 #16
0
    private void Click_Refresh(IUIObject _obj)
    {
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return;
        }
        TIMESHOP_REFRESHDATA tIMESHOP_REFRESHDATA = NrTSingleton <NrTableTimeShopManager> .Instance.Get_TimeShopRefreshData(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.RefreshCount);

        if (tIMESHOP_REFRESHDATA == null)
        {
            return;
        }
        string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(tIMESHOP_REFRESHDATA.m_i32ItemUnique);

        string text = string.Empty;

        if (!NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
        {
            byte timeShopFreeCountByVipLevel = NrTSingleton <NrTableVipManager> .Instance.GetTimeShopFreeCountByVipLevel(this.m_i8VipLevel);

            byte b = (byte)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetCharDetail(29);

            if (b < timeShopFreeCountByVipLevel)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("445");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    text,
                    "freecount",
                    (int)(timeShopFreeCountByVipLevel - b)
                });

                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI != null)
                {
                    msgBoxUI.SetMsg(new YesDelegate(this.Request_Refresh), tIMESHOP_REFRESHDATA, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168"), text, eMsgType.MB_OK_CANCEL, 2);
                }
                return;
            }
        }
        long num = (long)NkUserInventory.GetInstance().Get_First_ItemCnt(tIMESHOP_REFRESHDATA.m_i32ItemUnique) - tIMESHOP_REFRESHDATA.m_i64ItemNum;

        if (num < 0L)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("442");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text,
                "targetitem3",
                itemNameByItemUnique,
                "targetitem3num",
                Mathf.Abs((float)num)
            });

            MsgBoxUI msgBoxUI2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI2 != null)
            {
                msgBoxUI2.SetMsg(new YesDelegate(this.Open_ItemMall), tIMESHOP_REFRESHDATA, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168"), text, eMsgType.MB_OK_CANCEL, 2);
            }
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("441");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text,
                "itemname",
                itemNameByItemUnique,
                "count",
                tIMESHOP_REFRESHDATA.m_i64ItemNum
            });

            MsgBoxUI msgBoxUI3 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI3 != null)
            {
                msgBoxUI3.SetMsg(new YesDelegate(this.Request_Refresh), tIMESHOP_REFRESHDATA, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("168"), text, eMsgType.MB_OK_CANCEL, 2);
            }
        }
    }
예제 #17
0
    private void BtnDoubleClickQuestList(object sender)
    {
        UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.UIGUIDE_DLG) as UI_UIGuide;

        if (uI_UIGuide != null)
        {
            uI_UIGuide.CloseUI = true;
        }
        if (string.Empty != this.m_szSelectQuestUnique)
        {
            CQuest questByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestByQuestUnique(this.m_szSelectQuestUnique);

            if (questByQuestUnique == null)
            {
                string text = this.m_szSelectQuestUnique.Replace(this.m_ChallengeUniqueDistinguish, string.Empty);
                if (string.IsNullOrEmpty(text))
                {
                    return;
                }
                short          unique         = short.Parse(text);
                ChallengeTable challengeTable = NrTSingleton <ChallengeManager> .Instance.GetChallengeTable(unique);

                if (challengeTable == null)
                {
                    return;
                }
                this.ShowClickQuestOpenDlg(challengeTable.m_szOpenUI, challengeTable.m_nUnique);
                return;
            }
            else
            {
                QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(questByQuestUnique.GetQuestUnique());

                if (questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_ONGOING)
                {
                    for (int i = 0; i < 3; i++)
                    {
                        if (questByQuestUnique.GetQuestCommon().cQuestCondition[i].i32QuestCode == 155)
                        {
                            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                            if (msgBoxUI != null)
                            {
                                string empty = string.Empty;
                                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                                {
                                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1533"),
                                    "targetname",
                                    NrTSingleton <NrCharKindInfoManager> .Instance.GetName((int)questByQuestUnique.GetQuestCommon().cQuestCondition[1].i64Param)
                                });

                                msgBoxUI.SetMsg(new YesDelegate(NrTSingleton <NkQuestManager> .Instance.OpenQuestBattle), questByQuestUnique, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1532"), empty, eMsgType.MB_OK_CANCEL, 2);
                                msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("320"));
                                msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("321"));
                                return;
                            }
                        }
                    }
                }
                NrTSingleton <NkQuestManager> .Instance.QuestAutoMove(this.m_szSelectQuestUnique);

                if (null != this.m_Touch)
                {
                    this.m_Touch.RenderEnabled = false;
                    this.bClickTouch           = true;
                }
            }
        }
    }
예제 #18
0
    private void ClickSell(IUIObject obj)
    {
        if (this.m_kSelectItem != null)
        {
            ITEM iTEM = this.m_kSelectItem.Data as ITEM;
            if (iTEM != null && iTEM.IsLock())
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("726"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
                return;
            }
        }
        GuildWarExchangeTable guildWarExchangeTable = (GuildWarExchangeTable)this.m_kSelectItem.Data;

        if (guildWarExchangeTable == null)
        {
            return;
        }
        if (this.m_GuildWar_Exchange_Limit.ContainsKey(this.m_nSelectItemUnique) && this.m_GuildWar_Exchange_Limit[this.m_nSelectItemUnique].i32ExchangeLimit == 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("842"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
            return;
        }
        if (guildWarExchangeTable.m_nExchangeLimit != -1)
        {
            if (this.m_GuildWar_Exchange_Limit.ContainsKey(this.m_nSelectItemUnique))
            {
                if (this.m_nSelectItemNum > this.m_GuildWar_Exchange_Limit[this.m_nSelectItemUnique].i32ExchangeLimit)
                {
                    Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("841"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
                    return;
                }
            }
            else if (this.m_nSelectItemNum > guildWarExchangeTable.m_nExchangeLimit)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("841"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN);
                return;
            }
        }
        GS_EXCHANGE_GUILDWAR_CHECK_REQ gS_EXCHANGE_GUILDWAR_CHECK_REQ = new GS_EXCHANGE_GUILDWAR_CHECK_REQ();

        gS_EXCHANGE_GUILDWAR_CHECK_REQ.nItemUnique = this.m_nSelectItemUnique;
        gS_EXCHANGE_GUILDWAR_CHECK_REQ.nItemNum    = this.m_nSelectItemNum;
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2257");

        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("204");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[]
        {
            textFromMessageBox,
            "targetname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_nSelectItemUnique),
            "count",
            this.m_nSelectItemNum
        });

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI != null)
        {
            msgBoxUI.SetMsg(new YesDelegate(this.BuyItem), gS_EXCHANGE_GUILDWAR_CHECK_REQ, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL);
        }
    }
    public void OnClickStartMythRaid(IUIObject obj)
    {
        byte partyCount       = SoldierBatch.MYTHRAID_INFO.GetPartyCount();
        byte readyPersonCount = SoldierBatch.MYTHRAID_INFO.GetReadyPersonCount();

        if (!SoldierBatch.SOLDIERBATCH.IsHeroBabelBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (partyCount != readyPersonCount)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("182"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();

        if (solBatchNum <= 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("181"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int solBatchNum2 = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();

        if (SoldierBatch.MYTHRAID_INFO.Count <= 0)
        {
            SoldierBatch.MYTHRAID_INFO.Count = 1;
        }
        byte count = SoldierBatch.MYTHRAID_INFO.Count;
        int  num   = (int)(12 / count);

        if (solBatchNum2 < num)
        {
            string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("21");

            string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("74");

            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                textFromMessageBox2,
                "currentnum",
                solBatchNum2,
                "maxnum",
                num
            });

            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            msgBoxUI.SetMsg(new YesDelegate(this.OnStartMythRaid), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2);
            return;
        }
        if (solBatchNum2 > num)
        {
            Debug.LogError("최대 배치 수 이상 배치되어 있음");
            return;
        }
        this.OnStartMythRaid(null);
    }
예제 #20
0
    private void ListBoxSelect(IUIObject obj)
    {
        ListBox             listBox      = (ListBox)obj;
        UIListItemContainer selectedItem = listBox.SelectedItem;

        if (selectedItem == null)
        {
            Debug.LogError("CommunityPopupMenuUI_DLG.cs --ListBoxSelectUIListItemContainer l_listitem == null");
            return;
        }
        switch ((int)selectedItem.Data)
        {
        case 1:
        {
            GS_OTHERCHAR_INFO_PERMIT_REQ gS_OTHERCHAR_INFO_PERMIT_REQ = new GS_OTHERCHAR_INFO_PERMIT_REQ();
            gS_OTHERCHAR_INFO_PERMIT_REQ.nPersonID = this.m_nPersonID;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_OTHERCHAR_INFO_PERMIT_REQ, gS_OTHERCHAR_INFO_PERMIT_REQ);
            break;
        }

        case 2:
        {
            NrCharBase charByPersonID = NrTSingleton <NkCharManager> .Instance.GetCharByPersonID(this.m_nPersonID);

            Debug.Log("eCOMMUNITYMENU_WHISPER >> nPersonID : " + this.m_nPersonID.ToString() + " Name : " + charByPersonID.GetCharName());
            GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ();
            gS_WHISPER_REQ.RoomUnique = 0;
            TKString.StringChar(charByPersonID.GetCharName(), ref gS_WHISPER_REQ.Name);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
            break;
        }

        case 4:
        {
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            if (nrCharUser != null && this.m_nPersonID > 0L)
            {
                nrCharUser.SetFollowCharPersonID(this.m_nPersonID, this.m_SelectFriendName);
            }
            break;
        }

        case 5:
        {
            NrCharBase charByPersonID2 = NrTSingleton <NkCharManager> .Instance.GetCharByPersonID(this.m_nPersonID);

            if (charByPersonID2 != null)
            {
                NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.POST_DLG);
            }
            break;
        }

        case 6:
            if (this.m_SelectFriendName != null && this.m_nPersonID != -1L)
            {
                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI != null)
                {
                    string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("8");

                    string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("328");

                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        textFromMessageBox,
                        "Charname",
                        this.m_SelectFriendName
                    });

                    msgBoxUI.SetMsg(new YesDelegate(this.FriendDelYes), null, textFromInterface, empty, eMsgType.MB_OK_CANCEL, 2);
                }
            }
            break;

        case 7:
            return;
        }
        this.Close();
    }