public void Refresh(WorldBossInfo bossInfo) { if (bossInfo != null) { int highRank = bossInfo.HighRank; int lowRank = bossInfo.LowRank; if (lowRank == highRank) { this.mRank.text = Singleton<StringManager>.Instance.GetString("activityLuckyDrawRuleRank", new object[] { lowRank }); } else { this.mRank.text = Singleton<StringManager>.Instance.GetString("activityLuckyDrawRuleRank", new object[] { string.Format("{0}~{1}", lowRank, highRank) }); } if (bossInfo.RewardType[0] == 2) { this.mGemNum.text = bossInfo.RewardValue1[0].ToString(); } else { this.mGemNum.text = "0"; } } }
public override void Refresh(object data) { if (this.mUserData == data) { return; } this.mUserData = (BillboardInfoData)data; this.mRankData = (RankData)this.mUserData.userData; int rank = this.GetRank(); foreach (WorldBossInfo current in Globals.Instance.AttDB.WorldBossDict.Values) { if (current != null && current.LowRank <= rank && (rank <= current.HighRank || current.HighRank == 0)) { this.wbInfo = current; break; } } this.Refresh(); }