// Token: 0x06002055 RID: 8277 RVA: 0x003D46B4 File Offset: 0x003D28B4 public override void UpdateNetwork(byte[] meg) { if (this.PassInit > 0) { return; } NetworkNews networkNews = (NetworkNews)meg[0]; switch (networkNews) { case NetworkNews.Refresh_BuildBase: this.baseBuild.MyUpdate(meg[1], false); for (int i = 0; i < this.TechItem.Length; i++) { if (this.TechItem[i].transform.gameObject.activeSelf) { this.UpDateRowItem(this.TechItem[i].transform.gameObject, this.TechItem[i].dataIndex, i, 0); } } return; default: if (networkNews != NetworkNews.Login) { if (networkNews != NetworkNews.Refresh_FontTextureRebuilt) { return; } this.baseBuild.Refresh_FontTexture(); this.TextRefresh(); return; } break; case NetworkNews.Refresh_Technology: { this.UpdateTimeBarState(); ushort inKey = GameConstants.ConvertBytesToUShort(meg, 2); TechDataTbl recordByKey = DataManager.Instance.TechData.GetRecordByKey(inKey); for (int j = 0; j < this.TechItem.Length; j++) { for (int k = 0; k < this.TechItem[j].Button.Length; k++) { if (this.TechItem[j].Button[k].m_BtnID1 == (int)recordByKey.Kind) { this.TechItem[j].Research[k].gameObject.SetActive(false); this.ResearchTechKind = 0; return; } } } return; } case NetworkNews.Refresh_AttribEffectVal: break; } this.baseBuild.MyUpdate(0, false); }
// Token: 0x06001F72 RID: 8050 RVA: 0x003C1434 File Offset: 0x003BF634 private void reFlashScrollPanel() { this.SPHeight.Clear(); TechDataTbl recordByKey = this.DM.TechData.GetRecordByKey(116); LordEquipData.Instance().LordEquipSetsCount = (int)DataManager.Instance.GetTechLevel(116); for (int i = 0; i < LordEquipData.Instance().LordEquipSetsCount; i++) { if (LordEquipData.Instance().LordEquipSets[i] == null) { LordEquipData.Instance().LordEquipSets[i] = new LordEquipSet(); LordEquipData.Instance().LordEquipSets[i].Name = StringManager.Instance.SpawnString(30); } this.SPHeight.Add(94f); } if (LordEquipData.Instance().LordEquipSetsCount < (int)recordByKey.LevelMax) { this.SPHeight.Add(94f); } this.AGS_ScrollPanel.AddNewDataHeight(this.SPHeight, false, true); }
// Token: 0x0600205F RID: 8287 RVA: 0x003D4ED0 File Offset: 0x003D30D0 private void UpdateTechInfo() { DataManager instance = DataManager.Instance; TechDataTbl recordByKey = instance.TechData.GetRecordByKey((ushort)this.TechID); byte techLevel = instance.GetTechLevel((ushort)this.TechID); this.LvStr.ClearString(); this.LvStr.IntToFormat((long)techLevel, 1, false); this.LvStr.IntToFormat((long)recordByKey.LevelMax, 1, false); if (GUIManager.Instance.IsArabic) { this.LvStr.AppendFormat("{1}/{0}"); } else { this.LvStr.AppendFormat("{0}/{1}"); } this.LvText.text = this.LvStr.ToString(); this.LvText.SetAllDirty(); this.LvText.cachedTextGenerator.Invalidate(); if (techLevel == recordByKey.LevelMax) { Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; if (door != null) { door.CloseMenu(false); } } else { float num = 173.8f / (float)recordByKey.LevelMax; Vector2 sizeDelta = this.DegreeRect.sizeDelta; sizeDelta.x = (float)techLevel * num; this.DegreeRect.sizeDelta = sizeDelta; } }
// Token: 0x0600205B RID: 8283 RVA: 0x003D4AB0 File Offset: 0x003D2CB0 public override void OnOpen(int arg1, int arg2) { DataManager instance = DataManager.Instance; GUIManager instance2 = GUIManager.Instance; this.TechID = (byte)arg1; GUIManager.Instance.SetTalentIconSprite("UITechIcon", this.m_eWindow); TechDataTbl recordByKey = instance.TechData.GetRecordByKey((ushort)this.TechID); Font ttffont = instance2.GetTTFFont(); byte techLevel = instance.GetTechLevel((ushort)this.TechID); if (DataManager.StageDataController.StageRecord[2] < 8) { GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 2); } else { GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 4); } this.LvStr = StringManager.Instance.SpawnString(30); this.TechIcon = base.transform.GetChild(0).GetChild(0).GetComponent <Image>(); this.TechIcon.enabled = false; this.GraphicID = recordByKey.Graphic; this.DegreeRect = base.transform.GetChild(0).GetChild(3).GetComponent <RectTransform>(); float num = 173.8f / (float)recordByKey.LevelMax; Vector2 sizeDelta = this.DegreeRect.sizeDelta; sizeDelta.x = (float)techLevel * num; this.DegreeRect.sizeDelta = sizeDelta; this.LvStr.ClearString(); this.LvStr.IntToFormat((long)techLevel, 1, false); this.LvStr.IntToFormat((long)recordByKey.LevelMax, 1, false); if (GUIManager.Instance.IsArabic) { this.LvStr.AppendFormat("{1}/{0}"); } else { this.LvStr.AppendFormat("{0}/{1}"); } this.LvText = base.transform.GetChild(0).GetChild(4).GetComponent <UIText>(); this.LvText.font = ttffont; this.LvText.text = this.LvStr.ToString(); this.buildWin = base.transform.gameObject.AddComponent <BuildingWindow>(); this.buildWin.InitTechWindow(this.TechID, techLevel); base.transform.GetChild(0).SetAsLastSibling(); if (GUIManager.Instance.IsArabic) { this.TechIcon.transform.localScale = new Vector3(-1f, 1f, 1f); } if (instance2.GuideParm1 == 3 && (ushort)this.TechID == instance2.GuideParm2) { instance2.GuideArrow((RectTransform)this.buildWin.upgradeBtn.transform, ArrowDirect.Ar_Up, 0f); } this.TechIcon.sprite = GUIManager.Instance.GetTechSprite(this.GraphicID); this.TechIcon.material = GUIManager.Instance.TechMaterial; if (this.TechIcon.sprite != null) { this.TechIcon.enabled = true; } NewbieManager.CheckTeach(ETeachKind.COLLEGE, this, false); }
// Token: 0x06002040 RID: 8256 RVA: 0x003D2DE0 File Offset: 0x003D0FE0 public void UpdateTechInfo() { DataManager instance = DataManager.Instance; byte b = 0; byte b2 = 0; TechDataTbl recordByKey = DataManager.Instance.TechData.GetRecordByKey((ushort)this.TechID); byte techLevel = instance.GetTechLevel(recordByKey.TechID); this.TechName.text = instance.mStringTable.GetStringByID((uint)recordByKey.TechName); float num = 173.8f / (float)recordByKey.LevelMax; Vector2 sizeDelta = this.DegreeRect.sizeDelta; sizeDelta.x = num * (float)techLevel; this.DegreeRect.sizeDelta = sizeDelta; this.LevelStr.ClearString(); this.LevelStr.IntToFormat((long)techLevel, 1, false); this.LevelStr.IntToFormat((long)recordByKey.LevelMax, 1, false); if (GUIManager.Instance.IsArabic) { this.LevelStr.AppendFormat("{1}/{0}"); } else { this.LevelStr.AppendFormat("{0}/{1}"); } this.LevelText.text = this.LevelStr.ToString(); this.LevelText.SetAllDirty(); this.LevelText.cachedTextGenerator.Invalidate(); this.GraphicID = recordByKey.Graphic; if (GUIManager.Instance.TechMaterial == null) { this.TechImage.enabled = false; } else { this.TechImage.sprite = GUIManager.Instance.GetTechSprite(this.GraphicID); this.TechImage.material = GUIManager.Instance.TechMaterial; this.TechImage.enabled = true; } this.EffectStr.ClearString(); this.EffectNextStr.ClearString(); this.ContentStr.ClearString(); uint num2 = 0u; byte level = Math.Max(1, techLevel); TechLevelTbl techLevelTbl; if (instance.GetTechLevelupData(out techLevelTbl, (ushort)this.TechID, level)) { if (techLevel > 0) { num2 += techLevelTbl.EffectVal; } CString cstring = StringManager.Instance.StaticString1024(); if (techLevelTbl.Effect <= 1000) { if (num2 > 0u) { GameConstants.GetEffectValue(cstring, techLevelTbl.Effect, 0u, 6, num2); } } else if (techLevel > 0) { GameConstants.GetEffectValue(cstring, techLevelTbl.Effect, 0u, 7, num2); } GameConstants.GetEffectValue(this.ContentStr, techLevelTbl.Effect, num2, 0, 0f); b = (byte)cstring[0]; this.EffectStr.StringToFormat(cstring); this.EffectStr.AppendFormat(instance.mStringTable.GetStringByID(5012u)); this.EffectText.text = this.EffectStr.ToString(); this.EffectText.SetAllDirty(); this.EffectText.cachedTextGenerator.Invalidate(); this.ContText.text = this.ContentStr.ToString(); this.ContText.SetAllDirty(); this.ContText.cachedTextGenerator.Invalidate(); } if (techLevel < recordByKey.LevelMax && instance.GetTechLevelupData(out techLevelTbl, (ushort)this.TechID, techLevel + 1)) { num2 = techLevelTbl.EffectVal - num2; CString cstring2 = StringManager.Instance.StaticString1024(); if (techLevelTbl.Effect <= 1000) { GameConstants.GetEffectValue(cstring2, techLevelTbl.Effect, 0u, 6, num2); } else { GameConstants.GetEffectValue(cstring2, techLevelTbl.Effect, 0u, 7, num2); } GameConstants.GetEffectValue(this.ContentStr, techLevelTbl.Effect, num2, 0, 0f); this.ContText.text = this.ContentStr.ToString(); this.ContText.SetAllDirty(); this.ContText.cachedTextGenerator.Invalidate(); b2 = (byte)cstring2[0]; this.EffectNextStr.StringToFormat(cstring2); this.EffectNextStr.AppendFormat(instance.mStringTable.GetStringByID(5013u)); this.EffectNextText.text = this.EffectNextStr.ToString(); this.EffectNextText.SetAllDirty(); this.EffectNextText.cachedTextGenerator.Invalidate(); this.ConfirmTrans.gameObject.SetActive(true); this.ResearchFull.gameObject.SetActive(false); this.DegreeRect.gameObject.SetActive(true); this.FullFrame.gameObject.SetActive(false); this.Frame.gameObject.SetActive(true); } else { this.EffectNextText.text = string.Empty; this.ConfirmTrans.gameObject.SetActive(false); this.ResearchFull.gameObject.SetActive(true); this.DegreeRect.gameObject.SetActive(false); this.FullFrame.gameObject.SetActive(true); this.Frame.gameObject.SetActive(false); } byte b3 = instance.CheckTechState((ushort)this.TechID); this.ConfirmBtn.m_BtnID2 = this.TechID; this.ConfirmBtn.m_BtnID3 = (int)b3; if (b == 0) { this.EffectRect.gameObject.SetActive(false); } else { this.EffectRect.gameObject.SetActive(true); Vector2 anchoredPosition = this.EffectRect.anchoredPosition; if (b2 == 0) { anchoredPosition.y = -281f; } else { anchoredPosition.y = -269f; } this.EffectRect.anchoredPosition = anchoredPosition; } if (b2 == 0) { this.EffectNextText.gameObject.SetActive(false); } else { this.EffectNextText.gameObject.SetActive(true); Vector2 anchoredPosition2 = this.EffectNextText.rectTransform.anchoredPosition; if (b == 0) { anchoredPosition2.y = -280f; } else { anchoredPosition2.y = -297f; } this.EffectNextText.rectTransform.anchoredPosition = anchoredPosition2; } if ((b3 & 1) > 0) { if ((b3 & 2) == 0) { this.LockPanel.gameObject.SetActive(true); this.Lock.gameObject.SetActive(true); this.Lock1.gameObject.SetActive(false); } else { this.Lock.gameObject.SetActive(false); this.Lock1.gameObject.SetActive(true); this.LockPanel.gameObject.SetActive(false); } } else { this.Lock.gameObject.SetActive(false); this.LockPanel.gameObject.SetActive(false); this.Lock1.gameObject.SetActive(false); } if (GUIManager.Instance.GuideParm1 == 3 && this.TechID == (int)GUIManager.Instance.GuideParm2) { GUIManager.Instance.GuideArrow_Position(new Vector3(0f, -132.88f, 0f), ArrowDirect.Ar_Up); } }