Exemplo n.º 1
0
        // Token: 0x06001CE0 RID: 7392 RVA: 0x000868D8 File Offset: 0x00084AD8
        public void PushDelta(ref StatField deltaField)
        {
            StatDataType dataType = this.dataType;

            if (dataType == StatDataType.ULong)
            {
                this.PushStatValue(deltaField.ulongValue);
                return;
            }
            if (dataType != StatDataType.Double)
            {
                throw new ArgumentOutOfRangeException();
            }
            this.PushStatValue(deltaField.doubleValue);
        }
Exemplo n.º 2
0
        // Token: 0x06001CF7 RID: 7415 RVA: 0x0007C070 File Offset: 0x0007A270
        public static void ToXml(XElement element, StatSheet statSheet)
        {
            element.RemoveAll();
            XElement xelement = new XElement("fields");

            element.Add(xelement);
            StatField[] array = statSheet.fields;
            for (int i = 0; i < array.Length; i++)
            {
                ref StatField ptr = ref array[i];
                if (!ptr.IsDefault())
                {
                    xelement.Add(new XElement(ptr.name, ptr.ToString()));
                }
            }
Exemplo n.º 3
0
        public static StatField GetDelta(ref StatField newerValue, ref StatField olderValue)
        {
            StatField result = new StatField
            {
                statDef = newerValue.statDef
            };
            StatDataType dataType = newerValue.dataType;

            if (dataType != StatDataType.ULong)
            {
                if (dataType == StatDataType.Double)
                {
                    switch (newerValue.recordType)
                    {
                    case StatRecordType.Sum:
                        result.doubleValue = newerValue.doubleValue - olderValue.doubleValue;
                        break;

                    case StatRecordType.Max:
                        result.doubleValue = Math.Max(newerValue.doubleValue, olderValue.doubleValue);
                        break;

                    case StatRecordType.Newest:
                        result.doubleValue = newerValue.doubleValue;
                        break;
                    }
                }
            }
            else
            {
                switch (newerValue.recordType)
                {
                case StatRecordType.Sum:
                    result.ulongValue = newerValue.ulongValue - olderValue.ulongValue;
                    break;

                case StatRecordType.Max:
                    result.ulongValue = Math.Max(newerValue.ulongValue, olderValue.ulongValue);
                    break;

                case StatRecordType.Newest:
                    result.ulongValue = newerValue.ulongValue;
                    break;
                }
            }
            return(result);
        }
        // Token: 0x06001C99 RID: 7321 RVA: 0x0007A630 File Offset: 0x00078830
        public static string DistanceMarathonsDisplayValueFormatter(ref StatField statField)
        {
            StatDataType statDataType = statField.dataType;
            double       num;

            if (statDataType != StatDataType.ULong)
            {
                if (statDataType != StatDataType.Double)
                {
                    throw new ArgumentOutOfRangeException();
                }
                num = statField.GetDoubleValue();
            }
            else
            {
                num = statField.GetULongValue();
            }
            return(string.Format(Language.GetString("STAT_VALUE_MARATHONS_FORMAT"), num * 2.3699E-05));
        }
        // Token: 0x06001C98 RID: 7320 RVA: 0x0007A5D0 File Offset: 0x000787D0
        public static string TimeMMSSDisplayValueFormatter(ref StatField statField)
        {
            StatDataType statDataType = statField.dataType;
            ulong        num;

            if (statDataType != StatDataType.ULong)
            {
                if (statDataType != StatDataType.Double)
                {
                    throw new ArgumentOutOfRangeException();
                }
                num = (ulong)statField.GetDoubleValue();
            }
            else
            {
                num = statField.GetULongValue();
            }
            ulong num2 = num / 60UL;
            ulong num3 = num - num2 * 60UL;

            return(string.Format("{0:00}:{1:00}", num2, num3));
        }
 // Token: 0x06001C97 RID: 7319 RVA: 0x0007A5C8 File Offset: 0x000787C8
 public static string DefaultDisplayValueFormatter(ref StatField statField)
 {
     return(statField.ToLocalNumeric());
 }
Exemplo n.º 7
0
 // Token: 0x06001CB7 RID: 7351 RVA: 0x00085F74 File Offset: 0x00084174
 public static string DefaultDisplayValueFormatter(ref StatField statField)
 {
     return(statField.ToString());
 }