This is the code for the back end of the requirement. This may help you understand how the item is tested against the requirement.


        public override bool Match(GameItemInfo id)
        {
            int maxdamage = id.GetValueInt(IntValueKey.MaxDamage, 0);
            int elementalDmgBonus = id.GetValueInt(IntValueKey.ElementalDmgBonus, 0);
            double damageBonus = id.GetValueDouble(DoubleValueKey.DamageBonus, 1);

            // Add buffs to the maxdamage, this is broken if the weapon is equipped/activated/buffed
            System.Collections.ObjectModel.ReadOnlyCollection<uTank2.MySpell> Spells = id.Spells;
            foreach (uTank2.MySpell sp in Spells)
            {
                if (sp.Id == 4395) maxdamage += 2; // Incantation of Blood Drinker, this spell on the item adds 2 more points of damage over a user casted 8
                if (sp.Id == 2598) maxdamage += 2; // Minor Blood Thirst
                if (sp.Id == 2586) maxdamage += 4; // Major Blood Thirst
                if (sp.Id == 4661) maxdamage += 7; // Epic Blood Thirst
            }

            return (maxdamage + (((damageBonus - 1) * 100) / 3) + elementalDmgBonus) >= keyval;
        }

Last edited Dec 8, 2011 at 11:56 PM by Mag_nus, version 1

Comments

No comments yet.