コード例 #1
0
 /// <summary>
 ///     AnalyzeIdentifiedItems
 /// </summary>
 /// <param name="vendorList"></param>
 /// <param name="pathCount"></param>
 private void AnalyzeIdentifiedItems(
     out IList <Tuple <long, NormalInventoryItem> > vendorList,
     out IDictionary <string, int> pathCount)
 {
     vendorList = new List <Tuple <long, NormalInventoryItem> >();
     pathCount  = new Dictionary <string, int>();
     try
     {
         foreach (var invItem in GetInventoryItems())
         {
             try
             {
                 if (invItem.Item.ComponentList == 0 ||
                     invItem.Item.Rarity == MonsterRarity.Error ||
                     !invItem.Item.HasComponent <Base>() ||
                     _itemFactory.Evaluate(invItem) == Actions.Vendor)
                 {
                     vendorList.Add(new Tuple <long, NormalInventoryItem>(invItem.Address, invItem));
                     var key = invItem.Item.Path;
                     if (pathCount.ContainsKey(key))
                     {
                         pathCount[key]++;
                     }
                     else
                     {
                         pathCount.Add(key, 1);
                     }
                 }
             }
             catch (Exception)
             {
                 LogMessage($"[EZV] Found krangled item. Selling", 30);
                 vendorList.Add(new Tuple <long, NormalInventoryItem>(invItem.Address, invItem));
             }
         }
     }
     catch (Exception)
     {
         // ignored
     }
 }