public Item FindItemById(ItemID id, bool recurse) { for (int i = 0; i < m_Items.Count; i++) { Item item = (Item)m_Items[i]; if (item.ItemID == id) { return(item); } if (recurse) { item = item.FindItemById(id, true); if (item != null) { return(item); } } } return(null); }