示例#1
0
文件: Item.cs 项目: KuromeSan/HISP
        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);
            }
        }
示例#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);
        }
示例#3
0
文件: Tack.cs 项目: KuromeSan/HISP
 public void Add(Item.ItemInformation item)
 {
     Logger.DebugPrint("Added " + item.Name + " To Tack Set: " + this.SetName);
     tackItems.Add(item);
 }