击杀阵亡比

This commit is contained in:
2021-10-20 22:40:03 +02:00
parent 0863b2fd71
commit 2a96f8efac
3 changed files with 22 additions and 12 deletions

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
@@ -62,18 +61,21 @@ namespace AnotherReplayReader.ReplayFile
_data = new byte[] { 0x02, 0x1A, 0x00, 0x00, 0x00 };
}
List<float>? TryGetKillDeathRatio()
public float[]? TryGetKillDeathRatios()
{
if (_data.Length < 24)
{
return null;
}
var ratios = new List<float>();
var ratios = new float[6];
using var stream = new MemoryStream(_data, _data.Length - 24, 24);
using var reader = new BinaryReader(stream);
ratios.Add(reader.ReadSingle());
throw new NotImplementedException();
for (var i = 0; i < ratios.Length; ++i)
{
ratios[i] = reader.ReadSingle();
}
return ratios;
}
public void WriteTo(BinaryWriter writer)