This commit is contained in:
Ottermandias 2022-10-02 23:43:21 +02:00
parent e3a58340b3
commit 6a4b5fc3b2
15 changed files with 740 additions and 300 deletions

View file

@ -77,6 +77,7 @@ public static class GameData
EmptySlot(EquipSlot.Feet),
EmptyNpc(EquipSlot.Feet),
},
[EquipSlot.MainHand] = new(2000),
[EquipSlot.RFinger] = new(200)
{
EmptySlot(EquipSlot.RFinger),
@ -87,8 +88,6 @@ public static class GameData
EmptySlot(EquipSlot.Neck),
EmptyNpc(EquipSlot.Neck),
},
[EquipSlot.MainHand] = new(1000) { EmptySlot(EquipSlot.MainHand) },
[EquipSlot.OffHand] = new(200) { EmptySlot(EquipSlot.OffHand) },
[EquipSlot.Wrists] = new(200)
{
EmptySlot(EquipSlot.Wrists),
@ -112,10 +111,10 @@ public static class GameData
continue;
slot = slot.ToSlot();
if (!_itemsBySlot.TryGetValue(slot, out var list))
continue;
list.Add(new Item(item, name, slot));
if (slot == EquipSlot.OffHand)
slot = EquipSlot.MainHand;
if (_itemsBySlot.TryGetValue(slot, out var list))
list.Add(new Item(item, name, slot));
}
foreach (var list in _itemsBySlot.Values)

View file

@ -24,6 +24,9 @@ public readonly struct Item
public bool IsBothHand
=> (EquipSlot)Base.EquipSlotCategory.Row == EquipSlot.BothHand;
public WeaponCategory WeaponCategory
=> (WeaponCategory?) Base.ItemUICategory?.Row ?? WeaponCategory.Unknown;
// Create a new item from its sheet list with the given name and either the inferred equip slot or the given one.
public Item(Lumina.Excel.GeneratedSheets.Item item, string name, EquipSlot slot = EquipSlot.Unknown)
{