Esempio n. 1
0
 private void RankingListHandler(ranking_getlist api)
 {
     foreach (var player in api.api_list)
     {
         int rate = DecodeRate(player);
         switch (player.api_mxltvkpyuklh)
         {
             case 1:
                 if (Number1.Point < rate)
                     Number1 = new RankRecord
                     {
                         Point = rate,
                         Diff = rate - Number1.Point
                     };
                 else if (Number1.Point > rate)
                     Number1 = new RankRecord
                     {
                         Point = rate,
                         Diff = 0
                     };
                 break;
             case 5:
                 if (Number5.Point < rate)
                     Number5 = new RankRecord
                     {
                         Point = rate,
                         Diff = rate - Number5.Point
                     };
                 else if (Number5.Point > rate)
                     Number5 = new RankRecord
                     {
                         Point = rate,
                         Diff = 0
                     };
                 break;
             case 20:
                 if (Number20.Point < rate)
                     Number20 = new RankRecord
                     {
                         Point = rate,
                         Diff = rate - Number20.Point
                     };
                 else if (Number20.Point > rate)
                     Number20 = new RankRecord
                     {
                         Point = rate,
                         Diff = 0
                     };
                 break;
             case 100:
                 if (Number100.Point < rate)
                     Number100 = new RankRecord
                     {
                         Point = rate,
                         Diff = rate - Number100.Point
                     };
                 else if (Number100.Point > rate)
                     Number100 = new RankRecord
                     {
                         Point = rate,
                         Diff = 0
                     };
                 break;
             case 500:
                 if (Number500.Point < rate)
                     Number500 = new RankRecord
                     {
                         Point = rate,
                         Diff = rate - Number500.Point
                     };
                 else if (Number500.Point > rate)
                     Number500 = new RankRecord
                     {
                         Point = rate,
                         Diff = 0
                     };
                 break;
         }
         if (player.api_mtjmdcwtvhdr == Staff.Current.Admiral.Nickname && player.api_itbrdpdbkynm == Staff.Current.Admiral.Comment)
         {
             if (MyLastPoint != rate || MyRank != player.api_mxltvkpyuklh)
             {
                 MyRank = player.api_mxltvkpyuklh;
                 MyLastPoint = rate;
                 myLastExp = myLastExpStore;
                 OnPropertyChanged(nameof(MyPoint));
             }
         }
     }
 }
Esempio n. 2
0
 private int DecodeRate(ranking_getlist.ranking_list api)
     => api.api_wuhnhojjxmke / magic_r[api.api_mxltvkpyuklh % 13] / magic[Staff.Current.Admiral.MemberID % 10] - 91;