Exemplo n.º 1
0
 private int FindSlotCat()
 {
     if (ClassCat == ClassIndex.Misc)
     {
         if (FrameType == FrameTypeIndex.Unique)
         {
             return(14);
         }
         if (TypeLine.EndsWith("Belt") || TypeLine == "Rustic Sash")
         {
             return(9);
         }
         else if (TypeLine.EndsWith("Ring"))
         {
             return(8);
         }
         else if (TypeLine.EndsWith("Amulet"))
         {
             return(7);
         }
         //else
         //{
         //    ItemsCategoryTable.CatSubCat cat = ItemsCategoryTable.Find(this);
         //    return cat.SlotIndex;
         //}
     }
     else if (ClassCat == ClassIndex.Marauder)
     {
         if (ItemProperties.Count > 0)
         {
             if (ItemProperties[0].Name == "One Handed Mace")
             {
                 return(0);
             }
             if (ItemProperties[0].Name == "Two Handed Mace")
             {
                 return(1);
             }
             if (ItemProperties[0].Name == "One Handed Axe")
             {
                 return(2);
             }
         }
         if (TypeLine.EndsWith("Greaves"))
         {
             return(3);
         }
         if (TypeLine.EndsWith("late"))
         {
             return(4);
         }
         if (TypeLine.EndsWith("Casque"))
         {
             return(5);
         }
         if (TypeLine.EndsWith("Gauntlets"))
         {
             return(6);
         }
         if (TypeLine.EndsWith("Shield"))
         {
             return(7);
         }
         return(8);
     }
     else if (ClassCat == ClassIndex.Ranger)
     {
         if (ItemProperties.Count > 0)
         {
             if (ItemProperties[0].Name == "Bow")
             {
                 return(0);
             }
             if (ItemProperties[0].Name == "One Handed Sword")
             {
                 return(1);
             }
         }
         if (TypeLine.EndsWith("Quiver"))
         {
             return(2);
         }
         if (TypeLine.EndsWith("Boots")) //Boots
         {
             return(3);
         }
         if (TypeLine.EndsWith("Leather") || TypeLine.EndsWith("Tunic") || TypeLine.EndsWith("Garb") || TypeLine.EndsWith("Jerkin")) //Chest
         {
             return(4);
         }
         if (TypeLine.EndsWith("Hood") || TypeLine.EndsWith("Cap")) //Helment
         {
             return(5);
         }
         if (TypeLine.EndsWith("Gloves")) //Gloves
         {
             return(6);
         }
         if (TypeLine.EndsWith("Buckler")) //Shield
         {
             return(7);
         }
         return(8);
     }
     else if (ClassCat == ClassIndex.Witch)
     {
         //private static string[] PoeItemWitchCatNames = { "Wand", "Boots", "Chest", "Helment", "Gloves", "Shield", "Unknown" };
         if (ItemProperties.Count > 0)
         {
             if (ItemProperties[0].Name == "Wand")
             {
                 return(0);
             }
         }
         if (TypeLine.EndsWith("Boots") || TypeLine.EndsWith("Slippers") || TypeLine.EndsWith("Shoes"))
         {
             return(1);
         }
         if (TypeLine.EndsWith("Robe") || TypeLine.EndsWith("Vest") || TypeLine.EndsWith("Garb") || TypeLine.EndsWith("Wrap") || TypeLine.EndsWith("Vestment") || TypeLine.EndsWith("Regalia") || TypeLine.EndsWith("Silks"))
         {
             return(2);
         }
         if (TypeLine.EndsWith("Circlet")) //Helm
         {
             return(3);
         }
         if (TypeLine.EndsWith("Gloves")) //Gloves
         {
             return(4);
         }
         if (TypeLine.EndsWith("Shield")) //Shield
         {
             return(5);
         }
         return(6);
     }
     else if (ClassCat == ClassIndex.Duelist)
     {
         //private static string[] PoeItemDuelistCatNames = { "1H Axe", "2H Axe", "1H Sword", "2H Sword", "Boots", "Chest", "Helment", "Gloves", "Shield", "Unknown" };
         if (ItemProperties.Count > 0)
         {
             if (ItemProperties[0].Name == "One Handed Axe")
             {
                 return(0);
             }
             if (ItemProperties[0].Name == "Two Handed Axe")
             {
                 return(1);
             }
             if (ItemProperties[0].Name == "One Handed Sword")
             {
                 return(2);
             }
             if (ItemProperties[0].Name == "Two Handed Sword")
             {
                 return(3);
             }
         }
         if (TypeLine.EndsWith("Boots")) //boots
         {
             return(4);
         }
         if (TypeLine.EndsWith("Vest") || TypeLine.EndsWith("Brigandine") || TypeLine.EndsWith("Doublet") || TypeLine.EndsWith("Armor") || TypeLine.EndsWith("Wyrmscale") || TypeLine.EndsWith("Lamellar")) //chest
         {
             return(5);
         }
         if (TypeLine.EndsWith("Helmet")) //helment
         {
             return(6);
         }
         if (TypeLine.EndsWith("Gauntlets")) //gloves
         {
             return(7);
         }
         if (TypeLine.EndsWith("Shield")) //shield
         {
             return(8);
         }
         return(9);
     }
     else if (ClassCat == ClassIndex.Templar)
     {
         //private static string[] PoeItemTemplarCatNames = { "1H Mace", "Staff", "Boots", "Chest", "Helment", "Gloves", "Shield", "Unknown" };
         if (ItemProperties.Count > 0)
         {
             if (ItemProperties[0].Name == "One Handed Mace")
             {
                 return(0);
             }
             if (ItemProperties[0].Name == "Staff")
             {
                 return(1);
             }
         }
         if (TypeLine.EndsWith("Boots")) //boots
         {
             return(2);
         }
         if (TypeLine.EndsWith("Vest") || TypeLine.EndsWith("Tunic") || TypeLine.EndsWith("Coat") || TypeLine.EndsWith("Doublet") || TypeLine.EndsWith("Ringmail") || TypeLine.EndsWith("Chainmail") || TypeLine.EndsWith("Hauberk")) //chest
         {
             return(3);
         }
         if (TypeLine.EndsWith("Coif")) //helment
         {
             return(4);
         }
         if (TypeLine.EndsWith("Gloves")) //gloves
         {
             return(5);
         }
         if (TypeLine.EndsWith("Shield") || TypeLine.EndsWith("Bundle")) //shield
         {
             return(6);
         }
         return(7);
     }
     else if (ClassCat == ClassIndex.Shadow)
     {
         //private static string[] PoeItemShadowCatNames = { "Claw", "Dagger", "Boots", "Chest", "Helment", "Gloves", "Shield", "Unknown" };
         if (ItemProperties.Count > 0)
         {
             if (ItemProperties[0].Name == "Claw")
             {
                 return(0);
             }
             if (ItemProperties[0].Name == "Dagger")
             {
                 return(1);
             }
         }
         if (TypeLine.EndsWith("Boots")) //boots
         {
             return(2);
         }
         if (TypeLine.EndsWith("Vest") || TypeLine.EndsWith("Jacket") || TypeLine.EndsWith("Coat") || TypeLine.EndsWith("Raiment") || TypeLine.EndsWith("Garb") || TypeLine.EndsWith("Armor")) //chest
         {
             return(3);
         }
         if (TypeLine.EndsWith("Mask")) //helment
         {
             return(4);
         }
         if (TypeLine.EndsWith("Mitts")) //gloves
         {
             return(5);
         }
         if (TypeLine.EndsWith("Shield")) //shield
         {
             return(6);
         }
         return(7);
     }
     return(0);
 }
