finished off helpers, added few more types (might not be used)

This commit is contained in:
CWX
2025-01-09 16:43:49 +00:00
parent 75355ef850
commit cc26e1468c
45 changed files with 2368 additions and 76 deletions
@@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Common;
public class MetricsTableData
{
[JsonPropertyName("Keys")]
public List<int>? Keys { get; set; }
[JsonPropertyName("NetProcessingBins")]
public List<int>? NetProcessingBins { get; set; }
[JsonPropertyName("RenderBins")]
public List<int>? RenderBins { get; set; }
[JsonPropertyName("GameUpdateBins")]
public List<int>? GameUpdateBins { get; set; }
[JsonPropertyName("MemoryMeasureInterval")]
public int? MemoryMeasureInterval { get; set; }
}
@@ -0,0 +1,57 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Health;
public class SyncHealthRequestData
{
[JsonPropertyName("Health")]
public List<BodyPartHealth>? Health { get; set; }
[JsonPropertyName("IsAlive")]
public bool? IsAlive { get; set; }
[JsonPropertyName("Hydration")]
public double? Hydration { get; set; }
[JsonPropertyName("Energy")]
public double? Energy { get; set; }
[JsonPropertyName("Temperature")]
public double? Temperature { get; set; }
}
public class BodyPartCollection
{
[JsonPropertyName("Head")]
public BodyPartHealth? Head { get; set; }
[JsonPropertyName("Chest")]
public BodyPartHealth? Chest { get; set; }
[JsonPropertyName("Stomach")]
public BodyPartHealth? Stomach { get; set; }
[JsonPropertyName("LeftArm")]
public BodyPartHealth? LeftArm { get; set; }
[JsonPropertyName("RightArm")]
public BodyPartHealth? RightArm { get; set; }
[JsonPropertyName("LeftLeg")]
public BodyPartHealth? LeftLeg { get; set; }
[JsonPropertyName("RightLeg")]
public BodyPartHealth? RightLeg { get; set; }
}
public class BodyPartHealth
{
[JsonPropertyName("Maximum")]
public int? Maximum { get; set; }
[JsonPropertyName("Current")]
public int? Current { get; set; }
[JsonPropertyName("Effects")]
public Dictionary<string, int>? Effects { get; set; }
}
@@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.InRaid;
public class InsuredItemsData
{
[JsonPropertyName("id")]
public string? Id { get; set; }
[JsonPropertyName("durability")]
public int? Durability { get; set; }
[JsonPropertyName("maxDurability")]
public int? MaxDurability { get; set; }
[JsonPropertyName("hits")]
public int? Hits { get; set; }
[JsonPropertyName("usedInQuest")]
public bool? UsedInQuest { get; set; }
}
@@ -0,0 +1,13 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.InRaid;
public class ItemDeliveryRequestData
{
[JsonPropertyName("items")]
public List<Item>? Items { get; set; }
[JsonPropertyName("traderId")]
public string? TraderId { get; set; }
}
@@ -0,0 +1,22 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.Inventory;
public class AddItemDirectRequest
{
/// <summary>
/// Item and child mods to add to player inventory
/// </summary>
[JsonPropertyName("itemWithModsToAdd")]
public List<Item>? ItemWithModsToAdd { get; set; }
[JsonPropertyName("foundInRaid")]
public bool? FoundInRaid { get; set; }
[JsonPropertyName("callback")]
public Action<int>? Callback { get; set; }
[JsonPropertyName("useSortingTable")]
public bool? UseSortingTable { get; set; }
}
@@ -0,0 +1,25 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Inventory;
public class AddItemRequestData
{
// Trader id
[JsonPropertyName("tid")]
public string? TraderId { get; set; }
[JsonPropertyName("items")]
public List<ItemToAdd>? Items { get; set; }
}
public class ItemToAdd
{
[JsonPropertyName("count")]
public int? Count { get; set; }
[JsonPropertyName("sptIsPreset")]
public bool? IsPreset { get; set; }
[JsonPropertyName("item_id")]
public string? ItemId { get; set; }
}
@@ -0,0 +1,23 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.Inventory;
public class AddItemTempObject
{
[JsonPropertyName("itemRef")]
public Item? ItemReference { get; set; }
[JsonPropertyName("count")]
public int? ItemCount { get; set; }
[JsonPropertyName("isPreset")]
public bool? IsPresetItem { get; set; }
[JsonPropertyName("location")]
public ItemLocation? ItemLocation { get; set; }
// Container item will be placed in - stash or sorting table
[JsonPropertyName("containerId")]
public string? ContainerIdentifier { get; set; }
}
@@ -0,0 +1,22 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.Inventory;
public class AddItemsDirectRequest
{
/// Item and child mods to add to player inventory
[JsonPropertyName("itemsWithModsToAdd")]
public List<List<Item>>? ItemsWithModsToAdd { get; set; }
[JsonPropertyName("foundInRaid")]
public bool? FoundInRaid { get; set; }
/// Runs after EACH item with children is added
[JsonPropertyName("callback")]
public Action<int>? Callback { get; set; }
/// Should sorting table be used when no space found in stash
[JsonPropertyName("useSortingTable")]
public bool? UseSortingTable { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Inventory;
public class InventoryAddRequestData : InventoryBaseActionRequestData
{
[JsonPropertyName("Action")]
public string? Action { get; set; } = "Add";
[JsonPropertyName("item")]
public string? Item { get; set; }
[JsonPropertyName("container")]
public Container? Container { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Inventory;
public class InventoryUnbindRequestData : InventoryBaseActionRequestData
{
[JsonPropertyName("Action")]
public string? Action { get; set; } = "Unbind";
[JsonPropertyName("item")]
public string? Item { get; set; }
[JsonPropertyName("index")]
public int? Index { get; set; }
}
+39
View File
@@ -0,0 +1,39 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Launcher;
public class MiniProfile
{
[JsonPropertyName("username")]
public string? Username { get; set; }
[JsonPropertyName("nickname")]
public string? Nickname { get; set; }
[JsonPropertyName("side")]
public string? Side { get; set; }
[JsonPropertyName("currlvl")]
public int? CurrentLevel { get; set; }
[JsonPropertyName("currexp")]
public int? CurrentExperience { get; set; }
[JsonPropertyName("prevexp")]
public int? PreviousExperience { get; set; }
[JsonPropertyName("nextlvl")]
public int? NextLevel { get; set; }
[JsonPropertyName("maxlvl")]
public int? MaxLevel { get; set; }
[JsonPropertyName("edition")]
public string? Edition { get; set; }
[JsonPropertyName("profileId")]
public string? ProfileId { get; set; }
[JsonPropertyName("sptData")]
public Profile.Spt? SptData { get; set; }
}
@@ -0,0 +1,13 @@
using System.Text.Json.Serialization;
using Core.Models.Spt.Services;
namespace Core.Models.Eft.Location;
public class AirdropLootResult
{
[JsonPropertyName("dropType")]
public string? DropType { get; set; }
[JsonPropertyName("loot")]
public List<LootItem>? Loot { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Location;
public class GetLocationRequestData
{
[JsonPropertyName("crc")]
public int? Crc { get; set; }
[JsonPropertyName("locationId")]
public string? LocationId { get; set; }
[JsonPropertyName("variantId")]
public int? VariantId { get; set; }
}
@@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Match;
public class EndOfflineRaidRequestData
{
[JsonPropertyName("crc")]
public int? Crc { get; set; }
[JsonPropertyName("exitStatus")]
public string? ExitStatus { get; set; }
[JsonPropertyName("exitName")]
public string? ExitName { get; set; }
[JsonPropertyName("raidSeconds")]
public int? RaidSeconds { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Match;
public class ProfileStatusRequest
{
[JsonPropertyName("groupId")]
public int? GroupId { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Match;
public class UpdatePingRequestData
{
[JsonPropertyName("servers")]
public List<object>? servers { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class MessageContentRagfair
{
[JsonPropertyName("offerId")]
public string? OfferId { get; set; }
[JsonPropertyName("count")]
public int? Count { get; set; }
[JsonPropertyName("handbookId")]
public string? HandbookId { get; set; }
}
-12
View File
@@ -548,15 +548,3 @@ public class Insurance
[JsonPropertyName("items")]
public List<Item>? Items { get; set; }
}
public class MessageContentRagfair
{
[JsonPropertyName("offerId")]
public string? OfferId { get; set; }
[JsonPropertyName("count")]
public int? Count { get; set; }
[JsonPropertyName("handbookId")]
public string? HandbookId { get; set; }
}