SetStatCheck() public method

Changes effect to check a stat for a value.
public SetStatCheck ( UpgradeStat stat, UpgradeCheckType checkType, short value, UpgradeValueType valueType ) : void
stat UpgradeStat
checkType UpgradeCheckType
value short
valueType UpgradeValueType
return void
Exemplo n.º 1
0
		public void UpgradeEffectStatCheck()
		{
			var effect = new UpgradeEffect(UpgradeType.Suffix);
			effect.SetStatCheck(UpgradeStat.MP, UpgradeCheckType.LowerEqualThan, 500, UpgradeValueType.Percent);
			Assert.Equal((
				"01 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00" +
				"00 00 00 00  0A 00 00 00  00 00 00 00  07 00 00 00" +
				"02 01 F4 01"
				).Replace(" ", ""), ToHex(effect));

			Assert.Throws(typeof(ArgumentException), () => effect.SetStatCheck(UpgradeStat.MP, UpgradeCheckType.SkillRankGreaterThan, 500, UpgradeValueType.Percent));
		}