예제 #1
0
    public void SetListFriendRank()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        long         charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MATCHPOINT);
        UI_RANKINFO  item        = new UI_RANKINFO(charPersonInfo.GetCharName(), (byte)charPersonInfo.GetLevel(0L), charSubData);

        this.ListRankInfo.Add(item);
        this.ListRankInfo.Sort(new Comparison <UI_RANKINFO>(PlunderRankInfoDlg.CompareMatchPoint));
        int num = 1;

        foreach (UI_RANKINFO current in this.ListRankInfo)
        {
            current.i32Rank = num;
            num++;
        }
        foreach (UI_RANKINFO current2 in this.ListRankInfo)
        {
            if (current2.Charname == charPersonInfo.GetCharName())
            {
                this.TargetInfo = current2;
                this.i32NewRank = this.TargetInfo.i32Rank;
                break;
            }
        }
    }
예제 #2
0
 private static int CompareLevel(UI_RANKINFO x, UI_RANKINFO y)
 {
     if (x.i32Rank > y.i32Rank)
     {
         return(1);
     }
     return(-1);
 }
예제 #3
0
 private static int CompareMatchPoint(UI_RANKINFO x, UI_RANKINFO y)
 {
     if (x.i64MatchPoint < y.i64MatchPoint)
     {
         return(1);
     }
     if (x.i64MatchPoint == y.i64MatchPoint)
     {
         return(0);
     }
     return(-1);
 }
예제 #4
0
 public void SetTargetInfo(PLUNDER_RANKINFO info)
 {
     this.TargetInfo = new UI_RANKINFO(info);
 }
예제 #5
0
    public void AddFriendRankInfo(PLUNDER_FRIEND_RANKINFO info)
    {
        UI_RANKINFO item = new UI_RANKINFO(info);

        this.ListRankInfo.Add(item);
    }