Beispiel #1
0
 // Token: 0x06000207 RID: 519 RVA: 0x00007439 File Offset: 0x00005639
 public static void Save(ref ByteBuffer buffer, StatEntry entry)
 {
     buffer.WriteByte((byte)entry.StatType);
     if (entry.ValueString != null)
     {
         buffer.WriteUTF(entry.ValueString);
         return;
     }
     buffer.WriteUInt32((uint)entry.ValueInt);
 }
Beispiel #2
0
 // Token: 0x06000208 RID: 520 RVA: 0x00007470 File Offset: 0x00005670
 public static int SizeOf(StatEntry entry)
 {
     if (entry.ValueString != null)
     {
         int result = 1;
         IOHelper.NextUTF(ref result, entry.ValueString);
         return(result);
     }
     return(5);
 }
Beispiel #3
0
        // Token: 0x06000206 RID: 518 RVA: 0x000073EC File Offset: 0x000055EC
        public static StatEntry Load(ref ByteBuffer buffer)
        {
            StatEntry result = default(StatEntry);

            result.StatType = (StatData)buffer.ReadByte();
            if (StatEntry.IsString(result.StatType))
            {
                result.ValueString = buffer.ReadUTF();
            }
            else
            {
                result.ValueInt = (int)buffer.ReadUInt32();
            }
            return(result);
        }