示例#1
0
        //---------------------------------------------------------------------------------------------

        public UOItemType FindItem(Graphic graphic, UOColor color)
        {
            UOItemTypeCollection items = FindItems(graphic, color);

            if (items.Count > 0)
            {
                return(items[0]);
            }

            return(null);
        }
示例#2
0
        //---------------------------------------------------------------------------------------------

        public UOItemType FindItem(Graphic graphic, params string[] args)
        {
            UOItemTypeCollection items = FindItems(graphic, args);

            if (items.Count > 0)
            {
                return(items[0]);
            }

            return(null);
        }
示例#3
0
        //---------------------------------------------------------------------------------------------

        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);
        }
示例#4
0
        //---------------------------------------------------------------------------------------------

        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);
        }