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); } else if (recurse) { item = item.FindItemByID(id, true); if (item != null) { return(item); } } } return(null); }
internal Item FindItemByID(ItemID id, bool recurse) { foreach (Item t in m_Items) { Item item = t; if (item.ItemID == id) { return(item); } else if (recurse) { item = item.FindItemByID(id, true); if (item != null) { return(item); } } } return(null); }