public string GetDescription() { AbilityDataTable.AbilityData abilityData = Singleton <AbilityDataTable> .I.GetAbilityData(id, ap); if (abilityData == null) { abilityData = Singleton <AbilityDataTable> .I.GetMinimumAbilityData(id); } return(abilityData.description); }
public bool IsAbilityOn() { AbilityDataTable.AbilityData abilityData = Singleton <AbilityDataTable> .I.GetAbilityData(this.ability.id, this.ability.ap); if (abilityData == null) { return(false); } AbilityTable.Ability ability = Singleton <AbilityTable> .I.GetAbility(this.ability.id); return(!abilityData.HasNeedUpdateAbility() && ability.IsActive()); }
private void SetAbilityData(int index, EquipItemAbility ability) { UI uI = UI.LBL_NAME_1; UI uI2 = UI.LBL_POINT_1; UI uI3 = UI.LBL_DESC_1; UI[] array = new UI[6] { UI.LBL_NAME_1, UI.LBL_NAME_2, UI.LBL_NAME_3, UI.LBL_NAME_4, UI.LBL_NAME_5, UI.LBL_NAME_6 }; UI[] array2 = new UI[6] { UI.LBL_POINT_1, UI.LBL_POINT_2, UI.LBL_POINT_3, UI.LBL_POINT_4, UI.LBL_POINT_5, UI.LBL_POINT_6 }; UI[] array3 = new UI[6] { UI.LBL_DESC_1, UI.LBL_DESC_2, UI.LBL_DESC_3, UI.LBL_DESC_4, UI.LBL_DESC_5, UI.LBL_DESC_6 }; if (0 <= index && 5 >= index) { uI = array[index]; uI2 = array2[index]; uI3 = array3[index]; } AbilityDataTable.AbilityData abilityData = Singleton <AbilityDataTable> .I.GetAbilityData(ability.id, ability.ap); if (abilityData == null) { abilityData = Singleton <AbilityDataTable> .I.GetMinimumAbilityData(ability.id); } SetLabelText((Enum)uI, ability.GetName()); SetLabelText((Enum)uI2, ability.GetAP()); SetLabelText((Enum)uI3, abilityData.description); }
public bool HasNeedUpdateAbility() { for (int i = 0; i < ability.Length; i++) { AbilityDataTable.AbilityData abilityData = Singleton <AbilityDataTable> .I.GetAbilityData(ability[i].id, ability[i].ap); if (abilityData != null) { for (int j = 0; j < abilityData.info.Length; j++) { if (abilityData.info[j].IsNeedUpdate()) { return(true); } } } } return(false); }
public override void UpdateUI() { //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) SetFullScreenButton((Enum)UI.BTN_OK); SetFontStyle((Enum)UI.STR_TITLE, 2); SetFontStyle((Enum)UI.STR_NEED_POINT, 2); AbilityDataTable.AbilityData table = Singleton <AbilityDataTable> .I.GetAbilityData(ability.id, ability.ap); AbilityDataTable.AbilityData minimumAbilityData = Singleton <AbilityDataTable> .I.GetMinimumAbilityData(ability.id); if (ability.ap == -1) { SetLabelText((Enum)UI.LBL_DATA_NAME, ability.GetName()); SetActive((Enum)UI.LBL_DESCRIPTION, minimumAbilityData != null); SetLabelText((Enum)UI.LBL_DESCRIPTION, minimumAbilityData.description); } else if (table != null) { SetLabelText((Enum)UI.LBL_DATA_NAME, table.name); SetActive((Enum)UI.LBL_DESCRIPTION, true); SetLabelText((Enum)UI.LBL_DESCRIPTION, table.description); } else { SetLabelText((Enum)UI.LBL_DATA_NAME, base.sectionData.GetText("NON_DATA")); SetActive((Enum)UI.LBL_DESCRIPTION, minimumAbilityData != null); SetLabelText((Enum)UI.LBL_DESCRIPTION, minimumAbilityData.description); } AbilityDataTable.AbilityData[] data = Singleton <AbilityDataTable> .I.GetAbilityDataArray(ability.id); SetActive((Enum)UI.GRD_DATA_LIST, data != null); if (data != null) { SetGrid(UI.GRD_DATA_LIST, "EquipSetDetailAbilityDataItem", data.Length, false, delegate(int i, Transform t, bool is_recycle) { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) AbilityDataTable.AbilityData abilityData = data[i]; string text = string.Format(((int)abilityData.needAP < 0) ? "{0}" : "+{0}", abilityData.needAP); SetLabelText(t, UI.LBL_ABILITY_DATA_NAME, abilityData.name); SetLabelText(t, UI.LBL_AP, text); bool flag = table != null && table.needAP == abilityData.needAP; SetActive(t, UI.SPR_ABILITY_ON, flag); Color color = (ability.ap != -1) ? Color.get_gray() : Color.get_white(); if (flag) { centeringIndex = i; color = Color.get_white(); } SetColor(t, UI.LBL_ABILITY_DATA_NAME, color); SetColor(t, UI.LBL_AP, color); }); UIScrollView component = base.GetComponent <UIScrollView>((Enum)UI.SCR_DATA_LIST); if (component != null && component.get_enabled()) { UIGrid component2 = base.GetComponent <UIGrid>((Enum)UI.GRD_DATA_LIST); Vector2 viewSize = component.panel.GetViewSize(); float y = viewSize.y; float cellHeight = component2.cellHeight; int num = Mathf.RoundToInt(y / cellHeight); int num2 = num / 2; int num3 = -1; if (centeringIndex > num2) { num3 = centeringIndex - num2; } Transform val = component.get_transform().FindChild("_DRAG_SCROLL_"); Vector3 position = component2.get_transform().get_position(); component.ResetPosition(); component.MoveRelative(new Vector3(0f, cellHeight * (float)num3)); Vector3 position2 = val.get_transform().get_position(); Vector3 position3 = component2.get_transform().get_position(); Vector3 val2 = position3 - position; val.get_transform().set_position(position2 - val2); } } }
private bool HasFixAbilityWithWeaponType(EquipItemInfo item, int wepIndex, bool checkOnlyFixAbility) { if (item.ability == null || item.ability.Length == 0) { return(false); } for (int i = 0; i < item.ability.Length; i++) { if (!checkOnlyFixAbility || item.IsFixedAbility(i)) { AbilityDataTable.AbilityData abilityData = Singleton <AbilityDataTable> .I.GetAbilityData(item.ability[i].id, item.ability[i].ap); if (abilityData != null) { ENABLE_EQUIP_TYPE enableEquipType = abilityData.enableEquipType; switch (enableEquipType) { case ENABLE_EQUIP_TYPE.ONE_HAND_SWORD: if (wepIndex == 1) { return(true); } goto default; default: if (enableEquipType == ENABLE_EQUIP_TYPE.TWO_HAND_SWORD && wepIndex == 2) { return(true); } if (enableEquipType == ENABLE_EQUIP_TYPE.SPEAR && wepIndex == 3) { return(true); } if (enableEquipType == ENABLE_EQUIP_TYPE.PAIR_SWORDS && wepIndex == 4) { return(true); } if (enableEquipType == ENABLE_EQUIP_TYPE.ARROW && wepIndex == 5) { return(true); } break; case ENABLE_EQUIP_TYPE.ALL: break; } AbilityDataTable.AbilityData.AbilityInfo[] info = abilityData.info; for (int j = 0; j < info.Length; j++) { if (!string.IsNullOrEmpty(info[j].target)) { string target = info[j].target; if (target == "ONE_HAND_SWORD" && wepIndex == 1) { return(true); } if (target == "TWO_HAND_SWORD" && wepIndex == 2) { return(true); } if (target == "SPEAR" && wepIndex == 3) { return(true); } if (target == "PAIR_SWORDS" && wepIndex == 4) { return(true); } if (target == "ARROW" && wepIndex == 5) { return(true); } } } } } } return(false); }