Пример #1
0
    private string GetElementSolMsg(eElement_MsgType eType)
    {
        string result = string.Empty;

        switch (eType)
        {
        case eElement_MsgType.eElement_NOTSOL:
            result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1649");

            break;

        case eElement_MsgType.eElement_NEEDEXP:
            result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1650");

            break;

        case eElement_MsgType.eElement_NEEDGRADE:
            result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1651");

            break;

        case eElement_MsgType.eElement_SOLHEIGHT:
            result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1691");

            break;

        case eElement_MsgType.eElement_OK:
            result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1575");

            break;
        }
        return(result);
    }
Пример #2
0
    private NkSoldierInfo GetBattleSolDataCheck(ref eElement_MsgType eElement_Msg, int i32CharKind, byte bCharGrade)
    {
        NkSoldierInfo    result         = null;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return(result);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current != null)
            {
                if (current.GetSolID() != NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID())
                {
                    if (current.GetSolPosType() == 0 && current.GetCharKind() == i32CharKind && current.GetLegendType() == 0 && !current.IsAtbCommonFlag(1L))
                    {
                        this.GetSolGradeCheck(ref result, ref eElement_Msg, current, bCharGrade - 1);
                    }
                }
            }
        }
        return(result);
    }
Пример #3
0
 private void GetSolGradeCheck(ref NkSoldierInfo pkSolinfo, ref eElement_MsgType eElement_Msg, NkSoldierInfo pkReadySolinfo, byte bCharGrade)
 {
     if (NrTSingleton <ContentsLimitManager> .Instance.IsSolGuideCharKindInfo(pkReadySolinfo.GetCharKind()))
     {
         eElement_Msg = eElement_MsgType.eElement_NOTSOL;
         TsLog.LogOnlyEditor("!!!! CONTENTLIMIT SOL CHARKIND ERROR {0}" + this.m_SelectSlotData.i32KindInfo + " !!");
         return;
     }
     if (pkReadySolinfo == null)
     {
         return;
     }
     if (pkReadySolinfo.IsCostumeEquip())
     {
         return;
     }
     if (pkReadySolinfo.GetMaxSkillLevel())
     {
         if (pkReadySolinfo.GetGrade() >= bCharGrade)
         {
             if (pkReadySolinfo.GetGrade() == bCharGrade)
             {
                 if (eElement_Msg == eElement_MsgType.eElement_OK)
                 {
                     if (pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
                     {
                         pkSolinfo = pkReadySolinfo;
                     }
                 }
                 else
                 {
                     eElement_Msg = eElement_MsgType.eElement_OK;
                     pkSolinfo    = pkReadySolinfo;
                 }
             }
             else if (eElement_Msg < eElement_MsgType.eElement_NEEDGRADE)
             {
                 eElement_Msg = eElement_MsgType.eElement_SOLHEIGHT;
                 pkSolinfo    = pkReadySolinfo;
             }
             else if (eElement_Msg == eElement_MsgType.eElement_SOLHEIGHT && pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
             {
                 pkSolinfo = pkReadySolinfo;
             }
         }
         else if (eElement_Msg < eElement_MsgType.eElement_NEEDGRADE)
         {
             eElement_Msg = eElement_MsgType.eElement_NEEDGRADE;
             pkSolinfo    = pkReadySolinfo;
         }
         else if (eElement_Msg == eElement_MsgType.eElement_NEEDGRADE && pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
         {
             pkSolinfo = pkReadySolinfo;
         }
     }
     else if (eElement_Msg < eElement_MsgType.eElement_NEEDEXP)
     {
         eElement_Msg = eElement_MsgType.eElement_NEEDEXP;
         pkSolinfo    = pkReadySolinfo;
     }
     else if (eElement_Msg == eElement_MsgType.eElement_NEEDEXP && pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
     {
         pkSolinfo = pkReadySolinfo;
     }
 }
    public void AddLegendElement(NkSoldierInfo kSoldierInfo, int iCount)
    {
        byte             b                = this.m_CharKind_Legendinfo.ui8Base_LegendGrade[iCount] - 1;
        NkSoldierInfo    nkSoldierInfo    = null;
        eElement_MsgType eElement_MsgType = eElement_MsgType.eElement_NONE;

        this.GetLegendSolGradeCheck(ref nkSoldierInfo, ref eElement_MsgType, kSoldierInfo, b);
        if (nkSoldierInfo == null)
        {
            return;
        }
        NewListItem    newListItem  = new NewListItem(this.m_NewListBox_Reincarnate.ColumnNum, true, string.Empty);
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nkSoldierInfo.GetCharKind());

        if (charKindInfo == null)
        {
            TsLog.LogOnlyEditor("!!!!!!!!!! SolGuild - Element CharKind " + nkSoldierInfo.GetCharKind() + " Error");
            return;
        }
        int num = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_LEGEND_ADVENT_HERO);

        if (num < 0)
        {
            num = 0;
        }
        this.m_eElement_Msg[iCount] = eElement_MsgType;
        if (kSoldierInfo.GetCharKind() == num)
        {
            this.m_eElement_Msg[iCount] = eElement_MsgType.eElement_OK;
        }
        newListItem.SetListItemData(8, false);
        newListItem.SetListItemData(9, false);
        newListItem.SetListItemData(3, new NkListSolInfo
        {
            SolCharKind = this.m_CharKind_Legendinfo.i32Base_CharKind[iCount],
            SolGrade    = (int)b
        }, null, null, null);
        newListItem.SetListItemData(4, charKindInfo.GetName(), null, null, null);
        string text = this.GetElementSolMsg(this.m_eElement_Msg[iCount]);

        newListItem.SetListItemData(5, text, null, null, null);
        if (nkSoldierInfo == null)
        {
            UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_B_Addlist");

            if (uIBaseInfoLoader != null)
            {
                newListItem.SetListItemData(10, uIBaseInfoLoader, iCount, new EZValueChangedDelegate(this.OnClickUseSol), null);
            }
            else
            {
                newListItem.SetListItemData(10, string.Empty, iCount, new EZValueChangedDelegate(this.OnClickUseSol), null);
            }
        }
        else
        {
            UIBaseInfoLoader uIBaseInfoLoader2 = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_B_Addlist");

            if (uIBaseInfoLoader2 != null)
            {
                newListItem.SetListItemData(10, uIBaseInfoLoader2, iCount, new EZValueChangedDelegate(this.OnClickUseSol), null);
            }
        }
        if (this.m_eElement_Msg[iCount] == eElement_MsgType.eElement_OK || this.m_eElement_Msg[iCount] == eElement_MsgType.eElement_SOLHEIGHT)
        {
            newListItem.SetListItemData(0, true);
            newListItem.SetListItemData(1, false);
            newListItem.SetListItemData(11, false);
            if (nkSoldierInfo == null)
            {
                newListItem.SetListItemData(6, false);
                newListItem.SetListItemData(7, false);
                return;
            }
            newListItem.SetListItemData(6, true);
            newListItem.SetListItemData(7, nkSoldierInfo.GetListSolInfo(false), null, null, null);
            this.m_Element_SolID.SetLegendSol(nkSoldierInfo, iCount);
        }
        else
        {
            newListItem.SetListItemData(0, false);
            newListItem.SetListItemData(1, true);
            if (nkSoldierInfo == null)
            {
                newListItem.SetListItemData(6, false);
                newListItem.SetListItemData(7, false);
                newListItem.SetListItemData(11, false);
                return;
            }
            newListItem.SetListItemData(6, true);
            newListItem.SetListItemData(7, nkSoldierInfo.GetListSolInfo(false), null, null, null);
            newListItem.SetListItemData(11, true);
            this.m_Element_SolID.SetLegendSol(nkSoldierInfo, iCount);
        }
        bool flag = false;

        for (int i = 0; i < 6; i++)
        {
            if (nkSoldierInfo.GetEquipItemInfo() != null)
            {
                ITEM item = nkSoldierInfo.GetEquipItemInfo().m_kItem[i].GetItem();
                if (item == null)
                {
                    TsLog.LogWarning("!!!!!!!!!!!!!! CharKind {0} : Item pos{1}  ==  ITEM NULL ", new object[]
                    {
                        nkSoldierInfo.GetCharKind(),
                        i
                    });
                }
                else if (item.m_nItemUnique != 0)
                {
                    flag = true;
                }
            }
        }
        if (flag)
        {
            newListItem.SetListItemData(5, false);
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("627");

            newListItem.SetListItemData(8, true);
            newListItem.SetListItemData(9, true);
            newListItem.SetListItemData(9, text, nkSoldierInfo, new EZValueChangedDelegate(this.OnClickReleaseEquip), null);
        }
        else if (nkSoldierInfo.GetFriendPersonID() != 0L)
        {
            newListItem.SetListItemData(5, false);
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("74");

            newListItem.SetListItemData(8, true);
            newListItem.SetListItemData(9, true);
            newListItem.SetListItemData(9, text, nkSoldierInfo, new EZValueChangedDelegate(this.OnClickUnsetSolHelp), null);
        }
        newListItem.Data = nkSoldierInfo.GetSolID();
        this.m_NewListBox_Reincarnate.RemoveAdd(iCount, newListItem);
        this.m_NewListBox_Reincarnate.RepositionItems();
        this.SetButtonLegendReincarnate();
        bool flag2 = this.SetButtonLegendTime();

        if (!flag2)
        {
            this.m_btn_Legend.SetEnabled(flag2);
        }
        this.GetTimeToString();
    }