Example #1
0
        public static ItemInformation GetRandomItem()
        {
            while (true)
            {
                Item.ItemInformation itm = Items[GameServer.RandomNumberGenerator.Next(0, Items.Length)];

                if (itm.Type == "QUEST" || itm.Type == "CONCEPTUAL" || itm.Type == "TEXT")
                {
                    continue;
                }

                return(itm);
            }
        }
Example #2
0
        public static int GetCountOfItem(Item.ItemInformation item)
        {
            DroppedItem[] droppedItems = droppedItemsList.ToArray();
            int           count        = 0;

            for (int i = 0; i < droppedItems.Length; i++)
            {
                if (droppedItems[i] == null) // Item removed in another thread.
                {
                    continue;
                }

                if (droppedItems[i].Instance.ItemId == item.Id)
                {
                    count++;
                }
            }
            return(count);
        }
Example #3
0
 public void Add(Item.ItemInformation item)
 {
     Logger.DebugPrint("Added " + item.Name + " To Tack Set: " + this.SetName);
     tackItems.Add(item);
 }