public List <Item> FindItemsByType([FromQuery] Equipment.EqSlot query) { var items = _db.GetCollection <Item>(DataBase.Collections.Items).FindAll().Where(x => x.Slot.Equals(query)); return(items.ToList()); }
public bool EqSlotSet(Equipment.EqSlot slot, Player player) { switch (slot) { case Equipment.EqSlot.Arms: return(player.Equipped.Arms != null); case Equipment.EqSlot.Body: return(player.Equipped.AboutBody != null); case Equipment.EqSlot.Face: return(player.Equipped.Face != null); case Equipment.EqSlot.Feet: return(player.Equipped.Feet != null); case Equipment.EqSlot.Finger: return(player.Equipped.Finger != null); case Equipment.EqSlot.Floating: return(player.Equipped.Floating != null); case Equipment.EqSlot.Hands: return(player.Equipped.Hands != null); case Equipment.EqSlot.Head: return(player.Equipped.Head != null); case Equipment.EqSlot.Held: return(player.Equipped.Held != null); case Equipment.EqSlot.Legs: return(player.Equipped.Legs != null); case Equipment.EqSlot.Light: return(player.Equipped.Light != null); case Equipment.EqSlot.Neck: return(player.Equipped.Neck != null); case Equipment.EqSlot.Shield: return(player.Equipped.Shield != null); case Equipment.EqSlot.Torso: return(player.Equipped.Torso != null); case Equipment.EqSlot.Waist: return(player.Equipped.Waist != null); case Equipment.EqSlot.Wielded: return(player.Equipped.Wielded != null); case Equipment.EqSlot.Wrist: return(player.Equipped.Wrist != null); case Equipment.EqSlot.Secondary: return(player.Equipped.Secondary != null); default: return(false); } }