public bool CanWearItem(UserItem item, CompanionSlot slot) { if (!Functions.CorrectSlot(item.Info.ItemType, slot) || !CanUseItem(item.Info)) { return(false); } return(true); }
public static bool CorrectSlot(ItemType type, CompanionSlot slot) { switch (slot) { case CompanionSlot.Bag: return(type == ItemType.CompanionBag); case CompanionSlot.Head: return(type == ItemType.CompanionHead); case CompanionSlot.Back: return(type == ItemType.CompanionBack); case CompanionSlot.Food: return(type == ItemType.CompanionFood); default: return(false); } }