Пример #1
0
 public static Tinkering FindTinkering(int id, ItemSlot slot, Character character)
 {
     //&UT&
     // chance for Null
     if (null == AllTinkerings)
     {
         return(null);
     }
     return(AllTinkerings.Find(new Predicate <Tinkering>(delegate(Tinkering Tinkering) {
         return (Tinkering.Id == id) && (Tinkering.FitsInSlot(slot, character) ||
                                         (Tinkering.Slot == ItemSlot.TwoHand && slot == ItemSlot.OneHand));
     })) ?? AllTinkerings[0]);
 }
Пример #2
0
        public override bool Equals(object obj)
        {
            Tinkering temp = obj as Tinkering;

            if (temp != null)
            {
                return(Name.Equals(temp.Name) && Id == temp.Id && Slot == temp.Slot && Stats.Equals(temp.Stats));
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
 public static List <Tinkering> FindAllTinkerings(ItemSlot slot, Character character)
 {
     //List<ItemSlot> validSlots = new List<ItemSlot>();
     //if (slot != ItemSlot.MainHand)
     //    validSlots.Add(slot);
     //if (slot == ItemSlot.OffHand || slot == ItemSlot.MainHand || slot == ItemSlot.TwoHand)
     //    validSlots.Add(ItemSlot.OneHand);
     //if (slot == ItemSlot.MainHand)
     //    validSlots.Add(ItemSlot.TwoHand);
     return(AllTinkerings.FindAll(new Predicate <Tinkering>(
                                      delegate(Tinkering Tinkering)
     {
         return Tinkering.Slot == ItemSlot.None ||
         (slot == ItemSlot.None || Tinkering.FitsInSlot(slot, character));
     }
                                      )));
 }
Пример #4
0
 public static List <Tinkering> FindTinkerings(ItemSlot slot, Character[] characters, List <string> availableIds, CalculationsBase[] models)
 {
     return(AllTinkerings.FindAll(new Predicate <Tinkering>(
                                      delegate(Tinkering Tinkering)
     {
         bool isRelevant = false;
         for (int i = 0; i < models.Length; i++)
         {
             if (models[i].IsTinkeringRelevant(Tinkering, characters[i]) && (Tinkering.FitsInSlot(slot, characters[i]) || slot == ItemSlot.None))
             {
                 isRelevant = true;
                 break;
             }
         }
         return ((isRelevant || Tinkering.Slot == ItemSlot.None) &&
                 availableIds.Contains((-1 * (Tinkering.Id + ((int)AvailableItemIDModifiers.Tinkerings * (int)Tinkering.Slot))).ToString())) ||
         Tinkering.Id == 0;
     }
                                      )));
 }
Пример #5
0
        public ItemInstance GetItemInstance(Item item, int randomSuffixId, Enchant enchant, Reforging reforging, Tinkering tinkering, bool blacksmithingSocket)
        {
            if (item == null)
            {
                return(null);
            }
            Item gem1     = null;
            Item gem2     = null;
            Item gem3     = null;
            bool cog1used = false;

            switch (item.SocketColor1)
            {
            case ItemSlot.Meta: gem1 = MetaGem; break;

            case ItemSlot.Red: gem1 = RedGem; break;

            case ItemSlot.Yellow: gem1 = YellowGem; break;

            case ItemSlot.Blue: gem1 = BlueGem; break;

            case ItemSlot.Prismatic: gem1 = PrismaticGem; break;

            case ItemSlot.Cogwheel: gem1 = Cogwheel; cog1used = true; break;

            case ItemSlot.Hydraulic: gem1 = Hydraulic; break;

            case ItemSlot.None:
                if (blacksmithingSocket)
                {
                    gem1 = PrismaticGem;
                    blacksmithingSocket = false;
                }
                break;
            }
            switch (item.SocketColor2)
            {
            case ItemSlot.Meta: gem2 = MetaGem; break;

            case ItemSlot.Red: gem2 = RedGem; break;

            case ItemSlot.Yellow: gem2 = YellowGem; break;

            case ItemSlot.Blue: gem2 = BlueGem; break;

            case ItemSlot.Prismatic: gem2 = PrismaticGem; break;

            case ItemSlot.Cogwheel: if (cog1used)
                {
                    gem2 = Cogwheel2;
                }
                else
                {
                    gem2 = Cogwheel; cog1used = true;
                } break;

            case ItemSlot.Hydraulic: gem2 = Hydraulic; break;

            case ItemSlot.None:
                if (blacksmithingSocket)
                {
                    gem2 = PrismaticGem;
                    blacksmithingSocket = false;
                }
                break;
            }
            switch (item.SocketColor3)
            {
            case ItemSlot.Meta: gem3 = MetaGem; break;

            case ItemSlot.Red: gem3 = RedGem; break;

            case ItemSlot.Yellow: gem3 = YellowGem; break;

            case ItemSlot.Blue: gem3 = BlueGem; break;

            case ItemSlot.Prismatic: gem3 = PrismaticGem; break;

            case ItemSlot.Cogwheel: if (cog1used)
                {
                    gem3 = Cogwheel2;
                }
                else
                {
                    gem3 = Cogwheel; cog1used = true;
                } break;

            case ItemSlot.Hydraulic: gem3 = Hydraulic; break;

            case ItemSlot.None:
                if (blacksmithingSocket)
                {
                    gem3 = PrismaticGem;
                    blacksmithingSocket = false;
                }
                break;
            }
            return(new ItemInstance(item, randomSuffixId, gem1, gem2, gem3, enchant, reforging, tinkering));
        }
Пример #6
0
 public ItemInstance GetItemInstance(Item item, int randomSuffixId, Tinkering tinkering, bool blacksmithingSocket)
 {
     return(GetItemInstance(item, randomSuffixId, null, null, tinkering, blacksmithingSocket));
 }
Пример #7
0
        private static List <Tinkering> GetDefaultTinkerings()
        {
            List <Tinkering> defaultTinkerings = new List <Tinkering>();
            Tinkering        TinkeringTemp;

            // The All Important No Tinkering, works in all slots
            defaultTinkerings.Add(new Tinkering(0, "No Tinkering", ItemSlot.None, new Stats(), ""));

            // http://www.wowhead.com/spell=82177 [4180] Quickflip Deflection Plates    (Gloves):        1500 Armour       , 12s / 1min
            // http://www.wowhead.com/spell=82175 [4179] Synapse Springs                (Gloves):         480 Int          , 12s / 1min
            // http://www.wowhead.com/spell=82180 [4181] Tazik Shocker                  (Gloves):  4320- 5280 Nature Dmg   ,       2min
            // http://www.wowhead.com/spell=84427 [4188] Grounded Plasma Shield         (Waist ): 16200-19800 Absorb Shield,       5min
            // http://www.wowhead.com/spell=84425 Cardboard Assassin, not modelling this as its just a distracting target
            // http://www.wowhead.com/spell=84424 Invisibility Field, this is just an out of combat stealth
            // http://www.wowhead.com/spell=82200 Spinal Healing Injector, this is a healing pot, should be handled by Buffs in Rawr
            // http://www.wowhead.com/spell=82201 Z50 Mana Gulper, this is a mana pot, should be handled by Buffs in Rawr
            // http://www.wowhead.com/spell=55002 [3605] Flexweave Underlay, this is a slowfall

            #region Back
            //defaultTinkerings.Add(new Tinkering(3859, "Springy Arachnoweave", ItemSlot.Back, new Stats())); // No longer supplies any stats, only the parachute
            //defaultTinkerings.Add(new Tinkering(3605, "Flexweave Underlay", ItemSlot.Back, new Stats())); // No longer supplies any stats, only the parachute
            #endregion
            #region Gloves
            // Cataclysm
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(4180, "Quickflip Deflection Plates", ItemSlot.Hands, new Stats(), "trade_engineering"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                BonusArmor = 1500,
            }, 12, 60));
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(4179, "Synapse Springs", ItemSlot.Hands, new Stats(), "trade_engineering"));
            // Patch 4.0.6+ Synapse Springs now increase Agility, Strength, or Intellect (whichever is highest for the character).
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                HighestStat = 480,
            }, 10, 60));
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(4181, "Tazik Shocker", ItemSlot.Hands, new Stats(), "trade_engineering"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                NatureDamage = (4320 + 5280) / 2f,
            }, 0, 2 * 60));
            // WotLK
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(3860, "Reticulated Armor Webbing", ItemSlot.Hands, new Stats(), "trade_engineering"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                BonusArmor = 700f
            }, 14f, 60f));
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(3604, "Hyperspeed Accelerators", ItemSlot.Hands, new Stats(), "trade_engineering"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                HasteRating = 240f
            }, 12f, 60f));
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(3603, "Hand-Mounted Pyro Rocket", ItemSlot.Hands, new Stats(), "trade_engineering"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                FireDamage = 1837f,
            }, 0f, 45f));
            #endregion
            #region Waist
            // This effect has a proc that can make you 100% crittable for 10 sec
            // This should make it wholly undesirable to tanks
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(4188, "Grounded Plasma Shield", ItemSlot.Waist, new Stats(), "trade_engineering"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                DamageAbsorbed = (16200 + 19800) / 2f,
            }, 0, 5 * 60));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                CritChanceReduction = -100f,
            }, 10, 5 * 60, 0.10f));
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(3601, "Frag Belt", ItemSlot.Waist, new Stats(), "spell_fire_selfdestruct"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                FireDamage = 875
            }, 0, 6 * 60));
            defaultTinkerings.Add(TinkeringTemp = new Tinkering(4223, "Nitro Boosts", ItemSlot.Waist, new Stats(), "spell_fire_burningspeed"));
            TinkeringTemp.Stats.AddSpecialEffect(new SpecialEffect(Trigger.Use, new Stats()
            {
                MovementSpeed = 1.50f,
            }, 5f, 3 * 60f));
            #endregion

            return(defaultTinkerings);
        }
Пример #8
0
 public static List <Tinkering> FindTinkerings(ItemSlot slot, Character character, List <string> availableIds, CalculationsBase model)
 {
     return(AllTinkerings.FindAll(new Predicate <Tinkering>(
                                      delegate(Tinkering Tinkering)
     {
         return Tinkering.Id == 0 ||
         ((Tinkering.Slot == ItemSlot.None ||
           model.IsTinkeringRelevant(Tinkering, character) && (slot == ItemSlot.None || Tinkering.FitsInSlot(slot, character))) &&
          availableIds.Contains((-1 * (Tinkering.Id + ((int)AvailableItemIDModifiers.Tinkerings * (int)Tinkering.Slot))).ToString()));
     }
                                      )));
 }