private bool SetIntStat(string name, int value) { IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); RailResult railResult = (RailResult)1; if (myPlayerStats != null) { railResult = myPlayerStats.SetStatValue(name, value); } return(railResult == 0); }
public override void UpdateFloatStat(string name, float value) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) IRailPlayerStats myPlayerStats = GetMyPlayerStats(); if (myPlayerStats != null) { double num = 0.0; if ((int)myPlayerStats.GetStatValue(name, out num) == 0 && (float)num < value) { myPlayerStats.SetStatValue(name, (double)value); } } }
public override void UpdateIntStat(string name, int value) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) IRailPlayerStats myPlayerStats = GetMyPlayerStats(); if (myPlayerStats != null) { int num = 0; if ((int)myPlayerStats.GetStatValue(name, out num) == 0 && num < value) { myPlayerStats.SetStatValue(name, value); } } }
public override void UpdateFloatStat(string name, float value) { IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); if (myPlayerStats == null) { return; } double num = 0.0; if (myPlayerStats.GetStatValue(name, out num) != null || num >= (double)value) { return; } myPlayerStats.SetStatValue(name, (double)value); }
public override void UpdateIntStat(string name, int value) { IRailPlayerStats myPlayerStats = this.GetMyPlayerStats(); if (myPlayerStats == null) { return; } int num = 0; if (myPlayerStats.GetStatValue(name, out num) != null || num >= value) { return; } myPlayerStats.SetStatValue(name, value); }
private bool SetIntStat(string name, int value) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 IRailPlayerStats myPlayerStats = GetMyPlayerStats(); RailResult val = (RailResult)1; if (myPlayerStats != null) { val = myPlayerStats.SetStatValue(name, value); } return((int)val == 0); }