public int GetMaxIntensity(Item item, ImbuingDefinition def) { if (item is BaseWeapon && def.Attribute is AosWeaponAttribute) { AosWeaponAttribute attr = (AosWeaponAttribute)def.Attribute; if (attr == AosWeaponAttribute.HitLeechMana || attr == AosWeaponAttribute.HitLeechHits) { return(Imbuing.GetPropRange(item, attr)[1]); } } return(def.MaxIntensity); }