// Token: 0x06001F73 RID: 8051 RVA: 0x003C1518 File Offset: 0x003BF718 public void OnButtonClick(UIButton sender) { int btnID = sender.m_BtnID1; switch (btnID) { case 1: { if (this.DM.RoleAttr.LordEquipEventData.SerialNO != 0u) { for (int i = 0; i < 8; i++) { if (LordEquipData.Instance().LordEquipSets[sender.m_BtnID2].SerialNO[i] == this.DM.RoleAttr.LordEquipEventData.SerialNO) { GUIManager.Instance.OpenOKCancelBox(this, this.DM.mStringTable.GetStringByID(5893u), this.DM.mStringTable.GetStringByID(9708u), sender.m_BtnID2, 0, null, null); return; } } } MessagePacket messagePacket = new MessagePacket(1024); messagePacket.Protocol = Protocol._MSG_REQUEST_LORDEQUIP_CHANGE; messagePacket.AddSeqId(); messagePacket.Add((byte)sender.m_BtnID2); messagePacket.Send(false); GUIManager.Instance.ShowUILock(EUILock.LordInfo); break; } case 2: UILordEquipSetEdit.loadSet(sender.m_BtnID2); this.door.OpenMenu(EGUIWindow.UI_LordEquipSetEdit, 0, 0, false); break; case 3: GUIManager.Instance.OpenTechTree(116, true); break; default: if (btnID == 99) { this.door.CloseMenu(false); } break; } }
// 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); } }