Exemplo n.º 2
0
        private ClassIndex FindClassCat()
        {
            ClassIndex[] ClassTable = { ClassIndex.Misc,    ClassIndex.Marauder, ClassIndex.Ranger,
                                        ClassIndex.Duelist, ClassIndex.Witch,    ClassIndex.Templar,ClassIndex.Shadow, ClassIndex.Misc };
            if (FrameType == FrameTypeIndex.Gem || FrameType == FrameTypeIndex.Unique)
            {
                return(ClassIndex.Misc);
            }
            byte Dex = 0, Int = 0, Str = 0;

            foreach (ItemProperty p in ItemRequirements)
            {
                if (p.Name.StartsWith("Dex"))
                {
                    Dex = 2;
                }
                else if (p.Name.StartsWith("Str"))
                {
                    Str = 1;
                }
                else if (p.Name.StartsWith("Int"))
                {
                    Int = 4;
                }
            }
            ClassIndex ret = ClassTable[Int | Dex | Str];

            if (ret != ClassIndex.Misc)
            {
                return(ret);
            }


            foreach (ItemProperty p in ItemProperties)
            {
                if (p.Name == "Evasion Rating")
                {
                    Dex = 2;
                }
                else if (p.Name == "Armour")
                {
                    Str = 1;
                }
                else if (p.Name == "Energy Shield")
                {
                    Int = 4;
                }
            }
            ret = ClassTable[Int | Dex | Str];
            if (ret != ClassIndex.Misc)
            {
                return(ret);
            }

            //Quivers goes to rangers..
            if (TypeLine.EndsWith("Quiver"))
            {
                return(ClassIndex.Ranger);
            }

            if (ItemProperties.Count == 0)
            {
                return(ClassIndex.Misc);
            }
            if (ItemProperties[0].Name == "Bow")
            {
                return(ClassIndex.Ranger);
            }
            if (ItemProperties[0].Name == "Staff")
            {
                return(ClassIndex.Templar);
            }

            return(ClassIndex.Misc);
        }