Example #1
0
    private void SetSolInitiativeColum(NkSoldierInfo LastSolInfo, NkSoldierInfo NowSolInfo, int index, ref NewListItem item, ref int ShowIndex)
    {
        string empty = string.Empty;

        if (LastSolInfo != null && LastSolInfo.GetInitiativeValue() != NowSolInfo.GetInitiativeValue())
        {
            ShowIndex = index + 1;
        }
        EVENT_HERODATA eventHeroCheck = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCheck(NowSolInfo.GetCharKind(), NowSolInfo.GetGrade());

        if (eventHeroCheck != null)
        {
            item.SetListItemData(1, "Win_I_EventSol", null, null, null);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(NowSolInfo.GetCharKind(), (int)NowSolInfo.GetGrade());

            if (legendFrame != null)
            {
                item.SetListItemData(1, legendFrame, null, null, null);
            }
            else
            {
                item.SetListItemData(1, "Win_I_Cancel", null, null, null);
            }
        }
        item.SetListItemData(5, ShowIndex.ToString(), NowSolInfo.GetInitiativeValue(), null, null);
        item.SetListItemData(4, NowSolInfo.GetListSolInfo(true), NowSolInfo, null, null);
        item.SetListItemData(2, NowSolInfo.GetName(), null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            NowSolInfo.GetLevel().ToString(),
            "count2",
            NowSolInfo.GetSolMaxLevel().ToString()
        });

        item.SetListItemData(3, empty, null, null, null);
        item.SetListItemData(8, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeDown), null);
        item.SetListItemData(9, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeUP), null);
        item.SetListItemData(11, NowSolInfo.GetInitiativeValue().ToString(), null, null, null);
        float num = 0f;

        if (NowSolInfo.GetInitiativeValue() >= 0)
        {
            num = (float)NowSolInfo.GetInitiativeValue() / 100f;
            this.m_oldHSInittiativeValue.Add(num);
        }
        item.SetFloatListItemData(12, num, index, new EZValueChangedDelegate(this.OnMoveSlider), null);
        int charKind = 0;

        if (NowSolInfo.IsAtbCommonFlag(8L))
        {
            charKind = 1;
        }
        item.SetListItemData(13, charKind, index, new EZValueChangedDelegate(this.ClickOnlySkillCheckBox), null);
    }
Example #2
0
 public void SoltInitiativeBatch(bool OpenFirst)
 {
     if (this.m_SoldierInfoSortList.Count <= 0)
     {
         return;
     }
     if (OpenFirst)
     {
         this.m_SoldierInfoSortList.Sort(new Comparison <NkSoldierInfo>(this.CompareInitiative_High));
         for (int i = 0; i < this.m_SoldierInfoSortList.Count; i++)
         {
             NkSoldierInfo nkSoldierInfo = this.m_SoldierInfoSortList[i];
             if (nkSoldierInfo != null)
             {
                 this.m_SolInitiativeList.Add(nkSoldierInfo.GetInitiativeValue());
                 short item = 0;
                 if (nkSoldierInfo.IsAtbCommonFlag(8L))
                 {
                     item = 1;
                 }
                 this.m_SolOnlySkillList.Add(item);
             }
         }
     }
     else
     {
         this.m_SoldierInfoSortList.Sort(new Comparison <NkSoldierInfo>(this.CompareInitiative_HighNew));
     }
 }
Example #3
0
 private int COMPARE_INITIATIVE(NkSoldierInfo a, NkSoldierInfo b)
 {
     return(b.GetInitiativeValue().CompareTo(a.GetInitiativeValue()));
 }