public static int GetSortStatus(UnitListWindow.Data data, UnitListSortWindow.SelectType type) { if (data.param == null) { return(0); } UnitParam unitParam = data.param; UnitData unit = data.unit; StatusParam statusParam = unitParam.ini_status.param; if (unit != null) { statusParam = unit.Status.param; } UnitListSortWindow.SelectType selectType = type; switch (selectType) { case UnitListSortWindow.SelectType.TIME: return(0); case UnitListSortWindow.SelectType.RARITY: if (unit != null) { return(unit.Rarity); } return(1); case UnitListSortWindow.SelectType.LEVEL: if (unit != null) { return(unit.Lv); } return(1); case UnitListSortWindow.SelectType.TOTAL: return((int)statusParam.atk + (int)statusParam.def + (int)statusParam.mag + (int)statusParam.mnd + (int)statusParam.spd + (int)statusParam.dex + (int)statusParam.cri + (int)statusParam.luk); default: if (selectType == UnitListSortWindow.SelectType.ATK) { return((int)statusParam.atk); } if (selectType == UnitListSortWindow.SelectType.DEF) { return((int)statusParam.def); } if (selectType == UnitListSortWindow.SelectType.MAG) { return((int)statusParam.mag); } if (selectType == UnitListSortWindow.SelectType.MND) { return((int)statusParam.mnd); } if (selectType == UnitListSortWindow.SelectType.HP) { return((int)statusParam.hp); } if (selectType == UnitListSortWindow.SelectType.SPD) { return((int)statusParam.spd); } if (selectType != UnitListSortWindow.SelectType.COMBINATION) { if (selectType != UnitListSortWindow.SelectType.JOBRANK) { if (selectType == UnitListSortWindow.SelectType.AWAKE) { if (unit != null) { return(unit.AwakeLv); } return(1); } goto case UnitListSortWindow.SelectType.TIME; } else { if (unit != null) { return(unit.CurrentJob.Rank); } return(1); } } else { if (unit != null) { return(unit.GetCombination()); } return(1); } } }
public static Sprite GetIcon(UnitListSortWindow.SelectType selectType) { return(GameSettings.Instance.GetUnitSortModeIcon(UnitListSortWindow.ConvertSelectType(selectType))); }
public bool IsType(UnitListSortWindow.SelectType value) { return((this.m_SelectType & value) != UnitListSortWindow.SelectType.NONE); }
private void ResetAlignment(UnitListSortWindow.SelectType selectType) { this.m_SelectType &= ~(selectType & (UnitListSortWindow.SelectType) 251658240); }
private void SetAlignment(UnitListSortWindow.SelectType selectType) { this.m_SelectType &= (UnitListSortWindow.SelectType) - 251658241; this.m_SelectType |= selectType & (UnitListSortWindow.SelectType) 251658240; }
private void ResetSection(UnitListSortWindow.SelectType selectType) { this.m_SelectType &= ~(selectType & (UnitListSortWindow.SelectType) 16777215); }
private void SetSection(UnitListSortWindow.SelectType selectType) { this.m_SelectType &= (UnitListSortWindow.SelectType) - 16777216; this.m_SelectType |= selectType & (UnitListSortWindow.SelectType) 16777215; }