Пример #1
0
        public Element GetElementSlot(InventoryIndex inventoryIndex)
        {
            switch (inventoryIndex)
            {
            case InventoryIndex.None:
                throw new ArgumentOutOfRangeException(nameof(inventoryIndex));

            case InventoryIndex.Helm:
                return(EquippedItems.GetChildAtIndex(10));

            case InventoryIndex.Amulet:
                return(EquippedItems.GetChildAtIndex(11));

            case InventoryIndex.Chest:
                return(EquippedItems.GetChildAtIndex(12));

            case InventoryIndex.LWeapon:
                return(EquippedItems.GetChildAtIndex(14));

            case InventoryIndex.RWeapon:
                return(EquippedItems.GetChildAtIndex(13));

            case InventoryIndex.LWeaponSwap:
                return(EquippedItems.GetChildAtIndex(3));

            case InventoryIndex.RWeaponSwap:
                return(EquippedItems.GetChildAtIndex(2));

            case InventoryIndex.LRing:
                return(EquippedItems.GetChildAtIndex(17));

            case InventoryIndex.RRing:
                return(EquippedItems.GetChildAtIndex(18));

            case InventoryIndex.Gloves:
                return(EquippedItems.GetChildAtIndex(19));

            case InventoryIndex.Belt:
                return(EquippedItems.GetChildAtIndex(20));

            case InventoryIndex.Boots:
                return(EquippedItems.GetChildAtIndex(21));

            case InventoryIndex.PlayerInventory:
                return(EquippedItems.GetChildAtIndex(22));

            case InventoryIndex.Flask:
                return(EquippedItems.GetChildAtIndex(23));

            case InventoryIndex.Trinket:
                return(EquippedItems.GetChildAtIndex(24));

            case InventoryIndex.BloodCrucible:
                return(EquippedItems.GetChildAtIndex(1));

            default:
                throw new ArgumentOutOfRangeException(nameof(inventoryIndex));
            }
        }
Пример #2
0
 public Element GetElementSlot(InventoryIndex inventoryIndex)
 {
     return(inventoryIndex switch
     {
         InventoryIndex.None => throw new ArgumentOutOfRangeException(nameof(inventoryIndex)),
         InventoryIndex.Helm => EquippedItems.GetChildAtIndex(6),
         InventoryIndex.Amulet => EquippedItems.GetChildAtIndex(7),
         InventoryIndex.Chest => EquippedItems.GetChildAtIndex(8),
         InventoryIndex.LWeapon => EquippedItems.GetChildAtIndex(10),
         InventoryIndex.RWeapon => EquippedItems.GetChildAtIndex(9),
         InventoryIndex.LWeaponSwap => EquippedItems.GetChildAtIndex(12),
         InventoryIndex.RWeaponSwap => EquippedItems.GetChildAtIndex(11),
         InventoryIndex.LRing => EquippedItems.GetChildAtIndex(13),
         InventoryIndex.RRing => EquippedItems.GetChildAtIndex(14),
         InventoryIndex.Gloves => EquippedItems.GetChildAtIndex(15),
         InventoryIndex.Belt => EquippedItems.GetChildAtIndex(16),
         InventoryIndex.Boots => EquippedItems.GetChildAtIndex(17),
         InventoryIndex.PlayerInventory => EquippedItems.GetChildAtIndex(18),
         InventoryIndex.Flask => EquippedItems.GetChildAtIndex(19),
         InventoryIndex.Trinket => EquippedItems.GetChildAtIndex(20),
         InventoryIndex.BloodCrucible => EquippedItems.GetChildAtIndex(1),
         _ => throw new ArgumentOutOfRangeException(nameof(inventoryIndex))
     });