Пример #1
0
    public static int GetArmourValue(PossibleArmourSlots slot)
    {
        switch (slot)
        {
        case PossibleArmourSlots.Head:
            return(5);

        case PossibleArmourSlots.Shoulders:
            return(6);

        case PossibleArmourSlots.Chest:
            return(20);

        case PossibleArmourSlots.Hands:
            return(5);

        case PossibleArmourSlots.Legs:
            return(10);

        case PossibleArmourSlots.Boots:
            return(5);
        }

        return(0);
    }
Пример #2
0
    public static int GetSlotIndex(PossibleArmourSlots slot)
    {
        var slots = Enum.GetNames(typeof(PossibleArmourSlots)).ToList();

        return(slots.IndexOf(slot.ToString()));
    }