/// <summary> /// Returns a modifier based on its type, or a useless modifier is there is none /// </summary> private Modifier GetModifier(Item item, PlayerStatModifier modifierType) { foreach (var modifier in item.equipmentModifiers) { if (modifier.statToModify == modifierType) { return(modifier); } } return(new Modifier(modifierType, StatModifierType.linear, 0)); }
public Modifier(PlayerStatModifier statToModify, StatModifierType modifierType, float value) { this.statToModify = statToModify; this.modifierType = modifierType; this.value = value; }