From 6f7bc6d071ad38f2daeb20814375bf2e7867245c Mon Sep 17 00:00:00 2001 From: CWX Date: Thu, 23 Jan 2025 21:21:11 +0000 Subject: [PATCH] Fix typing --- Libraries/Core/Models/Eft/Common/PmcData.cs | 6 ++++-- .../Core/Models/Eft/Common/Tables/BotBase.cs | 15 +++++++++------ .../Models/Eft/Match/EndLocalRaidRequestData.cs | 1 + Libraries/Core/Routers/EventOutputHolder.cs | 2 +- Libraries/Core/Utils/JsonUtil.cs | 1 + 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Libraries/Core/Models/Eft/Common/PmcData.cs b/Libraries/Core/Models/Eft/Common/PmcData.cs index 49d53a62..cdd33dc2 100644 --- a/Libraries/Core/Models/Eft/Common/PmcData.cs +++ b/Libraries/Core/Models/Eft/Common/PmcData.cs @@ -9,12 +9,14 @@ public record PmcData : BotBase [JsonPropertyName("Prestige")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] public Dictionary? Prestige { get; set; } + + public Dictionary? CheckedMagazines { get; set; } + + public object CheckedChambers { get; set; } } public record PostRaidPmcData : BotBase { - [JsonPropertyName("Stats")] - public PostRaidStats? Stats { get; set; } } public record PostRaidStats diff --git a/Libraries/Core/Models/Eft/Common/Tables/BotBase.cs b/Libraries/Core/Models/Eft/Common/Tables/BotBase.cs index c1ee57b6..5b6b571e 100644 --- a/Libraries/Core/Models/Eft/Common/Tables/BotBase.cs +++ b/Libraries/Core/Models/Eft/Common/Tables/BotBase.cs @@ -163,9 +163,7 @@ public record Info [JsonConverter(typeof(StringToNumberFactoryConverter))] public int? RegistrationDate { get; set; } public string? GameVersion { get; set; } - [JsonConverter(typeof(JsonStringEnumConverter))] public MemberCategory? MemberCategory { get; set; } - [JsonConverter(typeof(JsonStringEnumConverter))] public MemberCategory? SelectedMemberCategory { get; set; } [JsonPropertyName("lockedMoveCommands")] public bool? LockedMoveCommands { get; set; } @@ -403,6 +401,8 @@ public record Victim public double? Distance { get; set; } public double? Level { get; set; } public string? Weapon { get; set; } + public double? PrestigeLevel { get; set; } + public string? ColliderType { get; set; } public string? Role { get; set; } public string? Location { get; set; } } @@ -425,6 +425,7 @@ public record CounterKeyValue public record Aggressor { + public double? PrestigeLevel { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.Never)] public string? AccountId { get; set; } @@ -438,6 +439,8 @@ public record Aggressor public string? HeadSegment { get; set; } public string? WeaponName { get; set; } public string? Category { get; set; } + public string? ColliderType { get; set; } + public string? Role { get; set; } } public record DamageHistory @@ -576,17 +579,17 @@ public record Production // use this instead of productive and scavcase public List? Products { get; set; } /** Seconds passed of production */ - public int? Progress { get; set; } + public double? Progress { get; set; } /** Is craft in some state of being worked on by client (crafting/ready to pick up) */ [JsonPropertyName("inProgress")] public bool? InProgress { get; set; } - public string? StartTimestamp { get; set; } - public int? SkipTime { get; set; } + public long? StartTimestamp { get; set; } + public double? SkipTime { get; set; } /** Seconds needed to fully craft */ - public int? ProductionTime { get; set; } + public double? ProductionTime { get; set; } public List? GivenItemsInStart { get; set; } public bool? Interrupted { get; set; } diff --git a/Libraries/Core/Models/Eft/Match/EndLocalRaidRequestData.cs b/Libraries/Core/Models/Eft/Match/EndLocalRaidRequestData.cs index 4c994054..09c9b788 100644 --- a/Libraries/Core/Models/Eft/Match/EndLocalRaidRequestData.cs +++ b/Libraries/Core/Models/Eft/Match/EndLocalRaidRequestData.cs @@ -42,6 +42,7 @@ public record EndRaidResult /// "Survived/Transit" etc /// [JsonPropertyName("result")] + [JsonConverter(typeof(JsonStringEnumConverter))] public ExitStatus? Result { get; set; } [JsonPropertyName("killerId")] diff --git a/Libraries/Core/Routers/EventOutputHolder.cs b/Libraries/Core/Routers/EventOutputHolder.cs index a7372180..eed8de19 100644 --- a/Libraries/Core/Routers/EventOutputHolder.cs +++ b/Libraries/Core/Routers/EventOutputHolder.cs @@ -122,7 +122,7 @@ public class EventOutputHolder // Water collector / Bitcoin etc production.Value.SptIsComplete = false; production.Value.Progress = 0; - production.Value.StartTimestamp = _timeUtil.GetTimeStamp().ToString(); + production.Value.StartTimestamp = _timeUtil.GetTimeStamp(); } else if (!production.Value.InProgress ?? false) { diff --git a/Libraries/Core/Utils/JsonUtil.cs b/Libraries/Core/Utils/JsonUtil.cs index 901fc5bd..fb80c0df 100644 --- a/Libraries/Core/Utils/JsonUtil.cs +++ b/Libraries/Core/Utils/JsonUtil.cs @@ -33,6 +33,7 @@ public class JsonUtil new EftEnumConverter(), new EftEnumConverter(), new EftEnumConverter(), + new EftEnumConverter(), new BaseInteractionRequestDataConverter() } };