public override void SetupSortingData(SortBase.SORT_REQUIREMENT requirement, EquipItemStatus status = null) { switch (requirement) { default: { sortingData = 0L; CreatePickupItemTable.CreatePickupItemData pickupCreateItem = Singleton <CreatePickupItemTable> .I.GetPickupCreateItem(createData.smithCreateTableData.id); if (pickupCreateItem != null) { sortingData = pickupCreateItem.id; } break; } case SortBase.SORT_REQUIREMENT.GET: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.RARITY: sortingData = (long)createData.equipTableData.rarity; break; case SortBase.SORT_REQUIREMENT.LV: sortingData = 1L; break; case SortBase.SORT_REQUIREMENT.ATK: sortingData = (int)createData.equipTableData.baseAtk + createData.equipTableData.baseElemAtk; break; case SortBase.SORT_REQUIREMENT.DEF: sortingData = (int)createData.equipTableData.baseDef + createData.equipTableData.baseElemDef; break; case SortBase.SORT_REQUIREMENT.SALE: sortingData = createData.equipTableData.sale; break; case SortBase.SORT_REQUIREMENT.SOCKET: sortingData = createData.equipTableData.maxSlot; break; case SortBase.SORT_REQUIREMENT.PRICE: sortingData = (int)createData.smithCreateTableData.needMoney; break; case SortBase.SORT_REQUIREMENT.NUM: sortingData = 1L; break; case SortBase.SORT_REQUIREMENT.ELEMENT: sortingData = 6L - (long)GetIconElement(); break; } }
public override void SetupSortingData(SortBase.SORT_REQUIREMENT requirement, EquipItemStatus status = null) { switch (requirement) { default: sortingData = (long)equipData.uniqueID; break; case SortBase.SORT_REQUIREMENT.RARITY: sortingData = (long)equipData.tableData.rarity; break; case SortBase.SORT_REQUIREMENT.LV: sortingData = equipData.level; break; case SortBase.SORT_REQUIREMENT.ATK: sortingData = equipData.atk + equipData.elemAtk; break; case SortBase.SORT_REQUIREMENT.DEF: sortingData = equipData.def + equipData.elemDef; break; case SortBase.SORT_REQUIREMENT.SALE: sortingData = equipData.tableData.sale; break; case SortBase.SORT_REQUIREMENT.SOCKET: sortingData = equipData.GetMaxSlot(); break; case SortBase.SORT_REQUIREMENT.PRICE: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.NUM: sortingData = 1L; break; case SortBase.SORT_REQUIREMENT.ELEMENT: sortingData = 6L - (long)GetIconElement(); break; case SortBase.SORT_REQUIREMENT.ELEM_ATK: sortingData = equipData.elemAtk; break; case SortBase.SORT_REQUIREMENT.ELEM_DEF: sortingData = equipData.elemDef; break; } }
public override void SetupSortingData(SortBase.SORT_REQUIREMENT requirement, EquipItemStatus status = null) { switch (requirement) { default: sortingData = (long)skillData.uniqueID; break; case SortBase.SORT_REQUIREMENT.RARITY: sortingData = (long)skillData.tableData.rarity; break; case SortBase.SORT_REQUIREMENT.LV: sortingData = skillData.level; break; case SortBase.SORT_REQUIREMENT.ATK: sortingData = skillData.atk; break; case SortBase.SORT_REQUIREMENT.DEF: sortingData = skillData.def; break; case SortBase.SORT_REQUIREMENT.HP: sortingData = skillData.hp; break; case SortBase.SORT_REQUIREMENT.SALE: sortingData = skillData.sellPrice; break; case SortBase.SORT_REQUIREMENT.PRICE: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.NUM: sortingData = 1L; break; case SortBase.SORT_REQUIREMENT.ELEMENT: sortingData = 6L - (long)GetIconElement(); break; case SortBase.SORT_REQUIREMENT.SKILL_TYPE: sortingData = 63L - (long)skillData.tableData.type; break; } }
protected virtual void SetupInventoryTypeToggole() { bool flag = selectTypeIndex < UIBehaviour.GetEquipmentTypeIndex(EQUIPMENT_TYPE.ARMOR) || selectTypeIndex == weaponPickupIndex; SetActive((Enum)UI.OBJ_ATK_ROOT, flag); SetActive((Enum)UI.OBJ_DEF_ROOT, !flag); SetToggleButton((Enum)UI.TGL_BUTTON_ROOT, flag, (Action <bool>) delegate(bool is_active) { EQUIPMENT_TYPE type = (!is_active) ? EQUIPMENT_TYPE.HELM : EQUIPMENT_TYPE.ONE_HAND_SWORD; int num = (!is_active) ? 1 : 0; ResetTween((Enum)tabAnimTarget[num], 0); PlayTween((Enum)tabAnimTarget[num], true, (EventDelegate.Callback)null, false, 0); SetActive((Enum)UI.OBJ_ATK_ROOT, is_active); SetActive((Enum)UI.OBJ_DEF_ROOT, !is_active); selectTypeIndex = UIBehaviour.GetEquipmentTypeIndex(type); sortSettings.dialogType = ((!is_active) ? SortBase.DIALOG_TYPE.ARMOR : SortBase.DIALOG_TYPE.WEAPON); SortBase.SORT_REQUIREMENT sORT_REQUIREMENT = (sortSettings.dialogType != SortBase.DIALOG_TYPE.ARMOR) ? SortBase.SORT_REQUIREMENT.REQUIREMENT_WEAPON_BIT : SortBase.SORT_REQUIREMENT.REQUIREMENT_ARMORS_BIT; if ((sortSettings.requirement & sORT_REQUIREMENT) == (SortBase.SORT_REQUIREMENT) 0) { if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ATK) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.DEF; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.DEF) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ATK; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ELEM_ATK) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEM_DEF; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ELEM_DEF) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEM_ATK; } else { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEMENT; } } SetDirty(InventoryUI); InitLocalInventory(); LocalInventory(); UpdateTabButton(); }); }
public override void SetupSortingData(SortBase.SORT_REQUIREMENT requirement, EquipItemStatus status = null) { switch (requirement) { default: sortingData = (long)itemData.uniqueID; break; case SortBase.SORT_REQUIREMENT.RARITY: sortingData = (long)itemData.tableData.rarity; break; case SortBase.SORT_REQUIREMENT.LV: sortingData = 1L; break; case SortBase.SORT_REQUIREMENT.ATK: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.DEF: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.SALE: sortingData = itemData.tableData.price; break; case SortBase.SORT_REQUIREMENT.SOCKET: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.PRICE: sortingData = 0L; break; case SortBase.SORT_REQUIREMENT.NUM: sortingData = itemData.num; break; case SortBase.SORT_REQUIREMENT.ELEMENT: sortingData = 6L - (long)GetIconElement(); break; } }
public override void SetupSortingData(SortBase.SORT_REQUIREMENT requirement, EquipItemStatus status = null) { switch (requirement) { default: sortingData = itemData.infoData.questData.tableData.questID; break; case SortBase.SORT_REQUIREMENT.RARITY: sortingData = (long)itemData.infoData.questData.tableData.rarity; break; case SortBase.SORT_REQUIREMENT.NUM: sortingData = itemData.infoData.questData.num; break; case SortBase.SORT_REQUIREMENT.DIFFICULTY: sortingData = (long)itemData.infoData.questData.tableData.difficulty; break; case SortBase.SORT_REQUIREMENT.ENEMY: { EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)itemData.infoData.questData.tableData.GetMainEnemyID()); if (enemyData == null) { sortingData = 0L; } else { sortingData = (long)enemyData.type; } break; } } }
public static SortSettings CreateMemSortSettings(SortBase.DIALOG_TYPE dialog_type, SETTINGS_TYPE memory_type) { if (memory_type >= SETTINGS_TYPE.MAX) { return(null); } if (memSettings == null) { memSettings = new SortSettings[13]; } SortSettings sortSettings = memSettings[(int)memory_type]; bool flag = sortSettings != null; if (!flag) { memSettings[(int)memory_type] = new SortSettings(); if (GetMemorySortData(memory_type, ref memSettings[(int)memory_type])) { flag = true; } sortSettings = memSettings[(int)memory_type]; } sortSettings.dialogType = dialog_type; switch (dialog_type) { case SortBase.DIALOG_TYPE.WEAPON: case SortBase.DIALOG_TYPE.ARMOR: case SortBase.DIALOG_TYPE.STORAGE_EQUIP: { sortSettings.TYPE_ALL = SortBase.TYPE.EQUIP_ALL; SortBase.SORT_REQUIREMENT sORT_REQUIREMENT = (dialog_type != SortBase.DIALOG_TYPE.ARMOR) ? SortBase.SORT_REQUIREMENT.REQUIREMENT_WEAPON_BIT : SortBase.SORT_REQUIREMENT.REQUIREMENT_ARMORS_BIT; if (!flag) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEMENT; } else if ((sortSettings.requirement & sORT_REQUIREMENT) == (SortBase.SORT_REQUIREMENT) 0) { if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ATK) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.DEF; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.DEF) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ATK; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ELEM_ATK) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEM_DEF; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ELEM_DEF) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEM_ATK; } else { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEMENT; } } break; } case SortBase.DIALOG_TYPE.SMITH_CREATE_WEAPON: case SortBase.DIALOG_TYPE.SMITH_CREATE_ARMOR: case SortBase.DIALOG_TYPE.SMITH_CREATE_PICKUP_WEAPON: case SortBase.DIALOG_TYPE.SMITH_CREATE_PICKUP_ARMOR: { sortSettings.TYPE_ALL = SortBase.TYPE.NONE; SortBase.SORT_REQUIREMENT sORT_REQUIREMENT2; switch (dialog_type) { default: sORT_REQUIREMENT2 = SortBase.SORT_REQUIREMENT.REQUIREMENT_CREATE_WEAPON_BIT; break; case SortBase.DIALOG_TYPE.SMITH_CREATE_ARMOR: sORT_REQUIREMENT2 = SortBase.SORT_REQUIREMENT.REQUIREMENT_CREATE_ARMORS_BIT; break; case SortBase.DIALOG_TYPE.SMITH_CREATE_PICKUP_WEAPON: sORT_REQUIREMENT2 = SortBase.SORT_REQUIREMENT.REQUIREMENT_CREATE_PICKUP_WEAPON_BIT; break; case SortBase.DIALOG_TYPE.SMITH_CREATE_PICKUP_ARMOR: sORT_REQUIREMENT2 = SortBase.SORT_REQUIREMENT.REQUIREMENT_CREATE_PICKUP_ARMORS_BIT; break; } if (!flag) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEMENT; } else if ((sortSettings.requirement & sORT_REQUIREMENT2) == (SortBase.SORT_REQUIREMENT) 0) { if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.ATK) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.DEF; } else if (sortSettings.requirement == SortBase.SORT_REQUIREMENT.DEF) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ATK; } else { sortSettings.requirement = SortBase.SORT_REQUIREMENT.ELEMENT; } } break; } case SortBase.DIALOG_TYPE.SKILL: case SortBase.DIALOG_TYPE.STORAGE_SKILL: sortSettings.TYPE_ALL = SortBase.TYPE.SKILL_ALL; if (!flag) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.SKILL_TYPE; } break; case SortBase.DIALOG_TYPE.USE_ITEM: case SortBase.DIALOG_TYPE.MATERIAL: sortSettings.TYPE_ALL = SortBase.TYPE.WEAPON_ALL; if (!flag) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.NUM; } break; case SortBase.DIALOG_TYPE.QUEST: sortSettings.TYPE_ALL = SortBase.TYPE.ENEMY_ALL; if (!flag) { sortSettings.requirement = SortBase.SORT_REQUIREMENT.RARITY; } break; default: sortSettings.requirement = SortBase.SORT_REQUIREMENT.RARITY; sortSettings.TYPE_ALL = SortBase.TYPE.NONE; break; } if (!flag && sortSettings.TYPE_ALL != 0) { sortSettings.type = (int)sortSettings.TYPE_ALL; } return(sortSettings.Clone()); }
private static int GetSortBitRequirement(SortBase.SORT_REQUIREMENT requirement) { return((int)requirement); }
public virtual void SetupSortingData(SortBase.SORT_REQUIREMENT requirement, EquipItemStatus status = null) { }