// Token: 0x06001A09 RID: 6665 RVA: 0x002C27DC File Offset: 0x002C09DC public void SetData(byte CastleID) { this.CastleID = CastleID; CastleSkin castleSkin = GUIManager.Instance.BuildingData.castleSkin; CastleSkinTbl recordByKey = castleSkin.CastleSkinTable.GetRecordByKey((ushort)CastleID); byte level = GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level; this.MainImg.sprite = castleSkin.GetUISprite(recordByKey.Graphic, level); this.MainImg.material = castleSkin.GetUIMaterial(recordByKey.Graphic, level); this.MainImg.SetNativeSize(); float num = (float)recordByKey.UnlockPercentage * 0.01f * 0.3f; this.MainImg.rectTransform.localScale = new Vector3(num, num, num); this.SetStar(castleSkin.GetCastleEnhance(CastleID)); if (GUIManager.Instance.BuildingData.CastleID == CastleID) { this.AddImg.sprite = this.StarArray.GetSprite(3); this.AddImg.enabled = true; } else if (!castleSkin.CheckUnlock(CastleID)) { this.AddImg.sprite = this.StarArray.GetSprite(2); this.AddImg.enabled = true; } else { this.AddImg.enabled = false; } this.NoticeObj.SetActive(!castleSkin.CheckSelect(CastleID)); this.SelectImg.color = new Color(1f, 1f, 1f, 0f); }
// Token: 0x0600114D RID: 4429 RVA: 0x001E7EE0 File Offset: 0x001E60E0 private int CompareAll(ushort x, ushort y) { CastleSkin castleSkin = GUIManager.Instance.BuildingData.castleSkin; CastleSkinTbl recordByKey = castleSkin.CastleSkinTable.GetRecordByKey(x); CastleSkinTbl recordByKey2 = castleSkin.CastleSkinTable.GetRecordByKey(y); bool flag = castleSkin.CheckUnlock((byte)x); bool flag2 = castleSkin.CheckUnlock((byte)y); bool flag3 = castleSkin.CheckSelect((byte)x); bool flag4 = castleSkin.CheckSelect((byte)y); if (flag && !flag2) { return(-1); } if (!flag && flag2) { return(1); } if (flag3 && !flag4) { return(1); } if (!flag3 && flag4) { return(-1); } if (recordByKey.Priority > recordByKey2.Priority) { return(-1); } if (recordByKey.Priority < recordByKey2.Priority) { return(1); } return(0); }