private void SetEquipPartBtn(EquipLibType.ELT type) { if (!this.equipPartTransDic.ContainsKey(type)) { return; } if (EquipmentManager.Instance.equipmentData == null || EquipmentManager.Instance.equipmentData.equipLibs == null) { return; } EquipLib equipLib = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == type); if (equipLib == null) { return; } EquipSimpleInfo wearingEquipSimpleInfoByPos = EquipGlobal.GetWearingEquipSimpleInfoByPos(type); if (wearingEquipSimpleInfoByPos == null) { return; } Dictionary <string, string> iconNamesByEquipPos = EquipGlobal.GetIconNamesByEquipPos(type, true); if (iconNamesByEquipPos == null) { return; } int excellentAttrsCountByColor = EquipGlobal.GetExcellentAttrsCountByColor(wearingEquipSimpleInfoByPos.equipId, 1f); Transform transform = this.equipPartTransDic.get_Item(type).FindChild("ImageIcon"); this.equipPartTransDic.get_Item(type).FindChild("Num").GetComponent <Text>().set_text((equipLib.lv <= 0) ? string.Empty : ("+" + equipLib.lv)); this.equipPartTransDic.get_Item(type).FindChild("EquipStepText").GetComponent <Text>().set_text(iconNamesByEquipPos.get_Item("EquipStep")); ResourceManager.SetSprite(this.equipPartTransDic.get_Item(type).FindChild("ImageIcon").GetComponent <Image>(), ResourceManager.GetIconSprite(iconNamesByEquipPos.get_Item("IconName"))); if (this.equipPartFxDic.ContainsKey(type)) { FXSpineManager.Instance.DeleteSpine(this.equipPartFxDic.get_Item(type), true); } TaoZhuangDuanZhu equipForgeCfgData = EquipGlobal.GetEquipForgeCfgData(wearingEquipSimpleInfoByPos.equipId); int num; if (equipForgeCfgData != null && wearingEquipSimpleInfoByPos.suitId > 0) { ResourceManager.SetSprite(this.equipPartTransDic.get_Item(type).FindChild("ImageFrame").GetComponent <Image>(), ResourceManager.GetIconSprite(equipForgeCfgData.frame)); num = FXSpineManager.Instance.PlaySpine(equipForgeCfgData.fxId, transform, "EquipDetailedUI", 2000, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); } else { ResourceManager.SetSprite(this.equipPartTransDic.get_Item(type).FindChild("ImageFrame").GetComponent <Image>(), ResourceManager.GetIconSprite(iconNamesByEquipPos.get_Item("IconFrameName"))); num = EquipGlobal.GetEquipIconFX(wearingEquipSimpleInfoByPos.cfgId, excellentAttrsCountByColor, transform, "EquipPartBtns", 2000, false); } if (this.equipPartFxDic.ContainsKey(type)) { this.equipPartFxDic.set_Item(type, num); } this.equipPartTransDic.get_Item(type).FindChild("ExcellentAttrIconList").FindChild("Image1").GetComponent <Image>().set_enabled(excellentAttrsCountByColor >= 1); this.equipPartTransDic.get_Item(type).FindChild("ExcellentAttrIconList").FindChild("Image2").GetComponent <Image>().set_enabled(excellentAttrsCountByColor >= 2); this.equipPartTransDic.get_Item(type).FindChild("ExcellentAttrIconList").FindChild("Image3").GetComponent <Image>().set_enabled(excellentAttrsCountByColor >= 3); this.equipPartTransDic.get_Item(type).FindChild("ImageBinding").get_gameObject().SetActive(false); }
public static List <MaterialGem> GetMaterialGems(EquipLibType.ELT equipNum, int slotNum) { List <MaterialGem> list = new List <MaterialGem>(); List <int> oneLevelGemIds = GemGlobal.GetOneLevelGemIds(equipNum, slotNum); for (int i = 0; i < oneLevelGemIds.get_Count(); i++) { int num = oneLevelGemIds.get_Item(i); List <MaterialGem> list2 = new List <MaterialGem>(); for (int num2 = num; num2 != 0; num2 = GemGlobal.GetAfterId(num2)) { if (GemGlobal.IsGemEnoughLv(num2)) { List <Goods> list3 = BackpackManager.Instance.OnGetGood(num2); for (int j = 0; j < list3.get_Count(); j++) { Goods goods = list3.get_Item(j); list2.Add(new MaterialGem { typeId = num2, gemId = goods.GetLongId(), count = goods.GetCount() }); } } } list2.Reverse(); list.AddRange(list2.ToArray()); } return(list); }
private void RecvGemSysEmbedRes(short state, GemSysEmbedRes msg = null) { if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (msg != null) { EquipLibType.ELT type = msg.type; int hole = msg.hole; long newGemId = msg.newGemId; int newGemTypeId = msg.newGemTypeId; GemEmbedInfo gemEmbedInfo = this.equipSlots[type - EquipLibType.ELT.Weapon, hole - 1]; gemEmbedInfo.id = newGemId; gemEmbedInfo.typeId = newGemTypeId; GemUI gemUI = UIManagerControl.Instance.GetUIIfExist("GemUI") as GemUI; if (gemUI != null) { gemUI.RefreshEquipSlot(msg.hole - 1, newGemTypeId); } GemSelectUI gemSelectUI = UIManagerControl.Instance.GetUIIfExist("GemSelectUI") as GemSelectUI; if (gemSelectUI != null) { gemSelectUI.Show(false); } EventDispatcher.Broadcast <int>(EventNames.UpdateEquipPosGemData, (int)msg.type); EventDispatcher.Broadcast(EventNames.EquipDetailedShouldCheckBadge); this.CheckCanShowWearingGemPromoteWay(); } }
public void SendGemSysEmbedReq(EquipLibType.ELT _type, int _hole, long _gemId) { NetworkManager.Send(new GemSysEmbedReq { type = _type, hole = _hole, gemId = _gemId }, ServerType.Data); }
public static int GetSlotUnlockRequireBatchLv(EquipLibType.ELT pos, int slotNum) { BaoShiKongPeiZhi baoShiKongPeiZhi = DataReader <BaoShiKongPeiZhi> .DataList.Find((BaoShiKongPeiZhi a) => a.position == (int)pos && a.slotOpen == slotNum); if (baoShiKongPeiZhi != null) { return(baoShiKongPeiZhi.openingCondition); } return(-1); }
public static SpriteRenderer GetGemItemFrameSprite(EquipLibType.ELT pos, int slotIndex) { BaoShiKongPeiZhi baoShiKongPeiZhi = DataReader <BaoShiKongPeiZhi> .DataList.Find((BaoShiKongPeiZhi a) => a.position == (int)pos && a.slotOpen == slotIndex); if (baoShiKongPeiZhi != null && baoShiKongPeiZhi.gemType.get_Count() > 0) { int color = baoShiKongPeiZhi.gemType.get_Item(0); return(GemGlobal.GetGemItemFrameByColor(color)); } return(ResourceManagerBase.GetNullSprite()); }
public static List <MaterialGem> GetOneKeyComposeGems(EquipLibType.ELT equipNum, int slotNum, int nextTypeId) { List <MaterialGem> list = new List <MaterialGem>(); int value = GemGlobal.GetValue(nextTypeId); int num = 0; GemEmbedInfo gemEmbedInfo = GemGlobal.GetGemInfo(equipNum, slotNum); for (int needId = GemGlobal.GetNeedId(nextTypeId); needId != 0; needId = GemGlobal.GetNeedId(needId)) { if (gemEmbedInfo != null && gemEmbedInfo.typeId == needId) { list.Add(new MaterialGem { typeId = gemEmbedInfo.typeId, gemId = gemEmbedInfo.id, count = 1 }); num += GemGlobal.GetValue(needId); if (num == value) { return(list); } gemEmbedInfo = null; } List <Goods> list2 = BackpackManager.Instance.OnGetGood(needId); for (int i = 0; i < list2.get_Count(); i++) { Goods goods = list2.get_Item(i); int num2 = 0; for (int j = 0; j < goods.GetCount(); j++) { num2++; num += GemGlobal.GetValue(needId); if (num == value) { list.Add(new MaterialGem { typeId = needId, gemId = goods.GetLongId(), count = num2 }); return(list); } } list.Add(new MaterialGem { typeId = needId, gemId = goods.GetLongId(), count = goods.GetCount() }); } } return(null); }
public static bool IsEnoughMoneyToOneKeyCompose(EquipLibType.ELT equipNum, int slotNum, int nextTypeId) { List <MaterialGem> oneKeyComposeGems = GemGlobal.GetOneKeyComposeGems(equipNum, slotNum, nextTypeId); if (oneKeyComposeGems != null) { int oneKeyComposeCost = GemGlobal.GetOneKeyComposeCost(oneKeyComposeGems, nextTypeId); return(EntityWorld.Instance.EntSelf.Gold >= (long)oneKeyComposeCost); } return(false); }
protected override void OnEnable() { EquipDetailedUI equipDetailedUI = UIManagerControl.Instance.GetUIIfExist("EquipDetailedUI") as EquipDetailedUI; if (equipDetailedUI != null) { this.equipCurr = equipDetailedUI.currentSelectPos; } this.Init(); this.CheckBadge(); }
public static void OpenEquipStarUpUI(EquipLibType.ELT elt = EquipLibType.ELT.Weapon, Action finish_callback = null) { UIManagerControl.Instance.OpenUI_Async("EquipDetailedUI", delegate(UIBase uibase) { EquipDetailedUI equipDetailedUI = uibase as EquipDetailedUI; equipDetailedUI.RefreshUI(EquipDetailedUIState.EquipStarUp, elt); if (finish_callback != null) { finish_callback.Invoke(); } }, null); }
public static bool IsWearSameColorGem(EquipLibType.ELT equipNum, int slotNum, int color) { List <int> alreadyUsedGemTypes = GemGlobal.GetAlreadyUsedGemTypes(equipNum, slotNum); for (int i = 0; i < alreadyUsedGemTypes.get_Count(); i++) { if (alreadyUsedGemTypes.get_Item(i) == color) { return(true); } } return(false); }
public static bool IsCanOneKeyCompose(EquipLibType.ELT equipNum, int slotNum, int currTypeId) { if (GemGlobal.IsGemMaxLv(currTypeId)) { return(false); } if (currTypeId == 0) { return(false); } int afterId = GemGlobal.GetAfterId(currTypeId); return(GemGlobal.IsGemEnoughLv(afterId) && GemGlobal.IsEnoughMoneyToOneKeyCompose(equipNum, slotNum, afterId)); }
public void SendGemSysTakeoffReq(EquipLibType.ELT _type, int _hole) { Debug.Log(string.Concat(new object[] { "SendGemSysTakeoffReq equip=", (int)_type, " hole=", _hole })); NetworkManager.Send(new GemSysTakeoffReq { type = _type, hole = _hole }, ServerType.Data); }
public static bool IsActiveOneKeyCompose(EquipLibType.ELT equipNum, int slotNum, int typeId) { Debug.Log("IsActiveOneKeyCompose typeId=" + typeId); int num = 1; BaoShiShengJi baoShiShengJi = DataReader <BaoShiShengJi> .Get(typeId); int num2 = GemGlobal.GetGemId(baoShiShengJi.type, 1); while (num2 != typeId && num2 != 0) { num2 = GemGlobal.GetAfterId(num2); num++; } return(num >= 4); }
public static void OpenEquipSuitForgeUI(EquipLibType.ELT pos = EquipLibType.ELT.Weapon, Action finish_callback = null) { if (!SystemOpenManager.IsSystemClickOpen(78, 0, true)) { return; } UIManagerControl.Instance.OpenUI_Async("EquipDetailedUI", delegate(UIBase uibase) { EquipDetailedUI equipDetailedUI = uibase as EquipDetailedUI; equipDetailedUI.RefreshUI(EquipDetailedUIState.EquipSuitForge, pos); if (finish_callback != null) { finish_callback.Invoke(); } }, null); }
private void OnClickEquipPartBtn(GameObject go) { EquipLibType.ELT pos = EquipLibType.ELT.Weapon; using (Dictionary <EquipLibType.ELT, Transform> .Enumerator enumerator = this.equipPartTransDic.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <EquipLibType.ELT, Transform> current = enumerator.get_Current(); if (go == current.get_Value().get_gameObject()) { pos = current.get_Key(); } } } UIManagerControl.Instance.OpenUI("EquipDetailedPopUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush); EquipDetailedPopUI.Instance.SetSelectEquipTip(pos, true); }
private void SetBtn(EquipLibType.ELT type, ButtonCustom btn, FXID fxID) { Dictionary <string, string> iconNamesByEquipPos = EquipGlobal.GetIconNamesByEquipPos(type, true); if (iconNamesByEquipPos == null) { return; } EquipLib equipLibInfo = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == type); zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(equipLibInfo.equips.Find((EquipSimpleInfo a) => a.equipId == equipLibInfo.wearingId).cfgId); ResourceManager.SetSprite(btn.get_transform().FindChild("Icon").FindChild("ImageFrame").GetComponent <Image>(), ResourceManager.GetIconSprite(iconNamesByEquipPos.get_Item("IconFrameName"))); ResourceManager.SetSprite(btn.get_transform().FindChild("Icon").FindChild("ImageIcon").GetComponent <Image>(), ResourceManager.GetIconSprite(iconNamesByEquipPos.get_Item("IconName"))); Text component = btn.get_transform().FindChild("Name").FindChild("Text").GetComponent <Text>(); component.set_text(iconNamesByEquipPos.get_Item("ItemName")); if (equipLibInfo.lv > 0) { btn.get_transform().FindChild("Icon").FindChild("EquipLV").GetComponent <Text>().set_text("+" + equipLibInfo.lv); } else { btn.get_transform().FindChild("Icon").FindChild("EquipLV").GetComponent <Text>().set_text(string.Empty); } btn.get_transform().FindChild("TextLV").GetComponent <Text>().set_text("Lv." + zZhuangBeiPeiZhiBiao.level); int quality = int.Parse(iconNamesByEquipPos.get_Item("QualityLv")); Dictionary <string, Color> textColorByQuality = GameDataUtils.GetTextColorByQuality(quality); component.set_color(textColorByQuality.get_Item("TextColor")); component.GetComponent <Outline>().set_effectColor(textColorByQuality.get_Item("TextOutlineColor")); if (zZhuangBeiPeiZhiBiao.firstGroupId != 0) { if (fxID.fxid == 0) { fxID.fxid = FXSpineManager.Instance.PlaySpine(104, btn.get_transform().FindChild("Icon").FindChild("FX"), "EquipPartUI", 2001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); } } else if (fxID.fxid != 0) { FXSpineManager.Instance.DeleteSpine(fxID.fxid, true); fxID.fxid = 0; } }
public static List <int> GetAlreadyUsedGemTypes(EquipLibType.ELT equipNum, int slotNum) { int num = equipNum - EquipLibType.ELT.Weapon; int num2 = slotNum - 1; List <int> list = new List <int>(); for (int i = 0; i < 4; i++) { if (i != num2) { GemEmbedInfo gemEmbedInfo = GemManager.Instance.equipSlots[num, i]; if (gemEmbedInfo != null && gemEmbedInfo.typeId != 0) { int type = GemGlobal.GetBSSJ(gemEmbedInfo.typeId).type; list.Add(type); } } } return(list); }
public void RefreshUI(int itemID, long equipID, int depthValue = 3000) { EquipItemTipUI component = this.rightTipTrans.FindChild("EquipItemTipUI").GetComponent <EquipItemTipUI>(); if (EquipmentManager.Instance.dicEquips.ContainsKey(equipID)) { component.RefreshUIByEquipID(equipID, depthValue); } else { component.RefreshUIByItemID(itemID, depthValue); } zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(itemID); if (zZhuangBeiPeiZhiBiao != null) { EquipLibType.ELT pos = (EquipLibType.ELT)zZhuangBeiPeiZhiBiao.position; EquipItemTipUI component2 = this.leftTipTrans.FindChild("EquipItemTipUI").GetComponent <EquipItemTipUI>(); EquipLib equipLib = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == pos); component2.RefreshUIByEquipID(equipLib.wearingId, depthValue); } }
public void RefreshUI(WearEquipInfo equipData, int depthValue = 3000) { if (equipData == null) { return; } EquipItemTipUI component = this.rightTipTrans.FindChild("EquipItemTipUI").GetComponent <EquipItemTipUI>(); if (component != null) { component.RefreshUIByWearingInfo(equipData, depthValue); } zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(equipData.id); if (zZhuangBeiPeiZhiBiao != null) { EquipLibType.ELT pos = (EquipLibType.ELT)zZhuangBeiPeiZhiBiao.position; EquipItemTipUI component2 = this.leftTipTrans.FindChild("EquipItemTipUI").GetComponent <EquipItemTipUI>(); EquipLib equipLib = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == pos); component2.RefreshUIByEquipID(equipLib.wearingId, depthValue); } }
public void UpdateUIData(EquipLibType.ELT pos = EquipLibType.ELT.Weapon, EquipDetailedUIState state = EquipDetailedUIState.EquipStrengthen) { this.EquipPos = pos; this.UpdateEquipItemData(); this.ResetUI(); if (state == EquipDetailedUIState.EquipStarUp) { this.UpdateEmbedStarList(); } else if (state == EquipDetailedUIState.EquipGem) { this.UpdateEmbedGemList(); } else if (state == EquipDetailedUIState.EquipEnchantment) { this.UpdateEmbedEnchantmentList(); } else if (state == EquipDetailedUIState.EquipSuitForge) { this.UpdateSuitForgeContent(); } }
private void SetHasEquipedTip(EquipLibType.ELT pos, bool isShowStrength = false) { Transform transform = base.FindTransform("LeftTip"); EquipLib equipLib = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == pos); if (equipLib != null) { if (transform.get_childCount() > 0) { EquipItemTipUI component = transform.GetChild(0).GetComponent <EquipItemTipUI>(); component.GetComponent <EquipItemTipUI>().RefreshUI(equipLib.wearingId, true, false, isShowStrength, 3000); } else { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("EquipItemTipUI"); instantiate2Prefab.get_transform().SetParent(transform); instantiate2Prefab.GetComponent <RectTransform>().set_localScale(new Vector3(1f, 1f, 1f)); instantiate2Prefab.SetActive(true); instantiate2Prefab.GetComponent <RectTransform>().set_localPosition(new Vector3(0f, 0f, 0f)); instantiate2Prefab.GetComponent <EquipItemTipUI>().RefreshUI(equipLib.wearingId, true, false, isShowStrength, 3000); } } }
public static List <int> GetOneLevelGemIds(EquipLibType.ELT equipNum, int slotNum) { List <int> list = new List <int>(); List <int> list2 = new List <int>(); List <int> oneLevelGemIds = GemGlobal.GetOneLevelGemIds(); using (List <int> .Enumerator enumerator = oneLevelGemIds.GetEnumerator()) { while (enumerator.MoveNext()) { int current = enumerator.get_Current(); BaoShiShengJi BaoShiShengJiInfo = DataReader <BaoShiShengJi> .Get(current); BaoShiKongPeiZhi baoShiKongPeiZhi = DataReader <BaoShiKongPeiZhi> .DataList.Find((BaoShiKongPeiZhi a) => a.position == (int)equipNum && a.slotOpen == slotNum); if (baoShiKongPeiZhi != null && baoShiKongPeiZhi.gemType.Find((int e) => e == BaoShiShengJiInfo.type) > 0) { list.Add(BaoShiShengJiInfo.id); } } } return(list); }
public static bool IsCanCompose(EquipLibType.ELT equipNum, int slotNum) { GemEmbedInfo gemInfo = GemGlobal.GetGemInfo(equipNum, slotNum); return(gemInfo != null && GemGlobal.IsCanCompose((int)equipNum, slotNum, gemInfo.typeId)); }
public static bool IsNewOpening(EquipLibType.ELT equipNum, int slotNum) { return(GemManager.Instance.newOpeningSlots[equipNum - EquipLibType.ELT.Weapon, slotNum - 1]); }
public static GemEmbedInfo GetGemInfo(EquipLibType.ELT equipNum, int slotNum) { return(GemManager.Instance.equipSlots[equipNum - EquipLibType.ELT.Weapon, slotNum - 1]); }
public void SetSelectEquipTip(EquipLibType.ELT pos, bool isShowStrength = false) { this.SetHasEquipedTip(pos, isShowStrength); this.UpdateGoods(pos); }
private void OpenChangeEquipUI(EquipLibType.ELT selectPos) { UIManagerControl.Instance.OpenUI("EquipDetailedPopUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush); EquipDetailedPopUI.Instance.SetSelectEquipTip(selectPos, false); }
public bool IsCanWearGem(EquipLibType.ELT pos) { return(SystemOpenManager.IsSystemOn(22) && GemGlobal.CheckCanShowTip((int)pos)); }
private void UpdateGoods(EquipLibType.ELT pos) { this.HaveEquips.get_gameObject().SetActive(true); for (int i = 0; i < this.equipCellParentTrans.get_childCount(); i++) { Transform child = this.equipCellParentTrans.GetChild(i); Object.Destroy(child.get_gameObject()); } this.equipCellTransList.Clear(); List <EquipSimpleInfo> list = new List <EquipSimpleInfo>(); List <KeyValuePair <long, int> > list2 = new List <KeyValuePair <long, int> >(); EquipLib equipLib = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == pos); if (equipLib == null) { return; } for (int j = 0; j < equipLib.equips.get_Count(); j++) { EquipSimpleInfo equipSimpleInfo = equipLib.equips.get_Item(j); zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(equipSimpleInfo.cfgId); if (zZhuangBeiPeiZhiBiao != null) { if (equipSimpleInfo.equipId != equipLib.wearingId) { int equipFightingByEquipID = EquipmentManager.Instance.GetEquipFightingByEquipID(equipSimpleInfo.equipId); if (zZhuangBeiPeiZhiBiao.position == (int)pos && zZhuangBeiPeiZhiBiao.level <= EntityWorld.Instance.EntSelf.Lv && (zZhuangBeiPeiZhiBiao.occupation == 0 || zZhuangBeiPeiZhiBiao.occupation == EntityWorld.Instance.EntSelf.TypeID)) { KeyValuePair <long, int> keyValuePair = new KeyValuePair <long, int>(equipSimpleInfo.equipId, equipFightingByEquipID); list2.Add(keyValuePair); } } } } list2.Sort(new Comparison <KeyValuePair <long, int> >(EquipDetailedPopUI.FightingSortCompare)); for (int k = 0; k < list2.get_Count(); k++) { long equipID = list2.get_Item(k).get_Key(); int num = equipLib.equips.FindIndex((EquipSimpleInfo a) => a.equipId == equipID); if (num >= 0) { list.Add(equipLib.equips.get_Item(num)); } } int num2 = 0; for (int l = 0; l < list.get_Count(); l++) { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab(WidgetName.PetChooseItem); num2++; instantiate2Prefab.set_name("EquipItem_" + num2); PetID component = instantiate2Prefab.GetComponent <PetID>(); instantiate2Prefab.get_transform().SetParent(this.equipCellParentTrans); instantiate2Prefab.get_gameObject().SetActive(true); instantiate2Prefab.GetComponent <RectTransform>().set_localScale(new Vector3(1f, 1f, 1f)); instantiate2Prefab.GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSelectEquipItem); component.SetEquipItemData(list.get_Item(l).cfgId, list.get_Item(l).equipId, SelectImgType.HighLight); this.equipCellTransList.Add(instantiate2Prefab.get_transform()); } if (list.get_Count() > 0) { this.CurrentSelectID = 0; this.equipCellTransList.get_Item(this.CurrentSelectID).GetComponent <PetID>().Selected = true; this.SelectCenterEquipTip(this.equipCellTransList.get_Item(this.CurrentSelectID).GetComponent <PetID>().EquipID, false); } else { this.SelectCenterEquipTip(0L, true); } int num3 = (list == null) ? 6 : (6 - list.get_Count()); if (num3 > 0) { for (int m = 0; m < num3; m++) { GameObject instantiate2Prefab2 = ResourceManager.GetInstantiate2Prefab(WidgetName.PetChooseItem); num2++; instantiate2Prefab2.set_name("EquipItem_" + num2); PetID component2 = instantiate2Prefab2.GetComponent <PetID>(); instantiate2Prefab2.get_transform().SetParent(this.equipCellParentTrans); instantiate2Prefab2.SetActive(true); instantiate2Prefab2.GetComponent <RectTransform>().set_localScale(new Vector3(1f, 1f, 1f)); component2.SetItemFrameMask(); } } }