Esempio n. 1
0
        public void AddItemNew(BaseItemInfo item, string fileName, bool isShop = true)
        {
            string format = CommonFun.FormatStr(item.Format, item.Name);
            string key    = item.Created + format + item.Name;

            if (!ShopAllItems.ContainsKey(key))
            {
                ShopAllItems.Add(key, item);
            }
            else
            {
                if (isShop)
                {
                    if (shopAllItems[key].PlatformPrice > item.PlatformPrice)
                    {
                        ShopAllItems[key] = item;
                    }
                }
                else
                {
                    if (shopAllItems[key].ShopPrice > item.ShopPrice)
                    {
                        ShopAllItems[key] = item;
                    }
                }
            }
            WriteItem(item, fileName);
        }