//--------------------------------------------------------------------------------------------- public UOItemType FindItem(Graphic graphic, UOColor color) { UOItemTypeCollection items = FindItems(graphic, color); if (items.Count > 0) { return(items[0]); } return(null); }
//--------------------------------------------------------------------------------------------- public UOItemType FindItem(Graphic graphic, params string[] args) { UOItemTypeCollection items = FindItems(graphic, args); if (items.Count > 0) { return(items[0]); } return(null); }
//--------------------------------------------------------------------------------------------- public UOItemTypeCollection FindItems(Graphic graphic, UOColor color) { UOItemTypeCollection items = new UOItemTypeCollection(); foreach (UOItemType item in this) { if (item.Graphic == graphic && item.Color == color) { items.Add(item); } } return(items); }
//--------------------------------------------------------------------------------------------- public UOItemTypeCollection FindItems(Graphic graphic, params string[] args) { UOItemTypeCollection items = new UOItemTypeCollection(); foreach (UOItemType item in this) { if (item.Graphic == graphic && (args.Length == 0 || item.MatchSearchParams(args))) { items.Add(item); } } return(items); }