protected SkillSlotUIData[] GetSkillSlotData(EquipItemInfo equip) { if (equip == null) { return(null); } int maxSlot = equip.GetMaxSlot(); if (maxSlot == 0) { return(null); } SkillSlotUIData[] ui_slot_data = new SkillSlotUIData[maxSlot]; int currentSetNo = MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo(); SkillItemInfo[] skillInventoryClone = MonoBehaviourSingleton <InventoryManager> .I.GetSkillInventoryClone(); SkillItemInfo[] array = Array.FindAll(skillInventoryClone, (SkillItemInfo skill_item) => skill_item.equipSetSkill.Find((EquipSetSkillData skill) => skill.equipItemUniqId == equip.uniqueID && skill.equipSetNo == currentSetNo) != null); if (array != null && array.Length > maxSlot) { Log.Error("Attach Skill Num is Over Skill Slot Num"); } SkillItemTable.SkillSlotData[] slot_data = equip.tableData.GetSkillSlot(equip.exceed); Array.ForEach(array, delegate(SkillItemInfo info) { if (info != null) { EquipSetSkillData equipSetSkillData = info.equipSetSkill.Find((EquipSetSkillData x) => x.equipSetNo == currentSetNo); if (equipSetSkillData != null) { int num2 = equipSetSkillData.equipSlotNo; if (equip.IsExceedSkillSlot(num2)) { num2 = equip.GetExceedSkillIndex(equipSetSkillData.equipSlotNo); } ui_slot_data[num2] = new SkillSlotUIData(); ui_slot_data[num2].slotData = new SkillItemTable.SkillSlotData(info.tableData.id, slot_data[num2].slotType); ui_slot_data[num2].itemData = info; } } }); int i = 0; for (int num = ui_slot_data.Length; i < num; i++) { if (ui_slot_data[i] == null) { ui_slot_data[i] = new SkillSlotUIData(); ui_slot_data[i].slotData = new SkillItemTable.SkillSlotData(0u, equip.tableData.GetSkillSlot(equip.exceed)[i].slotType); } } return(ui_slot_data); }
protected virtual void OnQuery_StatusMigrationSkillConfirm_YES() { //IL_0175: Unknown result type (might be due to invalid IL or missing references) List <SkillItemInfo> list = new List <SkillItemInfo>(); List <MigrationSkillData> list2 = new List <MigrationSkillData>(); for (int i = 0; i < migrationOldItem.GetMaxSlot(); i++) { bool flag = false; SkillItemInfo skillItem = migrationOldItem.GetSkillItem(i, MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo()); if (skillItem != null) { for (int j = 0; j < migrationSelectItem.GetMaxSlot(); j++) { SkillItemTable.SkillSlotData skillSlotData = migrationSelectItem.tableData.GetSkillSlot(migrationSelectItem.exceed)[j]; if (skillSlotData != null && skillSlotData.slotType == skillItem.tableData.type) { int toSlot = j; if (migrationSelectItem.IsExceedSkillSlot(j)) { toSlot = migrationSelectItem.GetExceedSkillSlotNo(j); } if (list2.All((MigrationSkillData x) => x.toSlotNo != toSlot)) { MigrationSkillData item = new MigrationSkillData(migrationSelectItem.uniqueID, toSlot, skillItem); list2.Add(item); flag = true; break; } } } if (!flag) { list.Add(skillItem); } } } migrationSendCount = list2.Count + list.Count; GameSection.SetEventData(new ChangeEquipData(selectEquipSetData.setNo, selectEquipSetData.index, migrationSelectItem)); GameSection.StayEvent(); this.StartCoroutine(SendReplacementSkill(list2, list)); }
protected StatusEquipSetCopyModel.RequestSendForm CopyEquipSetInfo(EquipSetInfo equipSet, int equipSetNo) { StatusEquipSetCopyModel.RequestSendForm requestSendForm = new StatusEquipSetCopyModel.RequestSendForm(); requestSendForm.no = equipSetNo; requestSendForm.name = equipSet.name; requestSendForm.wuid0 = ((equipSet.item[0] == null) ? "0" : equipSet.item[0].uniqueID.ToString()); requestSendForm.wuid1 = ((equipSet.item[1] == null) ? "0" : equipSet.item[1].uniqueID.ToString()); requestSendForm.wuid2 = ((equipSet.item[2] == null) ? "0" : equipSet.item[2].uniqueID.ToString()); requestSendForm.auid = ((equipSet.item[3] == null) ? "0" : equipSet.item[3].uniqueID.ToString()); requestSendForm.ruid = ((equipSet.item[5] == null) ? "0" : equipSet.item[5].uniqueID.ToString()); requestSendForm.luid = ((equipSet.item[6] == null) ? "0" : equipSet.item[6].uniqueID.ToString()); requestSendForm.huid = ((equipSet.item[4] == null) ? "0" : equipSet.item[4].uniqueID.ToString()); requestSendForm.show = equipSet.showHelm; int i = 0; for (int num = equipSet.item.Length; i < num; i++) { EquipItemInfo equipItemInfo = equipSet.item[i]; if (equipItemInfo != null) { SkillSlotUIData[] skillSlotData = GetSkillSlotData(equipItemInfo); if (skillSlotData != null) { int j = 0; for (int num2 = skillSlotData.Length; j < num2; j++) { SkillItemInfo itemData = skillSlotData[j].itemData; requestSendForm.euids.Add(equipItemInfo.uniqueID.ToString()); requestSendForm.suids.Add((itemData == null) ? "0" : itemData.uniqueID.ToString()); int num3 = j; if (equipItemInfo.IsExceedSkillSlot(num3)) { num3 = equipItemInfo.GetExceedSkillSlotNo(num3); } requestSendForm.slots.Add(num3); } } } } return(requestSendForm); }