wip
This commit is contained in:
102
Apm/DataRow.cs
102
Apm/DataRow.cs
@@ -42,51 +42,73 @@ namespace AnotherReplayReader.Apm
|
||||
out int apmRowIndex)
|
||||
{
|
||||
// these commands should appear in this order by default
|
||||
var orderedCommands = new List<byte>();
|
||||
var orderedCommands = new List<int>();
|
||||
orderedCommands.AddRange(
|
||||
[
|
||||
0xF5,
|
||||
0xF8,
|
||||
0x2A,
|
||||
0xFA,
|
||||
0xFB,
|
||||
0x07,
|
||||
0x08,
|
||||
0x05,
|
||||
0x06,
|
||||
0x09,
|
||||
0x00,
|
||||
0x0A,
|
||||
0x03,
|
||||
0x04,
|
||||
0x28,
|
||||
0x29,
|
||||
0x0D,
|
||||
0x0E,
|
||||
0x15,
|
||||
0x14,
|
||||
0x36,
|
||||
0x16,
|
||||
0x2C,
|
||||
0x1A,
|
||||
0x4E,
|
||||
0xFE,
|
||||
0xFF,
|
||||
0x32,
|
||||
0x2E,
|
||||
0x2F,
|
||||
0x4B,
|
||||
0x4C,
|
||||
0x02,
|
||||
0x0C,
|
||||
0x10,
|
||||
0x1F5, // 选择
|
||||
0x1F6,
|
||||
0x1F8,
|
||||
0x1F9,
|
||||
0x22A,
|
||||
0x1FA, // 编队
|
||||
0x1FB,
|
||||
0x1FC,
|
||||
|
||||
0x207, // 生产/建造
|
||||
0x208,
|
||||
0x205,
|
||||
0x206,
|
||||
0x209, // 摆放
|
||||
|
||||
0x20A, // 出售
|
||||
|
||||
0x203, // 升级
|
||||
0x204,
|
||||
|
||||
0x20D, // 右键攻击
|
||||
0x20E, // 强A
|
||||
0x20F, // 强A
|
||||
0x215, // 移动攻击
|
||||
0x214, // 移动
|
||||
0x236, // 倒车
|
||||
0x216, // 碾压
|
||||
0x22C, // 队形
|
||||
0x21A, // 停止
|
||||
0x21B, // 散开
|
||||
|
||||
0x24E, // 选择协议
|
||||
|
||||
0x1FE, // 释放特殊能力
|
||||
0x1FF,
|
||||
0x200,
|
||||
0x201,
|
||||
0x232,
|
||||
|
||||
0x22E, // 姿态
|
||||
0x22F, // 计划模式
|
||||
|
||||
0x228, // 维修
|
||||
0x229,
|
||||
|
||||
0x202, // 集结点
|
||||
0x210, // 进驻建筑
|
||||
0x20C, // 从建筑中撤出
|
||||
|
||||
0x248, // 采矿交矿
|
||||
0x212,
|
||||
|
||||
0x24B, // 信标
|
||||
0x24C,
|
||||
0x24D,
|
||||
|
||||
0x1, // 退出地图
|
||||
]);
|
||||
orderedCommands.AddRange(RA3Commands.AutoCommands);
|
||||
orderedCommands.AddRange(RA3Commands.UnknownCommands);
|
||||
|
||||
var dataList = new List<DataRow>
|
||||
{
|
||||
new("ID", plotter.Players.Select(x => x.PlayerName))
|
||||
new("ID", plotter.PlayersArray.Select(x => x.PlayerName))
|
||||
};
|
||||
var isPartial = begin > TimeSpan.Zero || end <= plotter.ReplayLength;
|
||||
if (isPartial)
|
||||
@@ -105,14 +127,14 @@ namespace AnotherReplayReader.Apm
|
||||
? "变身天眼帝国,或双手离开键盘"
|
||||
: "可能已离开房间";
|
||||
}
|
||||
dataList.Add(new("存活状态(推测)", plotter.Players.Select(GetStatus)));
|
||||
dataList.Add(new("存活状态(推测)", plotter.PlayersArray.Select(GetStatus)));
|
||||
}
|
||||
apmRowIndex = dataList.Count;
|
||||
// kill-death ratio
|
||||
if (plotter.Replay.Footer?.TryGetKillDeathRatios() is { } kdRatios)
|
||||
{
|
||||
var texts = kdRatios
|
||||
.Take(plotter.Players.Length)
|
||||
.Take(plotter.PlayersArray.Length)
|
||||
.Select(x => $"{x:0.##}");
|
||||
dataList.Add(new("击杀阵亡比(存疑)", texts));
|
||||
}
|
||||
@@ -123,7 +145,7 @@ namespace AnotherReplayReader.Apm
|
||||
{
|
||||
var counts = commandCounts.TryGetValue(command, out var stored)
|
||||
? stored
|
||||
: new int[plotter.Players.Length];
|
||||
: new int[plotter.PlayersArray.Length];
|
||||
if (!isPartial || counts.Any(x => x > 0))
|
||||
{
|
||||
dataList.Add(new(RA3Commands.GetCommandName(command),
|
||||
|
||||
Reference in New Issue
Block a user