This project has moved. For the latest updates, please go here.

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 val = id.GetValueInt(vk, 0);

			// Add buffs to the maxdamage, this is broken if the weapon is equipped/activated/buffed
			System.Collections.ObjectModel.ReadOnlyCollection Spells = id.Spells;
			foreach (uTank2.MySpell sp in Spells)
			{
				switch (vk)
				{
					case IntValueKey.MaxDamage:
						if (sp.Id == 4395) val += 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) val += 2; // Minor Blood Thirst
						if (sp.Id == 2586) val += 4; // Major Blood Thirst
						if (sp.Id == 4661) val += 7; // Epic Blood Thirst
						break;

					case IntValueKey.ArmorLevel:
						if (sp.Id == 2604) val += 20; // Minor Impenetrability
						if (sp.Id == 2592) val += 40; // Major Impenetrability
						if (sp.Id == 4667) val += 60; // Epic Impenetrability
						break;
				}
			}

			return val >= keyval;
		}

Last edited Dec 6, 2011 at 2:25 AM by Mag_nus, version 2