public void GainExp(int val) { if (progress == null) { return; } float multiplier = 1 + (perk != null ? perk.GetExpGainMul() : 0); progress.GainExp((int)(val * multiplier)); }