// Token: 0x06001339 RID: 4921 RVA: 0x00219EC8 File Offset: 0x002180C8 public void CreateTopBoard() { this.SPHeight.Clear(); this.SPHeight.Add(118f); this.SPHeight.Add(118f); this.SPHeight.Add(118f); this.SPHeight.Add(118f); this.AGS_Form.GetChild(3).gameObject.SetActive(false); RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(8, 0); this.AGS_Form.GetChild(12).gameObject.SetActive(false); UIKVKLBoard.isTopBoard = true; UIText component = this.AGS_Form.GetChild(1).GetChild(0).GetComponent <UIText>(); component.text = DataManager.Instance.mStringTable.GetStringByID(9848u); this.AGS_Form.GetChild(2).gameObject.SetActive(true); this.AGS_Form.GetChild(5).gameObject.SetActive(true); component = this.AGS_Form.GetChild(5).GetComponent <UIText>(); CString cstring = StringManager.Instance.StaticString1024(); CString cstring2 = StringManager.Instance.StaticString1024(); cstring.ClearString(); cstring.Append(GameConstants.GetDateTime(LeaderBoardManager.Instance.KvKTopBoard.SortTime).ToString("MM/dd/yy HH:mm")); cstring2.ClearString(); cstring2.Append(GameConstants.GetDateTime(LeaderBoardManager.Instance.KvKTopBoard.SortTime + (long)((ulong)LeaderBoardManager.Instance.KvKTopBoard.KingdomEventRequireTime)).ToString("MM/dd/yy HH:mm")); this.Ranking.ClearString(); this.Ranking.Append(DataManager.Instance.mStringTable.GetStringByID(8153u)); this.Ranking.Append(" "); this.Ranking.Append(cstring); this.Ranking.Append(" ~ "); this.Ranking.Append(cstring2); component.text = this.Ranking.ToString(); component.SetAllDirty(); component.cachedTextGenerator.Invalidate(); }
// Token: 0x060020C8 RID: 8392 RVA: 0x003E5A48 File Offset: 0x003E3C48 private void SetIcon() { RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(12, 0); this.m_WallIcon.sprite = GUIManager.Instance.BuildingData.GetBuildSprite(12, buildData.Level); this.m_WallIcon.material = GUIManager.Instance.BuildingData.mapspriteManager.SpriteUIMaterial; this.m_WallIcon.SetNativeSize(); }
// Token: 0x060020D5 RID: 8405 RVA: 0x003E5EAC File Offset: 0x003E40AC private void Start() { this.baseBuild = base.transform.gameObject.AddComponent <BuildingWindow>(); this.baseBuild.m_Handler = this; RoleBuildingData roleBuildingData = this.GUIM.BuildingData.AllBuildsData[this.ManorID]; this.baseBuild.InitBuildingWindow((byte)roleBuildingData.BuildID, (ushort)this.ManorID, 2, roleBuildingData.Level); this.baseBuild.baseTransform.SetAsFirstSibling(); }
// Token: 0x06001CF0 RID: 7408 RVA: 0x0033CF84 File Offset: 0x0033B184 private bool CheckResource() { bool result = false; DataManager instance = DataManager.Instance; uint effectBaseVal = instance.AttribVal.GetEffectBaseVal(GATTR_ENUM.EGA_RESOURCE_PROTCTION); RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(9, 0); BuildLevelRequest buildLevelRequestData = GUIManager.Instance.BuildingData.GetBuildLevelRequestData(9, buildData.Level); float num = (10000u + effectBaseVal) / 10000f; uint num2 = GameConstants.appCeil(buildLevelRequestData.Value1 * num); this.ResMax = num2; for (int i = 0; i < 5; i++) { this.ResIcon[i].enabled = false; } int num3 = 0; int num4 = 0; while (num4 < instance.Resource.Length && num4 < 5) { if (instance.Resource[num4].Stock > num2) { this.ResIcon[num4].enabled = true; this.ResIcon[num4].rectTransform.anchoredPosition = UIImmigration.ResStart + new Vector2(64f * (float)num3, 0f); num3++; } num4++; } if (num3 == 0) { this.ResContent.color = UIImmigration.ResContentNormal; this.ResContent.text = DataManager.Instance.mStringTable.GetStringByID(10022u); this.ResContent.rectTransform.anchoredPosition = UIImmigration.ResContentPos; this.AnimIcon2[0].enabled = false; this.AnimIcon2[1].enabled = false; this.ResIconV.enabled = true; result = true; } else { this.ResContent.color = UIImmigration.ResContentRed; this.ResContent.text = DataManager.Instance.mStringTable.GetStringByID(10021u); this.ResContent.rectTransform.anchoredPosition = UIImmigration.ResContentPos + new Vector2((float)(64 * num3), 0f); this.AnimIcon2[0].enabled = true; this.AnimIcon2[1].enabled = true; this.ResIconV.enabled = false; } this.ResTitleStr.ClearString(); this.ResTitleStr.uLongToFormat((ulong)num2, 1, true); this.ResTitleStr.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(10020u)); this.ResTitle.text = this.ResTitleStr.ToString(); this.ResTitle.SetAllDirty(); this.ResTitle.cachedTextGenerator.Invalidate(); return(result); }
// Token: 0x060019E7 RID: 6631 RVA: 0x002BFD68 File Offset: 0x002BDF68 private void UpdateWallInfo(ref UICastle._ItemData itemData) { CString cstring = StringManager.Instance.StaticString1024(); CString cstring2 = StringManager.Instance.StaticString1024(); cstring.Append("<color=#cbbd7bff>"); cstring2.Append("</color>"); itemData.Icon.sprite = this.CastleInfoArr.GetSprite(0); itemData.Icon.SetNativeSize(); itemData.TitleStr[0].ClearString(); itemData.TitleStr[0].StringToFormat(cstring); itemData.TitleStr[0].StringToFormat(this.DM.mStringTable.GetStringByID(4928u)); itemData.TitleStr[0].StringToFormat(cstring2); itemData.TitleStr[0].IntToFormat((long)((ulong)this.DM.m_WallRepairNowValue), 1, true); itemData.TitleStr[0].IntToFormat((long)((ulong)this.DM.m_WallRepairMaxValue), 1, true); itemData.TitleStr[0].AppendFormat("{0}{1}{2}{3} / {4}"); itemData.Title1.text = itemData.TitleStr[0].ToString(); itemData.Title1.SetAllDirty(); itemData.Title1.cachedTextGenerator.Invalidate(); uint num = 0u; RoleBuildingData buildData = this.GUIM.BuildingData.GetBuildData(12, 0); if (this.GUIM.BuildingData.GetBuildNumByID(12) > 0) { num = this.GUIM.BuildingData.GetBuildLevelRequestData(buildData.BuildID, buildData.Level).Value1; } itemData.TitleStr[1].ClearString(); itemData.TitleStr[1].StringToFormat(cstring); itemData.TitleStr[1].StringToFormat(this.DM.mStringTable.GetStringByID(4929u)); itemData.TitleStr[1].StringToFormat(cstring2); itemData.TitleStr[1].IntToFormat((long)((ulong)this.DM.TrapTotal), 1, true); itemData.TitleStr[1].IntToFormat((long)((ulong)num), 1, true); itemData.TitleStr[1].AppendFormat("{0}{1}{2}{3} / {4}"); itemData.Title2.text = itemData.TitleStr[1].ToString(); itemData.Title2.SetAllDirty(); itemData.Title2.cachedTextGenerator.Invalidate(); itemData.TitleStr[2].ClearString(); itemData.TitleStr[2].StringToFormat(cstring); itemData.TitleStr[2].StringToFormat(this.DM.mStringTable.GetStringByID(4930u)); itemData.TitleStr[2].StringToFormat(cstring2); int maxDefenders = this.DM.GetMaxDefenders(); int num2 = 0; for (int i = 0; i < this.DM.GetMaxDefenders(); i++) { if (this.DM.m_DefendersID[i] > 0) { num2++; } } itemData.TitleStr[2].IntToFormat((long)num2, 1, false); itemData.TitleStr[2].IntToFormat((long)maxDefenders, 1, false); itemData.TitleStr[2].AppendFormat("{0}{1}{2}{3} / {4}"); itemData.Title3.text = itemData.TitleStr[2].ToString(); itemData.Title3.SetAllDirty(); itemData.Title3.cachedTextGenerator.Invalidate(); itemData.TitleStr[3].ClearString(); itemData.TitleStr[3].StringToFormat(cstring); itemData.TitleStr[3].StringToFormat(this.DM.mStringTable.GetStringByID(4931u)); itemData.TitleStr[3].StringToFormat(cstring2); itemData.TitleStr[3].IntToFormat((long)((ulong)this.DM.TrapHospitalTotal), 1, true); itemData.TitleStr[3].IntToFormat((long)((ulong)num), 1, true); itemData.TitleStr[3].AppendFormat("{0}{1}{2}{3} / {4}"); itemData.Title4.text = itemData.TitleStr[3].ToString(); itemData.Title4.SetAllDirty(); itemData.Title4.cachedTextGenerator.Invalidate(); }
// Token: 0x06001DFB RID: 7675 RVA: 0x00387EFC File Offset: 0x003860FC public void reflashItem() { if (UILordEquipSetEdit.SetName == null) { UILordEquipSetEdit.SetName = StringManager.Instance.SpawnString(30); } UILordEquipSetEdit.SetName.ClearString(); if (UILordEquipSetEdit.showingSet.Name.Length == 0) { UILordEquipSetEdit.SetName.IntToFormat((long)(UILordEquipSetEdit.SetIdx + 1), 1, false); UILordEquipSetEdit.SetName.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(928u)); } else { UILordEquipSetEdit.SetName.Append(UILordEquipSetEdit.showingSet.Name); } UIText component = this.AGS_Form.GetChild(0).GetChild(1).GetComponent <UIText>(); component.text = UILordEquipSetEdit.SetName.ToString(); component.SetAllDirty(); component.cachedTextGenerator.Invalidate(); component.cachedTextGeneratorForLayout.Invalidate(); int num = (int)component.preferredWidth / 2 + 30; RectTransform component2 = this.AGS_Form.GetChild(2).GetComponent <RectTransform>(); component2.anchoredPosition = new Vector2((float)num, component2.anchoredPosition.y); this.effectCompareList.Clear(); List <LordEquipEffectSet> effList = new List <LordEquipEffectSet>(); for (int i = 0; i < 8; i++) { if (UILordEquipSetEdit.showingSet.SerialNO[i] != 0u) { for (int j = 0; j < (int)DataManager.Instance.RoleAttr.LordEquipBagSize; j++) { if (LordEquipData.Instance().LordEquip[j].SerialNO == UILordEquipSetEdit.showingSet.SerialNO[i]) { UILordEquipSetEdit.SetDataIndex[i] = j; } } LordEquipData.GetEffectList(LordEquipData.Instance().LordEquip[UILordEquipSetEdit.SetDataIndex[i]], effList, 0, (byte)Math.Min(5, i), true); } } LordEquipData.effectListAddToEffectCompareList(effList, this.effectCompareList); LordEquipData.EffectTitleListCreater(this.effectCompareList); this.ForgingIcon.gameObject.SetActive(false); if (this.DM.RoleAttr.LordEquipEventData.SerialNO != 0u) { for (int k = 0; k < 8; k++) { if (this.DM.RoleAttr.LordEquipEventData.SerialNO == UILordEquipSetEdit.showingSet.SerialNO[k]) { this.ForgingIcon.SetParent(this.AGS_Form.GetChild(5).GetChild(k + 16)); this.ForgingIcon.anchoredPosition = new Vector2(52f, -52f); this.ForgingIcon.gameObject.SetActive(true); break; } } } int num2; for (int l = 0; l < 8; l++) { if (UILordEquipSetEdit.showingSet.SerialNO[l] != 0u) { this.AGS_Form.GetChild(5).GetChild(l + 8).gameObject.SetActive(false); this.Equips[l].gameObject.SetActive(true); GUIManager.Instance.ChangeLordEquipImg(this.Equips[l].transform, LordEquipData.Instance().LordEquip[UILordEquipSetEdit.SetDataIndex[l]], eLordEquipDisplayKind.Item_Gems, false); this.Equips[l].GetComponent <UILEBtn>().SetCountdown(LordEquipData.Instance().LordEquip[UILordEquipSetEdit.SetDataIndex[l]].ExpireTime, false); } else { this.AGS_Form.GetChild(5).GetChild(l + 8).gameObject.SetActive(true); this.Equips[l].gameObject.SetActive(false); num2 = UILordEquipSetEdit.CheckHaveEquipKind((byte)(l + 21), false); if (num2 > 0) { this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(0).gameObject.SetActive(num2 == 1); this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(1).gameObject.SetActive(true); this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(1).GetComponent <UISpritesArray>().SetSpriteIndex(2 - num2); } else { this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(0).gameObject.SetActive(false); this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(1).gameObject.SetActive(false); } } } num2 = UILordEquipSetEdit.CheckHaveEquipKind(26, true); RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(15, 0); if (buildData.Level >= 25) { this.usedsolt = 8; } else if (buildData.Level >= 17) { this.usedsolt = 7; } else { this.usedsolt = 6; } if (buildData.Level >= 17 && UILordEquipSetEdit.showingSet.SerialNO[6] == 0u) { this.AGS_Form.GetChild(5).GetChild(24).gameObject.SetActive(buildData.Level < 17); this.AGS_Form.GetChild(5).GetChild(14).GetChild(0).gameObject.SetActive(num2 == 1); this.AGS_Form.GetChild(5).GetChild(14).GetChild(1).gameObject.SetActive(num2 > 0); this.AGS_Form.GetChild(5).GetChild(14).GetChild(1).GetComponent <UISpritesArray>().SetSpriteIndex(2 - num2); this.AGS_Form.GetChild(5).GetChild(14).GetComponent <UIButton>().m_BtnID1 = 3; } else { this.AGS_Form.GetChild(5).GetChild(24).gameObject.SetActive(buildData.Level < 17); this.AGS_Form.GetChild(5).GetChild(14).GetChild(0).gameObject.SetActive(false); this.AGS_Form.GetChild(5).GetChild(14).GetChild(1).gameObject.SetActive(false); this.AGS_Form.GetChild(5).GetChild(14).GetComponent <UIButton>().m_BtnID1 = 0; } if (buildData.Level >= 25 && UILordEquipSetEdit.showingSet.SerialNO[7] == 0u) { this.AGS_Form.GetChild(5).GetChild(25).gameObject.SetActive(buildData.Level < 25); this.AGS_Form.GetChild(5).GetChild(15).GetChild(0).gameObject.SetActive(num2 == 1); this.AGS_Form.GetChild(5).GetChild(15).GetChild(1).gameObject.SetActive(num2 > 0); this.AGS_Form.GetChild(5).GetChild(15).GetChild(1).GetComponent <UISpritesArray>().SetSpriteIndex(2 - num2); this.AGS_Form.GetChild(5).GetChild(15).GetComponent <UIButton>().m_BtnID1 = 3; } else { this.AGS_Form.GetChild(5).GetChild(25).gameObject.SetActive(buildData.Level < 25); this.AGS_Form.GetChild(5).GetChild(15).GetChild(0).gameObject.SetActive(false); this.AGS_Form.GetChild(5).GetChild(15).GetChild(1).gameObject.SetActive(false); this.AGS_Form.GetChild(5).GetChild(15).GetComponent <UIButton>().m_BtnID1 = 0; } this.SPHeight.Clear(); CString cstring = StringManager.Instance.StaticString1024(); for (int m = 0; m < this.effectCompareList.Count; m++) { if (this.effectCompareList[m].isTitel) { this.SPHeight.Add(35f); } else if (this.effectCompareList[m].isNewGemEffect == 1) { cstring.ClearString(); LordEquipData.GetNewGemEffectString(cstring, (byte)this.effectCompareList[m].EffectID, this.effectCompareList[m].EffectValue, true, 0); this.SPHeight.Add(this.GetTextHeight(245f, cstring, 18)); } else { this.SPHeight.Add(32f); } } if (this.SPHeight.Count > 1) { float num3 = this.SPHeight[this.SPHeight.Count - 1]; this.SPHeight.RemoveAt(this.SPHeight.Count - 1); this.SPHeight.Add(num3 + 6f); } this.AGS_Form.GetChild(6).gameObject.SetActive(true); this.AGS_ScrollPanel.AddNewDataHeight(this.SPHeight, true, true); if (!UILordEquipSetEdit.ThingsChanged) { for (int n = 0; n < UILordEquipSetEdit.showingSet.SerialNO.Length; n++) { if (UILordEquipSetEdit.showingSet.SerialNO[n] != LordEquipData.Instance().LordEquipSets[UILordEquipSetEdit.SetIdx].SerialNO[n]) { UILordEquipSetEdit.ThingsChanged = true; break; } } } UIButton component3 = this.AGS_Form.GetChild(4).GetChild(1).GetComponent <UIButton>(); component = component3.transform.GetChild(0).GetComponent <UIText>(); if (UILordEquipSetEdit.ThingsChanged && !UILordEquipSetEdit.showingSet.isSetEmpty()) { component3.image.color = Color.white; component3.m_BtnID1 = 1; component.color = Color.white; } else { component3.image.color = Color.gray; component3.m_BtnID1 = 0; component.color = new Color(0.898f, 0f, 0.31f); } component3 = this.AGS_Form.GetChild(4).GetChild(0).GetComponent <UIButton>(); component = component3.transform.GetChild(0).GetComponent <UIText>(); if (!UILordEquipSetEdit.showingSet.isSetEmpty()) { component3.image.color = Color.white; component3.m_BtnID1 = 2; component.color = Color.white; } else { component3.image.color = Color.gray; component3.m_BtnID1 = 0; component.color = new Color(0.898f, 0f, 0.31f); } }
// Token: 0x06001AB9 RID: 6841 RVA: 0x002D66FC File Offset: 0x002D48FC public override void OnOpen(int arg1, int arg2) { this.DM = DataManager.Instance; this.GUIM = GUIManager.Instance; this.door = (this.GUIM.FindMenu(EGUIWindow.Door) as Door); this.mOpenType = (EDevelopmentDetail_OpenKind)arg1; this.DataIdx = arg2; Transform transform = base.gameObject.transform; this.tmpImg = transform.GetComponent <Image>(); this.tmpImg.sprite = this.door.LoadSprite("UI_main_black"); this.tmpImg.material = this.door.LoadMaterial(); if (this.GUIM.bOpenOnIPhoneX) { this.tmpImg.rectTransform.offsetMin = new Vector2(-this.GUIM.IPhoneX_DeltaX, 0f); this.tmpImg.rectTransform.offsetMax = new Vector2(this.GUIM.IPhoneX_DeltaX, 0f); } this.tmpbtn = transform.GetChild(0).GetComponent <UIButton>(); this.tmpbtn.m_Handler = this; this.tmpbtn.m_BtnID1 = 1; this.tmpbtn.image.sprite = this.door.LoadSprite("UI_main_black"); this.tmpbtn.image.material = this.door.LoadMaterial(); if (this.GUIM.bOpenOnIPhoneX) { transform.GetChild(0).GetComponent <RectTransform>().offsetMin = new Vector2(-this.GUIM.IPhoneX_DeltaX, 0f); transform.GetChild(0).GetComponent <RectTransform>().offsetMax = new Vector2(this.GUIM.IPhoneX_DeltaX, 0f); } this.Tmp = transform.GetChild(1); this.tmpImg = this.Tmp.GetComponent <Image>(); this.tmpImg.sprite = this.door.LoadSprite("UI_main_box_009"); this.tmpImg.material = this.door.LoadMaterial(); this.Img_BGRT = this.Tmp.GetComponent <RectTransform>(); this.Tmp1 = this.Tmp.GetChild(0); this.tmpImg = this.Tmp1.GetComponent <Image>(); this.tmpImg.sprite = this.door.LoadSprite("UI_con_title_orange"); this.tmpImg.material = this.door.LoadMaterial(); this.Img_Panel = this.Tmp.GetChild(1).GetComponent <Image>(); this.Img_Panel.sprite = this.door.LoadSprite("UI_main_box_010"); this.Img_Panel.material = this.door.LoadMaterial(); this.Img_PanelRT = this.Tmp.GetChild(1).GetComponent <RectTransform>(); this.text_Title = this.Tmp.GetChild(2).GetComponent <UIText>(); this.text_Title.font = this.TTFont; this.tmpImg = transform.GetChild(2).GetComponent <Image>(); this.tmpImg.sprite = this.door.LoadSprite("UI_main_close_base"); this.tmpImg.material = this.door.LoadMaterial(); if (this.GUIM.bOpenOnIPhoneX) { this.tmpImg.enabled = false; this.tmpImg.rectTransform.anchoredPosition = new Vector2(-this.GUIM.IPhoneX_DeltaX, 0f); } this.btn_EXIT = transform.GetChild(2).GetChild(0).GetComponent <UIButton>(); this.btn_EXIT.m_Handler = this; this.btn_EXIT.m_BtnID1 = 1; this.btn_EXIT.image.sprite = this.door.LoadSprite("UI_main_close"); this.btn_EXIT.image.material = this.door.LoadMaterial(); this.btn_EXIT.m_EffectType = e_EffectType.e_Scale; this.btn_EXIT.transition = Selectable.Transition.None; switch (this.mOpenType) { case EDevelopmentDetail_OpenKind.WatchTower: this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.text_Title.text = this.DM.mStringTable.GetStringByID(4042u); this._DataIdx.Clear(); this._DataIdx.Add(15); break; case EDevelopmentDetail_OpenKind.ArmyInfo: { this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.tmpPanel.DataIdx = this.DataIdx; this.text_Title.text = this.DM.mStringTable.GetStringByID(570u); this._DataIdx.Clear(); if (this.DM.MarchEventData[this.DataIdx].Type != EMarchEventType.EMET_HitMonsterMarching && this.DM.MarchEventData[this.DataIdx].Type != EMarchEventType.EMET_HitMonsterReturn && this.DM.MarchEventData[this.DataIdx].Type != EMarchEventType.EMET_HitMonsterRetreat) { this._DataIdx.Add(16); } int num = 0; for (int i = 0; i < 5; i++) { if (this.DM.MarchEventData[this.DataIdx].HeroID[i] != 0) { num++; } } if (num > 0) { this._DataIdx.Add(17); } break; } case EDevelopmentDetail_OpenKind.Home_Wall_TrapInfo: this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.text_Title.text = this.DM.mStringTable.GetStringByID(4926u); this._DataIdx.Clear(); this._DataIdx.Add(18); this._DataIdx.Add(19); this._DataIdx.Add(20); this._DataIdx.Add(21); break; case EDevelopmentDetail_OpenKind.Home_ArmyInfo: this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.text_Title.text = this.DM.mStringTable.GetStringByID(4917u); this._DataIdx.Clear(); this._DataIdx.Add(22); this._DataIdx.Add(23); this._DataIdx.Add(24); break; case EDevelopmentDetail_OpenKind.Home_WatchTower: this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.text_Title.text = this.DM.mStringTable.GetStringByID(7225u); this.tmpPanel.SetPVE_Data(DataManager.StageDataController.StageRecord[2] + 1); this._DataIdx.Clear(); this._DataIdx.Add(30); this._DataIdx.Add(25); this._DataIdx.Add(29); this._DataIdx.Add(27); this._DataIdx.Add(28); this._DataIdx.Add(26); NewbieManager.CheckTeach(ETeachKind.WAR_SCOUT, this, false); break; case EDevelopmentDetail_OpenKind.JailPrisoners: this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.text_Title.text = this.DM.mStringTable.GetStringByID(7789u); this._DataIdx.Clear(); this._DataIdx.Add(31); break; case EDevelopmentDetail_OpenKind.CaveInfo: this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.text_Title.text = this.DM.mStringTable.GetStringByID(570u); this._DataIdx.Clear(); this._DataIdx.Add(33); if (HideArmyManager.Instance.IsLordInShelter()) { this._DataIdx.Add(34); } break; case EDevelopmentDetail_OpenKind.KingRewardList: { this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.tmpPanel.DataIdx = this.DataIdx; ushort itemID = DataManager.Instance.KingGift.GetGiftList()[this.DataIdx].ItemID; this.text_Title.text = this.DM.mStringTable.GetStringByID((uint)this.DM.EquipTable.GetRecordByKey(itemID).EquipName); this._DataIdx.Clear(); this._DataIdx.Add(35); break; } case EDevelopmentDetail_OpenKind.WorldKingRewardList: case EDevelopmentDetail_OpenKind.NobilityRewardList: { this.tmpPanel = this.Img_Panel.gameObject.AddComponent <CustomPanel>(); this.tmpPanel.DataIdx = this.DataIdx; ushort itemID2 = DataManager.Instance.KingGift.GetGiftList()[this.DataIdx].ItemID; this.text_Title.text = this.DM.mStringTable.GetStringByID((uint)this.DM.EquipTable.GetRecordByKey(itemID2).EquipName); this._DataIdx.Clear(); this._DataIdx.Add(39); break; } } switch (this.mOpenType) { case EDevelopmentDetail_OpenKind.Home_WatchTower: this.tmpPanel.SetPanelData(this._DataIdx, true, true, 1110, 10, 0f); goto IL_9C2; case EDevelopmentDetail_OpenKind.CaveInfo: { RoleBuildingData buildData = this.GUIM.BuildingData.GetBuildData(13, 0); this.tmpPanel.SetPanelData(this._DataIdx, true, true, (int)buildData.Level, 0, 0f); goto IL_9C2; } } this.tmpPanel.SetPanelData(this._DataIdx, true, true, 1110, 0, 0f); IL_9C2: this.PreResizeForm(); this.GUIM.UpdateUI(EGUIWindow.Door, 1, 6); }
// Token: 0x0600131D RID: 4893 RVA: 0x002142E4 File Offset: 0x002124E4 public void CreateTopBoard() { this.SPHeight.Clear(); this.SPHeight.Add(118f); this.SPHeight.Add(118f); this.SPHeight.Add(118f); this.AGS_Form.GetChild(3).gameObject.SetActive(false); RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(8, 0); this.AGS_Form.GetChild(12).gameObject.SetActive(true); this.AGS_Form.GetChild(12).GetComponent <UISpritesArray>().SetSpriteIndex(0); UIFootBallBoard.isTopBoard = true; if (!UIFootBallBoard.WorldBoard) { this.AGS_Form.GetChild(12).gameObject.SetActive(false); UIText component = this.AGS_Form.GetChild(1).GetChild(0).GetComponent <UIText>(); component.text = DataManager.Instance.mStringTable.GetStringByID(16116u); this.AGS_Form.GetChild(2).gameObject.SetActive(true); this.AGS_Form.GetChild(5).gameObject.SetActive(true); component = this.AGS_Form.GetChild(5).GetComponent <UIText>(); CString cstring = StringManager.Instance.StaticString1024(); CString cstring2 = StringManager.Instance.StaticString1024(); cstring.ClearString(); cstring.Append(GameConstants.GetDateTime(LeaderBoardManager.Instance.FootBallTopBoard.SortTime).ToString("MM/dd/yy HH:mm")); cstring2.ClearString(); cstring2.Append(GameConstants.GetDateTime(LeaderBoardManager.Instance.FootBallTopBoard.SortTime + (long)((ulong)LeaderBoardManager.Instance.FootBallTopBoard.EventRequireTime)).ToString("MM/dd/yy HH:mm")); this.Ranking.ClearString(); this.Ranking.Append(DataManager.Instance.mStringTable.GetStringByID(8153u)); this.Ranking.Append(" "); this.Ranking.Append(cstring); this.Ranking.Append(" ~ "); this.Ranking.Append(cstring2); component.text = this.Ranking.ToString(); component.SetAllDirty(); component.cachedTextGenerator.Invalidate(); } else { this.AGS_Form.GetChild(12).GetComponent <UISpritesArray>().SetSpriteIndex(1); UIText component2 = this.AGS_Form.GetChild(1).GetChild(0).GetComponent <UIText>(); component2.text = DataManager.Instance.mStringTable.GetStringByID(16116u); this.AGS_Form.GetChild(2).gameObject.SetActive(true); this.AGS_Form.GetChild(5).gameObject.SetActive(true); component2 = this.AGS_Form.GetChild(5).GetComponent <UIText>(); CString cstring3 = StringManager.Instance.StaticString1024(); CString cstring4 = StringManager.Instance.StaticString1024(); cstring3.ClearString(); cstring3.Append(GameConstants.GetDateTime(LeaderBoardManager.Instance.FootBallTopBoard.SortTime).ToString("MM/dd/yy HH:mm")); cstring4.ClearString(); cstring4.Append(GameConstants.GetDateTime(LeaderBoardManager.Instance.FootBallTopBoard.SortTime + (long)((ulong)LeaderBoardManager.Instance.FootBallTopBoard.EventRequireTime)).ToString("MM/dd/yy HH:mm")); this.Ranking.ClearString(); this.Ranking.Append(DataManager.Instance.mStringTable.GetStringByID(8153u)); this.Ranking.Append(" "); this.Ranking.Append(cstring3); this.Ranking.Append(" ~ "); this.Ranking.Append(cstring4); component2.text = this.Ranking.ToString(); component2.SetAllDirty(); component2.cachedTextGenerator.Invalidate(); } }
// Token: 0x0600181D RID: 6173 RVA: 0x0028B48C File Offset: 0x0028968C public void SetPushToSDK(bool pause) { if (!pause) { PushManage.ClearPush(); return; } if (!PushManage.PushStart) { return; } if (NewbieManager.IsNewbie) { return; } if (PushManage.checkPushSwitch(0, 0)) { long num = DataManager.Instance.queueBarData[0].StartTime + (long)((ulong)DataManager.Instance.queueBarData[0].TotalTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; this.SetPush(0, DataManager.Instance.mStringTable.GetStringByID(8440u), (int)num); } num = DataManager.Instance.queueBarData[1].StartTime + (long)((ulong)DataManager.Instance.queueBarData[1].TotalTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; this.SetPush(1, DataManager.Instance.mStringTable.GetStringByID(8441u), (int)num); } num = DataManager.Instance.queueBarData[10].StartTime + (long)((ulong)DataManager.Instance.queueBarData[10].TotalTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; this.SetPush(2, DataManager.Instance.mStringTable.GetStringByID(8445u), (int)num); } num = DataManager.Instance.queueBarData[14].StartTime + (long)((ulong)DataManager.Instance.queueBarData[14].TotalTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; this.SetPush(3, DataManager.Instance.mStringTable.GetStringByID(8446u), (int)num); } num = DataManager.Instance.queueBarData[18].StartTime + (long)((ulong)DataManager.Instance.queueBarData[18].TotalTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; this.SetPush(4, DataManager.Instance.mStringTable.GetStringByID(8455u), (int)num); } for (int i = 0; i < PetManager.Instance.m_PetTrainingData.Length; i++) { num = PetManager.Instance.m_PetTrainingData[i].m_EventTime.BeginTime + (long)((ulong)PetManager.Instance.m_PetTrainingData[i].m_EventTime.RequireTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; this.SetPush(15 + i, DataManager.Instance.mStringTable.GetStringByID(16077u), (int)num); } } num = DataManager.Instance.queueBarData[34].StartTime + (long)((ulong)DataManager.Instance.queueBarData[34].TotalTime); if (num > DataManager.Instance.ServerTime) { num -= DataManager.Instance.ServerTime; if (DataManager.Instance.FusionDataTable.GetRecordByKey(PetManager.Instance.ItemCraftID).Fusion_Kind == 0) { this.SetPush(23, DataManager.Instance.mStringTable.GetStringByID(16095u), (int)num); } else { this.SetPush(23, DataManager.Instance.mStringTable.GetStringByID(16096u), (int)num); } } } if (PushManage.checkPushSwitch(3, 15) && GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level >= 3 && DataManager.Instance.RoleAttr.NextOnlineGiftOpenTime > DataManager.Instance.ServerTime) { long num = DataManager.Instance.RoleAttr.NextOnlineGiftOpenTime - DataManager.Instance.ServerTime; this.SetPush(5, DataManager.Instance.mStringTable.GetStringByID(8451u), (int)num); } if (PushManage.checkPushSwitch(4, 16)) { int num2 = (int)(DataManager.Instance.HeroMaxMorale - DataManager.Instance.RoleAttr.Morale); if (num2 > 0) { long num3 = DataManager.Instance.ServerTime - DataManager.Instance.RoleAttr.LastMoraleRecoverTime; int num4 = num2; if (num3 % 360L > 0L) { num4--; } long num = (long)(num4 * 360) + num3; this.SetPush(6, DataManager.Instance.mStringTable.GetStringByID(8453u), (int)num); } uint maxMonsterPoint = DataManager.Instance.GetMaxMonsterPoint(); num2 = (int)(DataManager.Instance.GetMaxMonsterPoint() - DataManager.Instance.RoleAttr.MonsterPoint); if (num2 > 0) { long num = (long)((DataManager.Instance.GetMaxMonsterPoint() - DataManager.Instance.RoleAttr.MonsterPoint) * ((double)DataManager.Instance.RoleAttr.MonsterPointRecoverFrequency / 1000.0)); this.SetPush(7, DataManager.Instance.mStringTable.GetStringByID(8467u), (int)num); } } if (PushManage.checkPushSwitch(5, 17)) { int recvBuffDataIdxByID = DataManager.Instance.GetRecvBuffDataIdxByID(1); if (recvBuffDataIdxByID >= 0) { ItemBuffData itemBuffData = DataManager.Instance.m_RecvItemBuffData[recvBuffDataIdxByID]; long num = itemBuffData.TargetTime - DataManager.Instance.ServerTime - 600L; if (num > 0L) { this.SetPush(8, DataManager.Instance.mStringTable.GetStringByID(8462u), (int)num); } } } if (PushManage.checkPushSwitch(11, 20)) { long num = DataManager.Instance.m_CryptData.startTime + (long)((ulong)GameConstants.CryptSecends[(int)DataManager.Instance.m_CryptData.kind]) - DataManager.Instance.ServerTime; if (num > 0L) { this.SetPush(9, DataManager.Instance.mStringTable.GetStringByID(9040u), (int)num); } } if (PushManage.checkPushSwitch(10, 21)) { TimeEventDataType shelterTime = HideArmyManager.Instance.GetShelterTime(); long num = shelterTime.BeginTime + (long)((ulong)shelterTime.RequireTime) - DataManager.Instance.ServerTime - 600L; if (num > 0L) { this.SetPush(10, DataManager.Instance.mStringTable.GetStringByID(9048u), (int)num); } } if (PushManage.checkNewByteSwitch(22)) { TimerTypeMission timerMissionData = DataManager.MissionDataManager.GetTimerMissionData(_eMissionType.Affair); long num = timerMissionData.ResetTime - DataManager.Instance.ServerTime; if (GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level >= 13 && num > 0L) { this.SetPush(13, DataManager.Instance.mStringTable.GetStringByID(9632u), (int)num); } } if (PushManage.checkPushSwitch(8, 11)) { TimeEventDataType wonderCountTime = GUIManager.Instance.WonderCountTime; long num = wonderCountTime.BeginTime + (long)((ulong)wonderCountTime.RequireTime) - DataManager.Instance.ServerTime - 600L; if (ActivityManager.Instance.KvKActivityData[4].EventState == EActivityState.EAS_Prepare) { long num5 = ActivityManager.Instance.KvKActivityData[4].EventBeginTime - DataManager.Instance.ServerTime - 600L; if (num5 > 0L) { this.SetPush(12, DataManager.Instance.mStringTable.GetStringByID(9548u), (int)num5); } if (num > 0L && num < num5) { this.SetPush(11, DataManager.Instance.mStringTable.GetStringByID(9029u), (int)num); } } else if (num > 0L) { this.SetPush(11, DataManager.Instance.mStringTable.GetStringByID(9029u), (int)num); } } if (PushManage.checkNewByteSwitch(25)) { long num = this.OrderEventBeginTime - DataManager.Instance.ServerTime - 600L; if (num > 0L) { this.SetPush(14, DataManager.Instance.mStringTable.GetStringByID(9694u), (int)num); } } RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(8, 0); ushort num6 = 0; while ((int)num6 < DataManager.Instance.PushCallBackTable.TableCount) { PushCallBack recordByIndex = DataManager.Instance.PushCallBackTable.GetRecordByIndex((int)num6); if (GameConstants.IsBetween((int)buildData.Level, (int)recordByIndex.LowLevel, (int)recordByIndex.HighLevel)) { int num7 = 10171 + UnityEngine.Random.Range(0, 4); if (num7 > 10174) { num7 = 10174; } this.SetPush(24, DataManager.Instance.mStringTable.GetStringByID((uint)((ushort)num7)), (int)recordByIndex.Hour * 3600); break; } num6 += 1; } if (PushManage.checkNewByteSwitch(26)) { if (this.FootBallGameType == 15) { long num = this.FootBallEventBeginTime - ActivityManager.Instance.ServerEventTime - 600L; if (num > 0L) { this.SetPush(25, DataManager.Instance.mStringTable.GetStringByID(16123u), (int)num); } int num8 = Math.Min(6, (int)this.FootBallWaveCount); for (int j = 1; j < num8; j++) { num += (long)this.FootBallWaveGap; if (num > 0L) { this.SetPush(25 + j, DataManager.Instance.mStringTable.GetStringByID(16125u), (int)num); } } } else if (this.FootBallGameType == 16) { EActivityState fifastate = ActivityManager.Instance.GetFIFAState(); if (fifastate == EActivityState.EAS_Prepare || fifastate == EActivityState.EAS_Run) { long num = this.FootBallEventBeginTime - ActivityManager.Instance.ServerEventTime - 600L; int num9 = Math.Min(6, (int)this.FootBallWaveCount); for (int k = 1; k < num9; k++) { num += (long)this.FootBallWaveGap; if (num > 0L) { this.SetPush(25 + k, DataManager.Instance.mStringTable.GetStringByID(16125u), (int)num); } } } } } }