Exemplo n.º 1
0
        /// <summary>
        /// Distributes item to other tables (except AllItems)
        /// </summary>
        /// <param name="item">Item</param>
        private void DistributeAddedItemToOtherLists(PoeItem item)
        {
            //orb of alchemy name comparsion
            if (item.FrameType == PoeItem.FrameTypeIndex.Rare && item.Identified == true)
            {
                if (!RareItemNames.ContainsKey(item.Name))
                {
                    RareItemNames.Add(item.Name, 1);
                }
                else
                {
                    RareItemNames[item.Name]++;
                }

                int extraParam;
                ItemsOfInterest.InterestType iType = ItemsOfInterest.IsItItemOfInterest(item, this, out extraParam);
                if (iType != ItemsOfInterest.InterestType.None)
                {
                    if (iType == ItemsOfInterest.InterestType.RareNameMatch && extraParam >= 3)
                    {
                        FindAlchemyItemsByName(item.Name, extraParam);
                    }
                    //else if (iType == ItemsOfInterest.InterestType.HighQualityRare)
                    //    PrintHighQualityItem(item, extraParam);
                }
            }
            //TreeView in ui to show
            ItemsByCatForListView.AddItem(item);
            ItemsByOwner[item.Owner].Add(item);
        }
Exemplo n.º 2
0
        static public InterestType IsItItemOfInterest(PoeItem i, PoeItemsManager ItemsManager, out int ExtraParam)
        {
            if (i.FrameType == PoeItem.FrameTypeIndex.Rare)
            {
                if (ItemsManager.RareItemNames[i.Name] > 1)
                {
                    ExtraParam = ItemsManager.RareItemNames[i.Name];
                    return(InterestType.RareNameMatch);
                }

                //foreach (PoeItem.ItemProperty prop in i.ItemProperties)
                //{
                //    if (prop.Name == "Quality")
                //    {
                //        int quality = int.Parse(prop.Values[0].Value.Remove(prop.Values[0].Value.Length - 1, 1));
                //        if (quality >= 16)
                //        {
                //            ExtraParam = quality;
                //            return InterestType.HighQualityRare;
                //        }
                //    }
                //}
            }
            ExtraParam = 0;
            return(InterestType.None);
        }
Exemplo n.º 3
0
 private void RecheckStashIndex(PoeItem item)
 {
     if (!OwnerStashNames.ContainsKey(item.Owner))
     {
         OwnerStashNames.Add(item.Owner, new SortedSet <string>());
     }
     if (!OwnerStashNames[item.Owner].Contains(item.StashName))
     {
         OwnerStashNames[item.Owner].Add(item.StashName);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Deletes item from all distributed tables except AllItems
 /// </summary>
 /// <param name="item">item</param>
 private void DelDistributedItem(PoeItem item)
 {
     ItemsByOwner[item.Owner].Remove(item);
     ItemsByCatForListView.DelItem(item);
     if (item.FrameType == PoeItem.FrameTypeIndex.Rare && item.Identified == true)
     {
         int i = --RareItemNames[item.Name];
         if (i == 0)
         {
             RareItemNames.Remove(item.Name);
         }
     }
 }
Exemplo n.º 5
0
 private void PrintHighQualityItem(PoeItem item, int Quality)
 {
     AddLog("[" + StaticVariables.LeagueNames[(int)LeagueIndex] + "]: [" + item.TypeLine + "] " + Quality + "%: " + item.Name + " [" + item.Owner + " " + item.StashName + " " + item.PosX + "x" + item.PosY + "]");
 }