Ejemplo n.º 1
0
 public override void Refresh(object _data)
 {
     if (this.data == _data)
     {
         return;
     }
     this.data = (PVPTargetDaata)_data;
     this.ShowRankData();
 }
Ejemplo n.º 2
0
 private void RefreshRankData()
 {
     LocalPlayer player = Globals.Instance.Player;
     if (!Globals.Instance.Player.PvpSystem.ShowSelfRank())
     {
         this.selfRank.text = string.Empty;
     }
     else
     {
         this.selfRank.text = player.PvpSystem.Rank.ToString();
     }
     bool flag = false;
     PvpInfo pvpInfo = null;
     foreach (PvpInfo current in Globals.Instance.AttDB.PvpDict.Values)
     {
         if (current.ArenaHighRank <= player.PvpSystem.Rank && player.PvpSystem.Rank <= current.ArenaLowRank)
         {
             this.RefreshRankReward(current);
             flag = true;
             break;
         }
         if (pvpInfo == null || pvpInfo.ArenaLowRank < current.ArenaLowRank)
         {
             pvpInfo = current;
         }
     }
     if (!flag)
     {
         this.RefreshRankReward(pvpInfo);
     }
     this.mTargetTable.ClearData();
     List<RankData> arenaTargets = Globals.Instance.Player.PvpSystem.ArenaTargets;
     for (int i = 0; i < arenaTargets.Count; i++)
     {
         if (arenaTargets[i] != null)
         {
             PVPTargetDaata data = new PVPTargetDaata(arenaTargets[i]);
             this.mTargetTable.AddData(data);
             if (player.Data.ID == arenaTargets[i].Data.GUID && i > 2)
             {
                 this.mTargetTable.focusID = arenaTargets[i - 2].Data.GUID;
             }
         }
     }
     this.mTargetTable.repositionNow = true;
 }