Server.MirObjects.NPCScript.ParseGoods C# (CSharp) Method

ParseGoods() private method

private ParseGoods ( IList lines ) : void
lines IList
return void
        private void ParseGoods(IList<string> lines)
        {
            for (int i = 0; i < lines.Count; i++)
            {
                if (!lines[i].ToUpper().StartsWith(TradeKey)) continue;

                while (++i < lines.Count)
                {
                    if (lines[i].StartsWith("[")) return;
                    if (String.IsNullOrEmpty(lines[i])) continue;

                    var data = lines[i].Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);

                    ItemInfo info = Envir.GetItemInfo(data[0]);
                    if (info == null)
                        continue;

                    UserItem goods = Envir.CreateShopItem(info, (uint)i);

                    if (goods == null || Goods.Contains(goods))
                    {
                        MessageQueue.Enqueue(string.Format("Could not find Item: {0}, File: {1}", lines[i], FileName));
                        continue;
                    }

                    ushort count = 1;
                    if (data.Length == 2)
                        ushort.TryParse(data[1], out count);

                    goods.Count = count;

                    Goods.Add(goods);
                }
            }
        }
        private void ParseQuests(IList<string> lines)