コード例 #1
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);
    }
コード例 #2
0
    public void SetList()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        this.m_lbCurrentStatus.Clear();
        string text  = string.Empty;
        string empty = string.Empty;
        int    num   = 0;

        foreach (EXPEDITION_CURRENT_STATE_INFO current in this.m_listExpedition_CurrentStatus)
        {
            NewListItem newListItem = new NewListItem(this.m_lbCurrentStatus.ColumnNum, true, string.Empty);
            if ((current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 3) && current.i64Time == current.i64CheckBattleTime)
            {
                newListItem.SetListItemData(0, true);
                newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"), current, new EZValueChangedDelegate(this.OnClickBackMove), null);
            }
            else
            {
                newListItem.SetListItemData(0, false);
            }
            newListItem.SetListItemData(1, this.GetExpeditionState(current), null, null, null);
            if (current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 2 || current.ui8ExpeditionState == 4)
            {
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo != null)
                {
                    NkSoldierInfo leaderSolInfo = validExpeditionMilitaryInfo.GetLeaderSolInfo();
                    if (leaderSolInfo != null)
                    {
                        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(leaderSolInfo.GetCharKind(), leaderSolInfo.GetGrade());

                        if (eventHeroCharCode != null)
                        {
                            newListItem.SetListItemData(5, "Win_I_EventSol", null, null, null);
                        }
                        else
                        {
                            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo.GetCharKind(), (int)leaderSolInfo.GetGrade());

                            if (legendFrame != null)
                            {
                                newListItem.SetListItemData(5, legendFrame, null, null, null);
                            }
                            else
                            {
                                newListItem.SetListItemData(5, "Win_I_Cancel", null, null, null);
                            }
                        }
                        newListItem.SetListItemData(7, leaderSolInfo.GetListSolInfo(false), null, null, null);
                        newListItem.SetListItemData(3, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    }
                    newListItem.SetListItemData(9, leaderSolInfo.GetCharKindInfo().GetName(), null, null, null);
                }
                EXPEDITION_CREATE_DATA expedtionCreateData = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData != null)
                {
                    EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expedtionCreateData.EXPEDITION_GRADE);
                    if (expeditionDataFromGrade != null)
                    {
                        newListItem.SetListItemData(8, false);
                        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(expeditionDataFromGrade.Expedition_ICON_NAME);

                        if (uIBaseInfoLoader != null)
                        {
                            newListItem.SetListItemData(4, uIBaseInfoLoader, current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        }
                        newListItem.SetListItemData(10, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_GRADE_INTERFACEKEY), null, null, null);
                    }
                }
            }
            else if (current.ui8ExpeditionState == 3)
            {
                EXPEDITION_CREATE_DATA expedtionCreateData2 = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData2 != null)
                {
                    int num2 = expedtionCreateData2.EXPEDITION_ECO[0];
                    ECO eco  = NrTSingleton <NrBaseTableManager> .Instance.GetEco(num2.ToString());

                    if (eco != null)
                    {
                        newListItem.SetListItemData(7, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), null, null, null);
                        newListItem.SetListItemData(3, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        newListItem.SetListItemData(9, NrTSingleton <NrCharKindInfoManager> .Instance.GetName(NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0])), null, null, null);
                    }
                }
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo2 = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo2 != null)
                {
                    NkSoldierInfo leaderSolInfo2 = validExpeditionMilitaryInfo2.GetLeaderSolInfo();
                    if (leaderSolInfo2 != null)
                    {
                        UIBaseInfoLoader legendFrame2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo2.GetCharKind(), (int)leaderSolInfo2.GetGrade());

                        if (legendFrame2 != null)
                        {
                            newListItem.SetListItemData(6, legendFrame2, null, null, null);
                        }
                        else
                        {
                            newListItem.SetListItemData(6, "Win_I_Cancel", null, null, null);
                        }
                        newListItem.SetListItemData(8, leaderSolInfo2.GetListSolInfo(false), null, null, null);
                    }
                    newListItem.SetListItemData(4, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    newListItem.SetListItemData(10, leaderSolInfo2.GetCharKindInfo().GetName(), null, null, null);
                }
            }
            newListItem.Data = current;
            this.m_lbCurrentStatus.Add(newListItem);
            num++;
        }
        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1633");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            text,
            "count1",
            this.m_Page,
            "count2",
            this.m_MaxPage
        });

        this.m_bxPage.SetText(empty);
        this.m_lbCurrentStatus.RepositionItems();
    }
コード例 #3
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);
    }