Merge pull request #19 from CJ-SPT/main

Tonights work
This commit is contained in:
clodanSPT
2025-01-08 13:35:23 +00:00
committed by GitHub
66 changed files with 5009 additions and 4345 deletions
@@ -5,7 +5,7 @@ namespace Core.Models.Eft.Bot;
public class GenerateBotsRequestData
{
[JsonPropertyName("conditions")]
public List<Condition> Conditions { get; set; }
public List<Condition>? Conditions { get; set; }
}
public class Condition
@@ -14,11 +14,11 @@ public class Condition
/// e.g. assault/pmcBot/bossKilla
/// </summary>
[JsonPropertyName("Role")]
public string Role { get; set; }
public string? Role { get; set; }
[JsonPropertyName("Limit")]
public int Limit { get; set; }
[JsonPropertyName("Difficulty")]
public string Difficulty { get; set; }
public string? Difficulty { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Bot;
public class RandomisedBotLevelResult
{
[JsonPropertyName("level")]
public int Level { get; set; }
public int? Level { get; set; }
[JsonPropertyName("exp")]
public int Exp { get; set; }
public int? Exp { get; set; }
}
+6 -6
View File
@@ -6,20 +6,20 @@ namespace Core.Models.Eft.Builds;
public class SetMagazineRequest
{
[JsonPropertyName("Id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("Name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("Caliber")]
public string Caliber { get; set; }
public string? Caliber { get; set; }
[JsonPropertyName("Items")]
public List<MagazineTemplateAmmoItem> Items { get; set; }
public List<MagazineTemplateAmmoItem>? Items { get; set; }
[JsonPropertyName("TopCount")]
public int TopCount { get; set; }
public int? TopCount { get; set; }
[JsonPropertyName("BottomCount")]
public int BottomCount { get; set; }
public int? BottomCount { get; set; }
}
File diff suppressed because it is too large Load Diff
+130 -130
View File
@@ -5,190 +5,190 @@ namespace Core.Models.Eft.Common;
public class Location
{
/** Map meta-data */
[JsonPropertyName("base")]
public LocationBase Base { get; set; }
/** Loose loot positions and item weights */
[JsonPropertyName("looseLoot")]
public LooseLoot LooseLoot { get; set; }
/** Static loot item weights */
[JsonPropertyName("staticLoot")]
public Dictionary<string, StaticLootDetails> StaticLoot { get; set; }
/** Static container positions and item weights */
[JsonPropertyName("staticContainers")]
public StaticContainerDetails StaticContainers { get; set; }
[JsonPropertyName("staticAmmo")]
public Dictionary<string, StaticAmmoDetails[]> StaticAmmo { get; set; }
/** All possible static containers on map + their assign groupings */
[JsonPropertyName("statics")]
public StaticContainer StaticContainer { get; set; }
/** All possible map extracts */
[JsonPropertyName("allExtracts")]
public Exit[] AllExtracts { get; set; }
// TODO: talk to chomp about this type!
[JsonPropertyName("statics")]
public Dictionary<string, object> Statics { get; set; }
/** Map meta-data */
[JsonPropertyName("base")]
public LocationBase? Base { get; set; }
/** Loose loot positions and item weights */
[JsonPropertyName("looseLoot")]
public LooseLoot? LooseLoot { get; set; }
/** Static loot item weights */
[JsonPropertyName("staticLoot")]
public Dictionary<string, StaticLootDetails>? StaticLoot { get; set; }
/** Static container positions and item weights */
[JsonPropertyName("staticContainers")]
public StaticContainerDetails? StaticContainers { get; set; }
[JsonPropertyName("staticAmmo")]
public Dictionary<string, StaticAmmoDetails[]> StaticAmmo { get; set; }
/** All possible static containers on map + their assign groupings */
[JsonPropertyName("statics")]
public StaticContainer? StaticContainer { get; set; }
/** All possible map extracts */
[JsonPropertyName("allExtracts")]
public Exit[] AllExtracts { get; set; }
// TODO: talk to chomp about this type!
[JsonPropertyName("statics")]
public Dictionary<string, object>? Statics { get; set; }
}
public class StaticContainer
{
[JsonPropertyName("containersGroups")]
public Dictionary<string, ContainerMinMax> ContainersGroups { get; set; }
[JsonPropertyName("containers")]
public Dictionary<string, ContainerData> Containers { get; set; }
[JsonPropertyName("containersGroups")]
public Dictionary<string, ContainerMinMax>? ContainersGroups { get; set; }
[JsonPropertyName("containers")]
public Dictionary<string, ContainerData>? Containers { get; set; }
}
public class ContainerMinMax
{
[JsonPropertyName("minContainers")]
public int MinContainers { get; set; }
[JsonPropertyName("maxContainers")]
public int MaxContainers { get; set; }
[JsonPropertyName("current")]
public int? Current { get; set; }
[JsonPropertyName("chosenCount")]
public int? ChosenCount { get; set; }
[JsonPropertyName("minContainers")]
public int? MinContainers { get; set; }
[JsonPropertyName("maxContainers")]
public int? MaxContainers { get; set; }
[JsonPropertyName("current")]
public int? Current { get; set; }
[JsonPropertyName("chosenCount")]
public int? ChosenCount { get; set; }
}
public class ContainerData
{
[JsonPropertyName("groupId")]
public string GroupId { get; set; }
[JsonPropertyName("groupId")]
public string? GroupId { get; set; }
}
public class StaticLootDetails
{
[JsonPropertyName("itemcountDistribution")]
public ItemCountDistribution[] ItemCountDistribution { get; set; }
[JsonPropertyName("itemDistribution")]
public ItemDistribution[] ItemDistribution { get; set; }
[JsonPropertyName("itemcountDistribution")]
public ItemCountDistribution[] ItemCountDistribution { get; set; }
[JsonPropertyName("itemDistribution")]
public ItemDistribution[] ItemDistribution { get; set; }
}
public class ItemCountDistribution
{
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("relativeProbability")]
public float RelativeProbability { get; set; }
[JsonPropertyName("count")]
public int? Count { get; set; }
[JsonPropertyName("relativeProbability")]
public float? RelativeProbability { get; set; }
}
public class ItemDistribution
{
[JsonPropertyName("tpl")]
public string Tpl { get; set; }
[JsonPropertyName("relativeProbability")]
public float RelativeProbability { get; set; }
[JsonPropertyName("tpl")]
public string? Tpl { get; set; }
[JsonPropertyName("relativeProbability")]
public float? RelativeProbability { get; set; }
}
public class StaticPropsBase
{
[JsonPropertyName("Id")]
public string Id { get; set; }
[JsonPropertyName("IsContainer")]
public bool IsContainer { get; set; }
[JsonPropertyName("useGravity")]
public bool UseGravity { get; set; }
[JsonPropertyName("randomRotation")]
public bool RandomRotation { get; set; }
[JsonPropertyName("Position")]
public XYZ Position { get; set; }
[JsonPropertyName("Rotation")]
public XYZ Rotation { get; set; }
[JsonPropertyName("IsGroupPosition")]
public bool IsGroupPosition { get; set; }
[JsonPropertyName("IsAlwaysSpawn")]
public bool IsAlwaysSpawn { get; set; }
[JsonPropertyName("GroupPositions")]
public GroupPosition[] GroupPositions { get; set; }
[JsonPropertyName("Root")]
public string Root { get; set; }
[JsonPropertyName("Items")]
public Item[] Items { get; set; }
[JsonPropertyName("Id")]
public string? Id { get; set; }
[JsonPropertyName("IsContainer")]
public bool? IsContainer { get; set; }
[JsonPropertyName("useGravity")]
public bool? UseGravity { get; set; }
[JsonPropertyName("randomRotation")]
public bool? RandomRotation { get; set; }
[JsonPropertyName("Position")]
public XYZ? Position { get; set; }
[JsonPropertyName("Rotation")]
public XYZ? Rotation { get; set; }
[JsonPropertyName("IsGroupPosition")]
public bool? IsGroupPosition { get; set; }
[JsonPropertyName("IsAlwaysSpawn")]
public bool? IsAlwaysSpawn { get; set; }
[JsonPropertyName("GroupPositions")]
public GroupPosition[] GroupPositions { get; set; }
[JsonPropertyName("Root")]
public string? Root { get; set; }
[JsonPropertyName("Items")]
public Item[] Items { get; set; }
}
public class StaticWeaponProps : StaticPropsBase
{
[JsonPropertyName("Items")]
public Item[] Items { get; set; }
[JsonPropertyName("Items")]
public Item[] Items { get; set; }
}
public class StaticContainerDetails
{
[JsonPropertyName("staticWeapons")]
public StaticWeaponProps[] StaticWeapons { get; set; }
[JsonPropertyName("staticContainers")]
public StaticContainerData[] StaticContainers { get; set; }
[JsonPropertyName("staticForced")]
public StaticForcedProps[] StaticForced { get; set; }
[JsonPropertyName("staticWeapons")]
public StaticWeaponProps[] StaticWeapons { get; set; }
[JsonPropertyName("staticContainers")]
public StaticContainerData[] StaticContainers { get; set; }
[JsonPropertyName("staticForced")]
public StaticForcedProps[] StaticForced { get; set; }
}
public class StaticContainerData
{
[JsonPropertyName("probability")]
public float Probability { get; set; }
[JsonPropertyName("template")]
public StaticContainerProps Template { get; set; }
[JsonPropertyName("probability")]
public float? Probability { get; set; }
[JsonPropertyName("template")]
public StaticContainerProps? Template { get; set; }
}
public class StaticAmmoDetails
{
[JsonPropertyName("tpl")]
public string Tpl { get; set; }
[JsonPropertyName("relativeProbability")]
public float RelativeProbability { get; set; }
[JsonPropertyName("tpl")]
public string? Tpl { get; set; }
[JsonPropertyName("relativeProbability")]
public float? RelativeProbability { get; set; }
}
public class StaticForcedProps
{
[JsonPropertyName("containerId")]
public string ContainerId { get; set; }
[JsonPropertyName("itemTpl")]
public string ItemTpl { get; set; }
[JsonPropertyName("containerId")]
public string? ContainerId { get; set; }
[JsonPropertyName("itemTpl")]
public string? ItemTpl { get; set; }
}
public class StaticContainerProps : StaticPropsBase
{
[JsonPropertyName("Items")]
public StaticItem[] Items { get; set; }
[JsonPropertyName("Items")]
public StaticItem[] Items { get; set; }
}
public class StaticItem
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("_tpl")]
public string Tpl { get; set; }
[JsonPropertyName("upd")]
public Upd Upd { get; set; }
[JsonPropertyName("_id")]
public string? Id { get; set; }
[JsonPropertyName("_tpl")]
public string? Tpl { get; set; }
[JsonPropertyName("upd")]
public Upd? Upd { get; set; }
}
File diff suppressed because it is too large Load Diff
+82 -82
View File
@@ -5,114 +5,114 @@ namespace Core.Models.Eft.Common;
public class LooseLoot
{
[JsonPropertyName("spawnpointCount")]
public SpawnpointCount SpawnpointCount { get; set; }
[JsonPropertyName("spawnpointsForced")]
public List<SpawnpointsForced> SpawnpointsForced { get; set; }
[JsonPropertyName("spawnpoints")]
public List<Spawnpoint> Spawnpoints { get; set; }
[JsonPropertyName("spawnpointCount")]
public SpawnpointCount? SpawnpointCount { get; set; }
[JsonPropertyName("spawnpointsForced")]
public List<SpawnpointsForced>? SpawnpointsForced { get; set; }
[JsonPropertyName("spawnpoints")]
public List<Spawnpoint>? Spawnpoints { get; set; }
}
public class SpawnpointCount
{
[JsonPropertyName("mean")]
public double Mean { get; set; }
[JsonPropertyName("std")]
public double Std { get; set; }
[JsonPropertyName("mean")]
public double? Mean { get; set; }
[JsonPropertyName("std")]
public double? Std { get; set; }
}
public class SpawnpointsForced
{
[JsonPropertyName("locationId")]
public string LocationId { get; set; }
[JsonPropertyName("probability")]
public double Probability { get; set; }
[JsonPropertyName("template")]
public SpawnpointTemplate Template { get; set; }
[JsonPropertyName("locationId")]
public string? LocationId { get; set; }
[JsonPropertyName("probability")]
public double? Probability { get; set; }
[JsonPropertyName("template")]
public SpawnpointTemplate? Template { get; set; }
}
public class SpawnpointTemplate
{
[JsonPropertyName("Id")]
public string Id { get; set; }
[JsonPropertyName("IsContainer")]
public bool IsContainer { get; set; }
[JsonPropertyName("useGravity")]
public bool UseGravity { get; set; }
[JsonPropertyName("randomRotation")]
public bool RandomRotation { get; set; }
[JsonPropertyName("Position")]
public XYZ Position { get; set; }
[JsonPropertyName("Rotation")]
public XYZ Rotation { get; set; }
[JsonPropertyName("IsAlwaysSpawn")]
public bool IsAlwaysSpawn { get; set; }
[JsonPropertyName("IsGroupPosition")]
public bool IsGroupPosition { get; set; }
[JsonPropertyName("GroupPositions")]
public List<GroupPosition> GroupPositions { get; set; }
[JsonPropertyName("Root")]
public string Root { get; set; }
[JsonPropertyName("Items")]
public List<Item> Items { get; set; }
[JsonPropertyName("Id")]
public string? Id { get; set; }
[JsonPropertyName("IsContainer")]
public bool? IsContainer { get; set; }
[JsonPropertyName("useGravity")]
public bool? UseGravity { get; set; }
[JsonPropertyName("randomRotation")]
public bool? RandomRotation { get; set; }
[JsonPropertyName("Position")]
public XYZ? Position { get; set; }
[JsonPropertyName("Rotation")]
public XYZ? Rotation { get; set; }
[JsonPropertyName("IsAlwaysSpawn")]
public bool? IsAlwaysSpawn { get; set; }
[JsonPropertyName("IsGroupPosition")]
public bool? IsGroupPosition { get; set; }
[JsonPropertyName("GroupPositions")]
public List<GroupPosition>? GroupPositions { get; set; }
[JsonPropertyName("Root")]
public string? Root { get; set; }
[JsonPropertyName("Items")]
public List<Item>? Items { get; set; }
}
public class GroupPosition
{
[JsonPropertyName("Name")]
public string Name { get; set; }
[JsonPropertyName("Weight")]
public double Weight { get; set; }
[JsonPropertyName("Position")]
public XYZ Position { get; set; }
[JsonPropertyName("Rotation")]
public XYZ Rotation { get; set; }
[JsonPropertyName("Name")]
public string? Name { get; set; }
[JsonPropertyName("Weight")]
public double? Weight { get; set; }
[JsonPropertyName("Position")]
public XYZ? Position { get; set; }
[JsonPropertyName("Rotation")]
public XYZ? Rotation { get; set; }
}
public class Spawnpoint
{
[JsonPropertyName("locationId")]
public string LocationId { get; set; }
[JsonPropertyName("probability")]
public double Probability { get; set; }
[JsonPropertyName("template")]
public SpawnpointTemplate Template { get; set; }
[JsonPropertyName("itemDistribution")]
public List<LooseLootItemDistribution> ItemDistribution { get; set; }
[JsonPropertyName("locationId")]
public string? LocationId { get; set; }
[JsonPropertyName("probability")]
public double? Probability { get; set; }
[JsonPropertyName("template")]
public SpawnpointTemplate? Template { get; set; }
[JsonPropertyName("itemDistribution")]
public List<LooseLootItemDistribution>? ItemDistribution { get; set; }
}
public class LooseLootItemDistribution
{
[JsonPropertyName("composedKey")]
public ComposedKey ComposedKey { get; set; }
[JsonPropertyName("relativeProbability")]
public double RelativeProbability { get; set; }
[JsonPropertyName("composedKey")]
public ComposedKey? ComposedKey { get; set; }
[JsonPropertyName("relativeProbability")]
public double? RelativeProbability { get; set; }
}
public class ComposedKey
{
[JsonPropertyName("key")]
public string Key { get; set; }
[JsonPropertyName("key")]
public string? Key { get; set; }
}
+7 -8
View File
@@ -5,21 +5,20 @@ namespace Core.Models.Eft.Common;
public class PmcData : BotBase
{
}
public class PostRaidPmcData : BotBase
{
[JsonPropertyName("Stats")]
public PostRaidStats Stats { get; set; }
[JsonPropertyName("Stats")]
public PostRaidStats? Stats { get; set; }
}
public class PostRaidStats
{
[JsonPropertyName("Eft")]
public EftStats Eft { get; set; }
[JsonPropertyName("Eft")]
public EftStats? Eft { get; set; }
/** Only found in profile we get from client post raid */
[JsonPropertyName("Arena")]
public EftStats Arena { get; set; }
/** Only found in profile we get from client post raid */
[JsonPropertyName("Arena")]
public EftStats? Arena { get; set; }
}
@@ -5,20 +5,20 @@ namespace Core.Models.Eft.Common.Request;
public class BaseInteractionRequestData
{
[JsonPropertyName("Action")]
public virtual string Action { get; set; }
public virtual string? Action { get; set; }
[JsonPropertyName("fromOwner")]
public OwnerInfo FromOwner { get; set; }
public OwnerInfo? FromOwner { get; set; }
[JsonPropertyName("toOwner")]
public OwnerInfo ToOwner { get; set; }
public OwnerInfo? ToOwner { get; set; }
}
public class OwnerInfo
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
public string? Type { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Common.Request;
public class UIDRequestData
{
[JsonPropertyName("uid")]
public string Uid { get; set; }
public string? Uid { get; set; }
}
+15 -15
View File
@@ -5,47 +5,47 @@ namespace Core.Models.Eft.Common.Tables;
public class Achievement
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("imageUrl")]
public string ImageUrl { get; set; }
public string? ImageUrl { get; set; }
[JsonPropertyName("assetPath")]
public string AssetPath { get; set; }
public string? AssetPath { get; set; }
[JsonPropertyName("rewards")]
public QuestRewards Rewards { get; set; }
public QuestRewards? Rewards { get; set; }
[JsonPropertyName("conditions")]
public QuestConditionTypes Conditions { get; set; }
public QuestConditionTypes? Conditions { get; set; }
[JsonPropertyName("instantComplete")]
public bool InstantComplete { get; set; }
public bool? InstantComplete { get; set; }
[JsonPropertyName("showNotificationsInGame")]
public bool ShowNotificationsInGame { get; set; }
public bool? ShowNotificationsInGame { get; set; }
[JsonPropertyName("showProgress")]
public bool ShowProgress { get; set; }
public bool? ShowProgress { get; set; }
[JsonPropertyName("prefab")]
public string Prefab { get; set; }
public string? Prefab { get; set; }
[JsonPropertyName("rarity")]
public string Rarity { get; set; }
public string? Rarity { get; set; }
[JsonPropertyName("hidden")]
public bool Hidden { get; set; }
public bool? Hidden { get; set; }
[JsonPropertyName("showConditions")]
public bool ShowConditions { get; set; }
public bool? ShowConditions { get; set; }
[JsonPropertyName("progressBarEnabled")]
public bool ProgressBarEnabled { get; set; }
public bool? ProgressBarEnabled { get; set; }
[JsonPropertyName("side")]
public string Side { get; set; }
public string? Side { get; set; }
[JsonPropertyName("index")]
public int Index { get; set; }
public int? Index { get; set; }
}
+28 -28
View File
@@ -9,91 +9,91 @@ namespace Core.Models.Eft.Common.Tables;
public class BotBase
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("aid")]
public double Aid { get; set; }
public double? Aid { get; set; }
/** SPT property - use to store player id - TODO - move to AID ( account id as guid of choice) */
[JsonPropertyName("sessionId")]
public string SessionId { get; set; }
public string? SessionId { get; set; }
[JsonPropertyName("savage")]
public string? Savage { get; set; }
[JsonPropertyName("karmaValue")]
public double KarmaValue { get; set; }
public double? KarmaValue { get; set; }
[JsonPropertyName("Info")]
public Info Info { get; set; }
public Info? Info { get; set; }
[JsonPropertyName("Customization")]
public Customization Customization { get; set; }
public Customization? Customization { get; set; }
[JsonPropertyName("Health")]
public BotBaseHealth Health { get; set; }
public BotBaseHealth? Health { get; set; }
[JsonPropertyName("Inventory")]
public BotBaseInventory Inventory { get; set; }
public BotBaseInventory? Inventory { get; set; }
[JsonPropertyName("Skills")]
public Skills Skills { get; set; }
public Skills? Skills { get; set; }
[JsonPropertyName("Stats")]
public Stats Stats { get; set; }
public Stats? Stats { get; set; }
[JsonPropertyName("Encyclopedia")]
public Dictionary<string, bool> Encyclopedia { get; set; }
public Dictionary<string, bool>? Encyclopedia { get; set; }
[JsonPropertyName("TaskConditionCounters")]
public Dictionary<string, TaskConditionCounter> TaskConditionCounters { get; set; }
public Dictionary<string, TaskConditionCounter>? TaskConditionCounters { get; set; }
[JsonPropertyName("InsuredItems")]
public List<InsuredItem> InsuredItems { get; set; }
public List<InsuredItem>? InsuredItems { get; set; }
[JsonPropertyName("Hideout")]
public Hideout Hideout { get; set; }
public Hideout? Hideout { get; set; }
[JsonPropertyName("Quests")]
public List<Quests> Quests { get; set; }
public List<Quests>? Quests { get; set; }
[JsonPropertyName("TradersInfo")]
public Dictionary<string, TraderInfo> TradersInfo { get; set; }
public Dictionary<string, TraderInfo>? TradersInfo { get; set; }
[JsonPropertyName("UnlockedInfo")]
public UnlockedInfo UnlockedInfo { get; set; }
public UnlockedInfo? UnlockedInfo { get; set; }
[JsonPropertyName("RagfairInfo")]
public RagfairInfo RagfairInfo { get; set; }
public RagfairInfo? RagfairInfo { get; set; }
/** Achievement id and timestamp */
[JsonPropertyName("Achievements")]
public Dictionary<string, int> Achievements { get; set; }
public Dictionary<string, int>? Achievements { get; set; }
[JsonPropertyName("RepeatableQuests")]
public List<PmcDataRepeatableQuest> RepeatableQuests { get; set; }
public List<PmcDataRepeatableQuest>? RepeatableQuests { get; set; }
[JsonPropertyName("Bonuses")]
public List<Bonus> Bonuses { get; set; }
public List<Bonus>? Bonuses { get; set; }
[JsonPropertyName("Notes")]
public Notes Notes { get; set; }
public Notes? Notes { get; set; }
[JsonPropertyName("CarExtractCounts")]
public Dictionary<string, int> CarExtractCounts { get; set; }
public Dictionary<string, int>? CarExtractCounts { get; set; }
[JsonPropertyName("CoopExtractCounts")]
public Dictionary<string, int> CoopExtractCounts { get; set; }
public Dictionary<string, int>? CoopExtractCounts { get; set; }
[JsonPropertyName("SurvivorClass")]
public SurvivorClass SurvivorClass { get; set; }
public SurvivorClass? SurvivorClass { get; set; }
[JsonPropertyName("WishList")]
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
public Dictionary<string, int> WishList { get; set; }
public Dictionary<string, int>? WishList { get; set; }
[JsonPropertyName("moneyTransferLimitData")]
public MoneyTransferLimits MoneyTransferLimitData { get; set; }
public MoneyTransferLimits? MoneyTransferLimitData { get; set; }
/** SPT specific property used during bot generation in raid */
[JsonPropertyName("sptIsPmc")]
@@ -105,7 +105,7 @@ public class MoneyTransferLimits
// Resets every 24 hours in live
/** TODO: Implement */
[JsonPropertyName("nextResetTime")]
public double NextResetTime { get; set; }
public double? NextResetTime { get; set; }
[JsonPropertyName("remainingLimit")]
public double RemainingLimit { get; set; }
+26 -27
View File
@@ -2,83 +2,83 @@
namespace Core.Models.Eft.Common.Tables;
/*
public class BotCore
{
[JsonPropertyName("SAVAGE_KILL_DIST")]
public double SavageKillDistance { get; set; }
public double? SavageKillDistance { get; set; }
[JsonPropertyName("SOUND_DOOR_BREACH_METERS")]
public double SoundDoorBreachMeters { get; set; }
public double? SoundDoorBreachMeters { get; set; }
[JsonPropertyName("SOUND_DOOR_OPEN_METERS")]
public double SoundDoorOpenMeters { get; set; }
public double? SoundDoorOpenMeters { get; set; }
[JsonPropertyName("STEP_NOISE_DELTA")]
public double StepNoiseDelta { get; set; }
public double? StepNoiseDelta { get; set; }
[JsonPropertyName("JUMP_NOISE_DELTA")]
public double JumpNoiseDelta { get; set; }
public double? JumpNoiseDelta { get; set; }
[JsonPropertyName("GUNSHOT_SPREAD")]
public double GunshotSpread { get; set; }
public double? GunshotSpread { get; set; }
[JsonPropertyName("GUNSHOT_SPREAD_SILENCE")]
public double GunshotSpreadSilence { get; set; }
public double? GunshotSpreadSilence { get; set; }
[JsonPropertyName("BASE_WALK_SPEREAD2")]
public double BaseWalkSpread2 { get; set; }
public double? BaseWalkSpread2 { get; set; }
[JsonPropertyName("MOVE_SPEED_COEF_MAX")]
public double MoveSpeedCoefficientMax { get; set; }
public double? MoveSpeedCoefficientMax { get; set; }
[JsonPropertyName("SPEED_SERV_SOUND_COEF_A")]
public double SpeedServiceSoundCoefficientA { get; set; }
public double? SpeedServiceSoundCoefficientA { get; set; }
[JsonPropertyName("SPEED_SERV_SOUND_COEF_B")]
public double SpeedServiceSoundCoefficientB { get; set; }
public double? SpeedServiceSoundCoefficientB { get; set; }
[JsonPropertyName("G")]
public double Gravity { get; set; }
public double? Gravity { get; set; }
[JsonPropertyName("STAY_COEF")]
public double StayCoefficient { get; set; }
public double? StayCoefficient { get; set; }
[JsonPropertyName("SIT_COEF")]
public double SitCoefficient { get; set; }
public double? SitCoefficient { get; set; }
[JsonPropertyName("LAY_COEF")]
public double LayCoefficient { get; set; }
public double? LayCoefficient { get; set; }
[JsonPropertyName("MAX_ITERATIONS")]
public double MaxIterations { get; set; }
public double? MaxIterations { get; set; }
[JsonPropertyName("START_DIST_TO_COV")]
public double StartDistanceToCover { get; set; }
public double? StartDistanceToCover { get; set; }
[JsonPropertyName("MAX_DIST_TO_COV")]
public double MaxDistanceToCover { get; set; }
public double? MaxDistanceToCover { get; set; }
[JsonPropertyName("STAY_HEIGHT")]
public double StayHeight { get; set; }
public double? StayHeight { get; set; }
[JsonPropertyName("CLOSE_POINTS")]
public double ClosePoints { get; set; }
public double? ClosePoints { get; set; }
[JsonPropertyName("COUNT_TURNS")]
public double CountTurns { get; set; }
public double? CountTurns { get; set; }
[JsonPropertyName("SIMPLE_POINT_LIFE_TIME_SEC")]
public double SimplePointLifetimeSeconds { get; set; }
public double? SimplePointLifetimeSeconds { get; set; }
[JsonPropertyName("DANGER_POINT_LIFE_TIME_SEC")]
public double DangerPointLifetimeSeconds { get; set; }
public double? DangerPointLifetimeSeconds { get; set; }
[JsonPropertyName("DANGER_POWER")]
public double DangerPower { get; set; }
public double? DangerPower { get; set; }
[JsonPropertyName("COVER_DIST_CLOSE")]
public double CoverDistanceClose { get; set; }
public double? CoverDistanceClose { get; set; }
[JsonPropertyName("GOOD_DIST_TO_POINT")]
public double GoodDistanceToPoint { get; set; }
@@ -398,4 +398,3 @@ public class BotCore
[JsonPropertyName("AXE_MAN_KILLS_END")]
public double AxeManKillsEnd { get; set; }
}
*/
+105 -105
View File
@@ -7,115 +7,115 @@ namespace Core.Models.Eft.Common.Tables;
public class BotType
{
[JsonPropertyName("appearance")]
public Appearance BotAppearance { get; set; }
public Appearance? BotAppearance { get; set; }
[JsonPropertyName("chances")]
public Chances BotChances { get; set; }
public Chances? BotChances { get; set; }
[JsonPropertyName("difficulty")]
public Difficulties BotDifficulty { get; set; }
public Difficulties? BotDifficulty { get; set; }
[JsonPropertyName("experience")]
public Experience BotExperience { get; set; }
public Experience? BotExperience { get; set; }
[JsonPropertyName("firstName")]
public List<string> FirstNames { get; set; }
public List<string>? FirstNames { get; set; }
[JsonPropertyName("generation")]
public Generation BotGeneration { get; set; }
public Generation? BotGeneration { get; set; }
[JsonPropertyName("health")]
public BotTypeHealth BotHealth { get; set; }
public BotTypeHealth? BotHealth { get; set; }
[JsonPropertyName("inventory")]
public BotTypeInventory BotInventory { get; set; }
public BotTypeInventory? BotInventory { get; set; }
[JsonPropertyName("lastName")]
public List<string> LastNames { get; set; }
public List<string>? LastNames { get; set; }
[JsonPropertyName("skills")]
public Skills BotSkills { get; set; }
public Skills? BotSkills { get; set; }
}
public class Appearance
{
[JsonPropertyName("body")]
public Dictionary<string, int> Body { get; set; }
public Dictionary<string, int>? Body { get; set; }
[JsonPropertyName("feet")]
public Dictionary<string, int> Feet { get; set; }
public Dictionary<string, int>? Feet { get; set; }
[JsonPropertyName("hands")]
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
public Dictionary<string, int> Hands { get; set; }
public Dictionary<string, int>? Hands { get; set; }
[JsonPropertyName("head")]
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
public Dictionary<string, int> Head { get; set; }
public Dictionary<string, int>? Head { get; set; }
[JsonPropertyName("voice")]
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
public Dictionary<string, int> Voice { get; set; }
public Dictionary<string, int>? Voice { get; set; }
}
public class Chances
{
[JsonPropertyName("equipment")]
public EquipmentChances EquipmentChances { get; set; }
public EquipmentChances? EquipmentChances { get; set; }
[JsonPropertyName("weaponMods")]
public Dictionary<string, double> WeaponModsChances { get; set; }
public Dictionary<string, double>? WeaponModsChances { get; set; }
[JsonPropertyName("equipmentMods")]
public Dictionary<string, double> EquipmentModsChances { get; set; }
public Dictionary<string, double>? EquipmentModsChances { get; set; }
[JsonPropertyName("mods")]
public Dictionary<string, double> Mods { get; set; }
public Dictionary<string, double>? Mods { get; set; }
}
public class EquipmentChances
{
[JsonPropertyName("ArmBand")]
public int ArmBand { get; set; }
public int? ArmBand { get; set; }
[JsonPropertyName("ArmorVest")]
public int ArmorVest { get; set; }
public int? ArmorVest { get; set; }
[JsonPropertyName("Backpack")]
public int Backpack { get; set; }
public int? Backpack { get; set; }
[JsonPropertyName("Earpiece")]
public int Earpiece { get; set; }
public int? Earpiece { get; set; }
[JsonPropertyName("Eyewear")]
public int Eyewear { get; set; }
public int? Eyewear { get; set; }
[JsonPropertyName("FaceCover")]
public int FaceCover { get; set; }
public int? FaceCover { get; set; }
[JsonPropertyName("FirstPrimaryWeapon")]
public int FirstPrimaryWeapon { get; set; }
public int? FirstPrimaryWeapon { get; set; }
[JsonPropertyName("Headwear")]
public int Headwear { get; set; }
public int? Headwear { get; set; }
[JsonPropertyName("Holster")]
public int Holster { get; set; }
public int? Holster { get; set; }
[JsonPropertyName("Pockets")]
public int Pockets { get; set; }
public int? Pockets { get; set; }
[JsonPropertyName("Scabbard")]
public int Scabbard { get; set; }
public int? Scabbard { get; set; }
[JsonPropertyName("SecondPrimaryWeapon")]
public int SecondPrimaryWeapon { get; set; }
public int? SecondPrimaryWeapon { get; set; }
[JsonPropertyName("SecuredContainer")]
public int SecuredContainer { get; set; }
public int? SecuredContainer { get; set; }
[JsonPropertyName("TacticalVest")]
public int TacticalVest { get; set; }
public int? TacticalVest { get; set; }
}
/* class removed in favor of Dictionary<string, double>
used to be used in:
@@ -285,167 +285,167 @@ public class ModsChances
public class Difficulties
{
[JsonPropertyName("easy")]
public DifficultyCategories Easy { get; set; }
public DifficultyCategories? Easy { get; set; }
[JsonPropertyName("normal")]
public DifficultyCategories Normal { get; set; }
public DifficultyCategories? Normal { get; set; }
[JsonPropertyName("hard")]
public DifficultyCategories Hard { get; set; }
public DifficultyCategories? Hard { get; set; }
[JsonPropertyName("impossible")]
public DifficultyCategories Impossible { get; set; }
public DifficultyCategories? Impossible { get; set; }
}
public class DifficultyCategories
{
public Dictionary<string, object> Aiming { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Boss { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Change { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Core { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Cover { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Grenade { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Hearing { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Lay { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Look { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Mind { get; set; } // TODO: string | number | boolean | string[]
public Dictionary<string, object> Move { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Patrol { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Scattering { get; set; } // TODO: string | number | boolean
public Dictionary<string, object> Shoot { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Aiming { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Boss { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Change { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Core { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Cover { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Grenade { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Hearing { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Lay { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Look { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Mind { get; set; } // TODO: string | number | boolean | string[]
public Dictionary<string, object>? Move { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Patrol { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Scattering { get; set; } // TODO: string | number | boolean
public Dictionary<string, object>? Shoot { get; set; } // TODO: string | number | boolean
}
public class Experience
{
/** key = bot difficulty */
[JsonPropertyName("aggressorBonus")]
public Dictionary<string, double> AggressorBonus { get; set; }
public Dictionary<string, double>? AggressorBonus { get; set; }
[JsonPropertyName("level")]
public MinMax Level { get; set; }
public MinMax? Level { get; set; }
/** key = bot difficulty */
[JsonPropertyName("reward")]
public Dictionary<string, MinMax> Reward { get; set; }
public Dictionary<string, MinMax>? Reward { get; set; }
/** key = bot difficulty */
[JsonPropertyName("standingForKill")]
public Dictionary<string, double> StandingForKill { get; set; }
public Dictionary<string, double>? StandingForKill { get; set; }
[JsonPropertyName("useSimpleAnimator")]
public bool UseSimpleAnimator { get; set; }
public bool? UseSimpleAnimator { get; set; }
}
public class Generation
{
[JsonPropertyName("items")]
public GenerationWeightingItems Items { get; set; }
public GenerationWeightingItems? Items { get; set; }
}
public class GenerationWeightingItems
{
[JsonPropertyName("grenades")]
public GenerationData Grenades { get; set; }
public GenerationData? Grenades { get; set; }
[JsonPropertyName("healing")]
public GenerationData Healing { get; set; }
public GenerationData? Healing { get; set; }
[JsonPropertyName("drugs")]
public GenerationData Drugs { get; set; }
public GenerationData? Drugs { get; set; }
[JsonPropertyName("food")]
public GenerationData Food { get; set; }
public GenerationData? Food { get; set; }
[JsonPropertyName("drink")]
public GenerationData Drink { get; set; }
public GenerationData? Drink { get; set; }
[JsonPropertyName("currency")]
public GenerationData Currency { get; set; }
public GenerationData? Currency { get; set; }
[JsonPropertyName("stims")]
public GenerationData Stims { get; set; }
public GenerationData? Stims { get; set; }
[JsonPropertyName("backpackLoot")]
public GenerationData BackpackLoot { get; set; }
public GenerationData? BackpackLoot { get; set; }
[JsonPropertyName("pocketLoot")]
public GenerationData PocketLoot { get; set; }
public GenerationData? PocketLoot { get; set; }
[JsonPropertyName("vestLoot")]
public GenerationData VestLoot { get; set; }
public GenerationData? VestLoot { get; set; }
[JsonPropertyName("magazines")]
public GenerationData Magazines { get; set; }
public GenerationData? Magazines { get; set; }
[JsonPropertyName("specialItems")]
public GenerationData SpecialItems { get; set; }
public GenerationData? SpecialItems { get; set; }
}
public class GenerationData
{
/** key: number of items, value: weighting */
[JsonPropertyName("weights")]
public Dictionary<string, double> Weights { get; set; }
public Dictionary<string, double>? Weights { get; set; }
/** Array of item tpls */
[JsonPropertyName("whitelist")]
[JsonConverter(typeof(ArrayToObjectFactoryConverter))]
public Dictionary<string, double> Whitelist { get; set; }
public Dictionary<string, double>? Whitelist { get; set; }
}
public class BotTypeHealth
{
public List<BodyPart> BodyParts { get; set; }
public MinMax Energy { get; set; }
public MinMax Hydration { get; set; }
public MinMax Temperature { get; set; }
public List<BodyPart>? BodyParts { get; set; }
public MinMax? Energy { get; set; }
public MinMax? Hydration { get; set; }
public MinMax? Temperature { get; set; }
}
public class BodyPart
{
public MinMax Chest { get; set; }
public MinMax Head { get; set; }
public MinMax LeftArm { get; set; }
public MinMax LeftLeg { get; set; }
public MinMax RightArm { get; set; }
public MinMax RightLeg { get; set; }
public MinMax Stomach { get; set; }
public MinMax? Chest { get; set; }
public MinMax? Head { get; set; }
public MinMax? LeftArm { get; set; }
public MinMax? LeftLeg { get; set; }
public MinMax? RightArm { get; set; }
public MinMax? RightLeg { get; set; }
public MinMax? Stomach { get; set; }
}
public class BotTypeInventory
{
[JsonPropertyName("equipment")]
public Equipment Equipment { get; set; }
public Equipment? Equipment { get; set; }
public GlobalAmmo Ammo { get; set; }
public GlobalAmmo? Ammo { get; set; }
[JsonPropertyName("items")]
public ItemPools Items { get; set; }
public ItemPools? Items { get; set; }
[JsonPropertyName("mods")]
public GlobalMods Mods { get; set; }
public GlobalMods? Mods { get; set; }
}
public class Equipment
{
public Dictionary<string, double> ArmBand { get; set; }
public Dictionary<string, double> ArmorVest { get; set; }
public Dictionary<string, double> Backpack { get; set; }
public Dictionary<string, double> Earpiece { get; set; }
public Dictionary<string, double> Eyewear { get; set; }
public Dictionary<string, double> FaceCover { get; set; }
public Dictionary<string, double> FirstPrimaryWeapon { get; set; }
public Dictionary<string, double> Headwear { get; set; }
public Dictionary<string, double> Holster { get; set; }
public Dictionary<string, double> Pockets { get; set; }
public Dictionary<string, double> Scabbard { get; set; }
public Dictionary<string, double> SecondPrimaryWeapon { get; set; }
public Dictionary<string, double> SecuredContainer { get; set; }
public Dictionary<string, double> TacticalVest { get; set; }
public Dictionary<string, double>? ArmBand { get; set; }
public Dictionary<string, double>? ArmorVest { get; set; }
public Dictionary<string, double>? Backpack { get; set; }
public Dictionary<string, double>? Earpiece { get; set; }
public Dictionary<string, double>? Eyewear { get; set; }
public Dictionary<string, double>? FaceCover { get; set; }
public Dictionary<string, double>? FirstPrimaryWeapon { get; set; }
public Dictionary<string, double>? Headwear { get; set; }
public Dictionary<string, double>? Holster { get; set; }
public Dictionary<string, double>? Pockets { get; set; }
public Dictionary<string, double>? Scabbard { get; set; }
public Dictionary<string, double>? SecondPrimaryWeapon { get; set; }
public Dictionary<string, double>? SecuredContainer { get; set; }
public Dictionary<string, double>? TacticalVest { get; set; }
}
public class ItemPools
{
public Dictionary<string, double> Backpack { get; set; }
public Dictionary<string, double> Pockets { get; set; }
public Dictionary<string, double> SecuredContainer { get; set; }
public Dictionary<string, double> SpecialLoot { get; set; }
public Dictionary<string, double> TacticalVest { get; set; }
public Dictionary<string, double>? Backpack { get; set; }
public Dictionary<string, double>? Pockets { get; set; }
public Dictionary<string, double>? SecuredContainer { get; set; }
public Dictionary<string, double>? SpecialLoot { get; set; }
public Dictionary<string, double>? TacticalVest { get; set; }
}
@@ -5,11 +5,11 @@ namespace Core.Models.Eft.Common.Tables;
public class CustomisationStorage
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("source")]
public string Source { get; set; }
public string? Source { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
public string? Type { get; set; }
}
@@ -5,20 +5,20 @@ using System.Text.Json.Serialization;
public class CustomizationItem
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("_name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("_parent")]
public string Parent { get; set; }
public string? Parent { get; set; }
[JsonPropertyName("_type")]
public string Type { get; set; }
public string? Type { get; set; }
[JsonPropertyName("_props")]
public Props Properties { get; set; }
public Props? Properties { get; set; }
[JsonPropertyName("_proto")]
public string Proto { get; set; }
public string? Proto { get; set; }
}
@@ -5,38 +5,38 @@ namespace Core.Models.Eft.Common.Tables;
public class HandbookBase
{
[JsonPropertyName("Categories")]
public List<HandbookCategory> Categories { get; set; }
public List<HandbookCategory>? Categories { get; set; }
[JsonPropertyName("Items")]
public List<HandbookItem> Items { get; set; }
public List<HandbookItem>? Items { get; set; }
}
public class HandbookCategory
{
[JsonPropertyName("Id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("ParentId")]
public string? ParentId { get; set; }
[JsonPropertyName("Icon")]
public string Icon { get; set; }
public string? Icon { get; set; }
[JsonPropertyName("Color")]
public string Color { get; set; }
public string? Color { get; set; }
[JsonPropertyName("Order")]
public string Order { get; set; }
public string? Order { get; set; }
}
public class HandbookItem
{
[JsonPropertyName("Id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("ParentId")]
public string ParentId { get; set; }
public string? ParentId { get; set; }
[JsonPropertyName("Price")]
public decimal Price { get; set; }
public decimal? Price { get; set; }
}
+44 -44
View File
@@ -6,9 +6,9 @@ namespace Core.Models.Eft.Common.Tables;
public class Item
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("_tpl")]
public string Template { get; set; }
public string? Template { get; set; }
[JsonPropertyName("parentId")]
public string? ParentId { get; set; }
[JsonPropertyName("slotId")]
@@ -21,9 +21,9 @@ public class Item
public class ItemLocation
{
public float X { get; set; }
public float Y { get; set; }
public object R { get; set; } // TODO: Can be string or number
public float? X { get; set; }
public float? Y { get; set; }
public object? R { get; set; } // TODO: Can be string or number
public bool? IsSearched { get; set; }
/** SPT property? */
public object? Rotation { get; set; } // TODO: Can be string or boolean
@@ -71,13 +71,13 @@ public enum PinLockState {
public class UpdBuff
{
[JsonPropertyName("Rarity")]
public string Rarity { get; set; }
public string? Rarity { get; set; }
[JsonPropertyName("BuffType")]
public string BuffType { get; set; }
public string? BuffType { get; set; }
[JsonPropertyName("Value")]
public int Value { get; set; }
public int? Value { get; set; }
[JsonPropertyName("ThresholdDurability")]
public int? ThresholdDurability { get; set; }
@@ -86,164 +86,164 @@ public class UpdBuff
public class UpdTogglable
{
[JsonPropertyName("On")]
public bool On { get; set; }
public bool? On { get; set; }
}
public class UpdMap
{
[JsonPropertyName("Markers")]
public List<MapMarker> Markers { get; set; }
public List<MapMarker>? Markers { get; set; }
}
public class MapMarker
{
[JsonPropertyName("X")]
public int X { get; set; }
public int? X { get; set; }
[JsonPropertyName("Y")]
public int Y { get; set; }
public int? Y { get; set; }
}
public class UpdTag
{
[JsonPropertyName("Color")]
public int Color { get; set; }
public int? Color { get; set; }
[JsonPropertyName("Name")]
public string Name { get; set; }
public string? Name { get; set; }
}
public class UpdFaceShield
{
[JsonPropertyName("Hits")]
public int Hits { get; set; }
public int? Hits { get; set; }
}
public class UpdRepairable
{
[JsonPropertyName("Durability")]
public int Durability { get; set; }
public int? Durability { get; set; }
[JsonPropertyName("MaxDurability")]
public int MaxDurability { get; set; }
public int? MaxDurability { get; set; }
}
public class UpdRecodableComponent
{
[JsonPropertyName("IsEncoded")]
public bool IsEncoded { get; set; }
public bool? IsEncoded { get; set; }
}
public class UpdMedKit
{
[JsonPropertyName("HpResource")]
public int HpResource { get; set; }
public int? HpResource { get; set; }
}
public class UpdSight
{
[JsonPropertyName("ScopesCurrentCalibPointIndexes")]
public List<int> ScopesCurrentCalibPointIndexes { get; set; }
public List<int>? ScopesCurrentCalibPointIndexes { get; set; }
[JsonPropertyName("ScopesSelectedModes")]
public List<int> ScopesSelectedModes { get; set; }
public List<int>? ScopesSelectedModes { get; set; }
[JsonPropertyName("SelectedScope")]
public int SelectedScope { get; set; }
public int? SelectedScope { get; set; }
}
public class UpdFoldable
{
[JsonPropertyName("Folded")]
public bool Folded { get; set; }
public bool? Folded { get; set; }
}
public class UpdFireMode
{
[JsonPropertyName("FireMode")]
public string FireMode { get; set; }
public string? FireMode { get; set; }
}
public class UpdFoodDrink
{
[JsonPropertyName("HpPercent")]
public double HpPercent { get; set; }
public double? HpPercent { get; set; }
}
public class UpdKey
{
[JsonPropertyName("NumberOfUsages")]
public double NumberOfUsages { get; set; }
public double? NumberOfUsages { get; set; }
}
public class UpdResource
{
[JsonPropertyName("Value")]
public double Value { get; set; }
public double? Value { get; set; }
[JsonPropertyName("UnitsConsumed")]
public double UnitsConsumed { get; set; }
public double? UnitsConsumed { get; set; }
}
public class UpdLight
{
[JsonPropertyName("IsActive")]
public bool IsActive { get; set; }
public bool? IsActive { get; set; }
[JsonPropertyName("SelectedMode")]
public int SelectedMode { get; set; }
public int? SelectedMode { get; set; }
}
public class UpdDogtag
{
[JsonPropertyName("AccountId")]
public string AccountId { get; set; }
public string? AccountId { get; set; }
[JsonPropertyName("ProfileId")]
public string ProfileId { get; set; }
public string? ProfileId { get; set; }
[JsonPropertyName("Nickname")]
public string Nickname { get; set; }
public string? Nickname { get; set; }
[JsonPropertyName("Side")]
public string Side { get; set; }
public string? Side { get; set; }
[JsonPropertyName("Level")]
public double Level { get; set; }
public double? Level { get; set; }
[JsonPropertyName("Time")]
public string Time { get; set; }
public string? Time { get; set; }
[JsonPropertyName("Status")]
public string Status { get; set; }
public string? Status { get; set; }
[JsonPropertyName("KillerAccountId")]
public string KillerAccountId { get; set; }
public string? KillerAccountId { get; set; }
[JsonPropertyName("KillerProfileId")]
public string KillerProfileId { get; set; }
public string? KillerProfileId { get; set; }
[JsonPropertyName("KillerName")]
public string KillerName { get; set; }
public string? KillerName { get; set; }
[JsonPropertyName("WeaponName")]
public string WeaponName { get; set; }
public string? WeaponName { get; set; }
}
public class UpdSideEffect
{
[JsonPropertyName("Value")]
public double Value { get; set; }
public double? Value { get; set; }
}
public class UpdRepairKit
{
[JsonPropertyName("Resource")]
public double Resource { get; set; }
public double? Resource { get; set; }
}
public class UpdCultistAmulet
{
[JsonPropertyName("NumberOfUsages")]
public double NumberOfUsages { get; set; }
public double? NumberOfUsages { get; set; }
}
@@ -5,179 +5,179 @@ namespace Core.Models.Eft.Common.Tables;
public class LocationServices
{
[JsonPropertyName("TraderServerSettings")]
public TraderServerSettings TraderServerSettings { get; set; }
public TraderServerSettings? TraderServerSettings { get; set; }
[JsonPropertyName("BTRServerSettings")]
public BtrServerSettings BtrServerSettings { get; set; }
public BtrServerSettings? BtrServerSettings { get; set; }
}
public class TraderServerSettings
{
[JsonPropertyName("TraderServices")]
public TraderServices TraderServices { get; set; }
public TraderServices? TraderServices { get; set; }
}
public class TraderServices
{
[JsonPropertyName("ExUsecLoyalty")]
public TraderService ExUsecLoyalty { get; set; }
public TraderServices? ExUsecLoyalty { get; set; }
[JsonPropertyName("ZryachiyAid")]
public TraderService ZryachiyAid { get; set; }
public TraderServices? ZryachiyAid { get; set; }
[JsonPropertyName("CultistsAid")]
public TraderService CultistsAid { get; set; }
public TraderServices? CultistsAid { get; set; }
[JsonPropertyName("PlayerTaxi")]
public TraderService PlayerTaxi { get; set; }
public TraderServices? PlayerTaxi { get; set; }
[JsonPropertyName("BtrItemsDelivery")]
public TraderService BtrItemsDelivery { get; set; }
public TraderServices? BtrItemsDelivery { get; set; }
[JsonPropertyName("BtrBotCover")]
public TraderService BtrBotCover { get; set; }
public TraderServices? BtrBotCover { get; set; }
[JsonPropertyName("TransitItemsDelivery")]
public TraderService TransitItemsDelivery { get; set; }
public TraderServices? TransitItemsDelivery { get; set; }
}
public class TraderService
{
[JsonPropertyName("TraderId")]
public string TraderId { get; set; }
public string? TraderId { get; set; }
[JsonPropertyName("TraderServiceType")]
public string TraderServiceType { get; set; }
public string? TraderServiceType { get; set; }
[JsonPropertyName("Requirements")]
public ServiceRequirements Requirements { get; set; }
public ServiceRequirements? Requirements { get; set; }
[JsonPropertyName("ServiceItemCost")]
public Dictionary<string, ServiceItemCostDetails> ServiceItemCost { get; set; }
public Dictionary<string, ServiceItemCostDetails>? ServiceItemCost { get; set; }
[JsonPropertyName("UniqueItems")]
public List<string> UniqueItems { get; set; }
public List<string>? UniqueItems { get; set; }
}
public class ServiceRequirements
{
[JsonPropertyName("CompletedQuests")]
public List<CompletedQuest> CompletedQuests { get; set; }
public List<CompletedQuest>? CompletedQuests { get; set; }
[JsonPropertyName("Standings")]
public Dictionary<string, StandingRequirement> Standings { get; set; }
public Dictionary<string, StandingRequirement>? Standings { get; set; }
}
public class CompletedQuest
{
[JsonPropertyName("QuestId")]
public string QuestId { get; set; }
public string? QuestId { get; set; }
}
public class StandingRequirement
{
[JsonPropertyName("Value")]
public int Value { get; set; }
public int? Value { get; set; }
}
public class ServiceItemCostDetails
{
[JsonPropertyName("Count")]
public int Count { get; set; }
public int? Count { get; set; }
}
public class BtrServerSettings
{
[JsonPropertyName("ChanceSpawn")]
public int ChanceSpawn { get; set; }
public int? ChanceSpawn { get; set; }
[JsonPropertyName("SpawnPeriod")]
public XYZ SpawnPeriod { get; set; }
public XYZ? SpawnPeriod { get; set; }
[JsonPropertyName("MoveSpeed")]
public float MoveSpeed { get; set; }
public float? MoveSpeed { get; set; }
[JsonPropertyName("ReadyToDepartureTime")]
public float ReadyToDepartureTime { get; set; }
public float? ReadyToDepartureTime { get; set; }
[JsonPropertyName("CheckTurnDistanceTime")]
public float CheckTurnDistanceTime { get; set; }
public float? CheckTurnDistanceTime { get; set; }
[JsonPropertyName("TurnCheckSensitivity")]
public float TurnCheckSensitivity { get; set; }
public float? TurnCheckSensitivity { get; set; }
[JsonPropertyName("DecreaseSpeedOnTurnLimit")]
public float DecreaseSpeedOnTurnLimit { get; set; }
public float? DecreaseSpeedOnTurnLimit { get; set; }
[JsonPropertyName("EndSplineDecelerationDistance")]
public float EndSplineDecelerationDistance { get; set; }
public float? EndSplineDecelerationDistance { get; set; }
[JsonPropertyName("AccelerationSpeed")]
public float AccelerationSpeed { get; set; }
public float? AccelerationSpeed { get; set; }
[JsonPropertyName("DecelerationSpeed")]
public float DecelerationSpeed { get; set; }
public float? DecelerationSpeed { get; set; }
[JsonPropertyName("PauseDurationRange")]
public XYZ PauseDurationRange { get; set; }
public XYZ? PauseDurationRange { get; set; }
[JsonPropertyName("BodySwingReturnSpeed")]
public float BodySwingReturnSpeed { get; set; }
public float? BodySwingReturnSpeed { get; set; }
[JsonPropertyName("BodySwingDamping")]
public float BodySwingDamping { get; set; }
public float? BodySwingDamping { get; set; }
[JsonPropertyName("BodySwingIntensity")]
public float BodySwingIntensity { get; set; }
public float? BodySwingIntensity { get; set; }
[JsonPropertyName("ServerMapBTRSettings")]
public Dictionary<string, ServerMapBtrsettings> ServerMapBTRSettings { get; set; }
public Dictionary<string, ServerMapBtrsettings>? ServerMapBTRSettings { get; set; }
}
public class ServerMapBtrsettings
{
[JsonPropertyName("MapID")]
public string MapID { get; set; }
public string? MapID { get; set; }
[JsonPropertyName("ChanceSpawn")]
public int ChanceSpawn { get; set; }
public int? ChanceSpawn { get; set; }
[JsonPropertyName("SpawnPeriod")]
public XYZ SpawnPeriod { get; set; }
public XYZ? SpawnPeriod { get; set; }
[JsonPropertyName("MoveSpeed")]
public float MoveSpeed { get; set; }
public float? MoveSpeed { get; set; }
[JsonPropertyName("ReadyToDepartureTime")]
public float ReadyToDepartureTime { get; set; }
public float? ReadyToDepartureTime { get; set; }
[JsonPropertyName("CheckTurnDistanceTime")]
public float CheckTurnDistanceTime { get; set; }
public float? CheckTurnDistanceTime { get; set; }
[JsonPropertyName("TurnCheckSensitivity")]
public float TurnCheckSensitivity { get; set; }
public float? TurnCheckSensitivity { get; set; }
[JsonPropertyName("DecreaseSpeedOnTurnLimit")]
public float DecreaseSpeedOnTurnLimit { get; set; }
public float? DecreaseSpeedOnTurnLimit { get; set; }
[JsonPropertyName("EndSplineDecelerationDistance")]
public float EndSplineDecelerationDistance { get; set; }
public float? EndSplineDecelerationDistance { get; set; }
[JsonPropertyName("AccelerationSpeed")]
public float AccelerationSpeed { get; set; }
public float? AccelerationSpeed { get; set; }
[JsonPropertyName("DecelerationSpeed")]
public float DecelerationSpeed { get; set; }
public float? DecelerationSpeed { get; set; }
[JsonPropertyName("PauseDurationRange")]
public XYZ PauseDurationRange { get; set; }
public XYZ? PauseDurationRange { get; set; }
[JsonPropertyName("BodySwingReturnSpeed")]
public float BodySwingReturnSpeed { get; set; }
public float? BodySwingReturnSpeed { get; set; }
[JsonPropertyName("BodySwingDamping")]
public float BodySwingDamping { get; set; }
public float? BodySwingDamping { get; set; }
[JsonPropertyName("BodySwingIntensity")]
public float BodySwingIntensity { get; set; }
public float? BodySwingIntensity { get; set; }
}
@@ -5,10 +5,10 @@ namespace Core.Models.Eft.Common.Tables;
public class LocationsBase
{
[JsonPropertyName("locations")]
public Locations Locations { get; set; }
public Locations? Locations { get; set; }
[JsonPropertyName("paths")]
public List<Path> Paths { get; set; }
public List<Path>? Paths { get; set; }
}
public class Locations
@@ -19,10 +19,10 @@ public class Locations
public class Path
{
[JsonPropertyName("Source")]
public string Source { get; set; }
public string? Source { get; set; }
[JsonPropertyName("Destination")]
public string Destination { get; set; }
public string? Destination { get; set; }
public bool Event { get; set; }
public bool? Event { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Common.Tables;
public class LocationsGenerateAllResponse
{
[JsonPropertyName("locations")]
public Locations Locations { get; set; }
public Locations? Locations { get; set; }
[JsonPropertyName("paths")]
public List<Path> Paths { get; set; }
public List<Path>? Paths { get; set; }
}
+7 -7
View File
@@ -6,26 +6,26 @@ namespace Core.Models.Eft.Common.Tables;
public class Match
{
[JsonPropertyName("metrics")]
public Metrics Metrics { get; set; }
public Metrics? Metrics { get; set; }
}
public class Metrics
{
[JsonPropertyName("Keys")]
public List<int> Keys { get; set; }
public List<int>? Keys { get; set; }
[JsonPropertyName("NetProcessingBins")]
public List<int> NetProcessingBins { get; set; }
public List<int>? NetProcessingBins { get; set; }
[JsonPropertyName("RenderBins")]
public List<int> RenderBins { get; set; }
public List<int>? RenderBins { get; set; }
[JsonPropertyName("GameUpdateBins")]
public List<int> GameUpdateBins { get; set; }
public List<int>? GameUpdateBins { get; set; }
[JsonPropertyName("MemoryMeasureInterval")]
public int MemoryMeasureInterval { get; set; }
public int? MemoryMeasureInterval { get; set; }
[JsonPropertyName("PauseReasons")]
public List<int> PauseReasons { get; set; }
public List<int>? PauseReasons { get; set; }
}
+17 -17
View File
@@ -5,71 +5,71 @@ using System.Text.Json.Serialization;
public class Prestige
{
[JsonPropertyName("elements")]
public PretigeElement Elements { get; set; }
public PretigeElement? Elements { get; set; }
}
public class PretigeElement
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("conditions")]
public List<QuestCondition> Conditions { get; set; }
public List<QuestCondition>? Conditions { get; set; }
[JsonPropertyName("rewards")]
public List<QuestReward> Rewards { get; set; }
public List<QuestReward>? Rewards { get; set; }
[JsonPropertyName("transferConfigs")]
public TransferConfigs TransferConfigs { get; set; }
public TransferConfigs? TransferConfigs { get; set; }
[JsonPropertyName("image")]
public string Image { get; set; }
public string? Image { get; set; }
[JsonPropertyName("bigImage")]
public string BigImage { get; set; }
public string? BigImage { get; set; }
}
public class TransferConfigs
{
[JsonPropertyName("stashConfig")]
public StashPrestigeConfig StashConfig { get; set; }
public StashPrestigeConfig? StashConfig { get; set; }
[JsonPropertyName("skillConfig")]
public PrestigeSkillConfig SkillConfig { get; set; }
public PrestigeSkillConfig? SkillConfig { get; set; }
[JsonPropertyName("masteringConfig")]
public PrestigeMasteringConfig MasteringConfig { get; set; }
public PrestigeMasteringConfig? MasteringConfig { get; set; }
}
public class StashPrestigeConfig
{
[JsonPropertyName("xCellCount")]
public int XCellCount { get; set; }
public int? XCellCount { get; set; }
[JsonPropertyName("yCellCount")]
public int YCellCount { get; set; }
public int? YCellCount { get; set; }
[JsonPropertyName("filters")]
public StashPrestigeFilters Filters { get; set; }
public StashPrestigeFilters? Filters { get; set; }
}
public class StashPrestigeFilters
{
[JsonPropertyName("includedItems")]
public List<string> IncludedItems { get; set; }
public List<string>? IncludedItems { get; set; }
[JsonPropertyName("excludedItems")]
public List<string> ExcludedItems { get; set; }
public List<string>? ExcludedItems { get; set; }
}
public class PrestigeSkillConfig
{
[JsonPropertyName("transferMultiplier")]
public int TransferMultiplier { get; set; }
public int? TransferMultiplier { get; set; }
}
public class PrestigeMasteringConfig
{
[JsonPropertyName("transferMultiplier")]
public int TransferMultiplier { get; set; }
public int? TransferMultiplier { get; set; }
}
@@ -6,70 +6,70 @@ namespace Core.Models.Eft.Common.Tables;
public class ProfileTemplates
{
[JsonPropertyName("Standard")]
public ProfileSides Standard { get; set; }
public ProfileSides? Standard { get; set; }
[JsonPropertyName("Left Behind")]
public ProfileSides LeftBehind { get; set; }
public ProfileSides? LeftBehind { get; set; }
[JsonPropertyName("Prepare To Escape")]
public ProfileSides PrepareToEscape { get; set; }
public ProfileSides? PrepareToEscape { get; set; }
[JsonPropertyName("Edge Of Darkness")]
public ProfileSides EdgeOfDarkness { get; set; }
public ProfileSides? EdgeOfDarkness { get; set; }
[JsonPropertyName("Unheard")]
public ProfileSides Unheard { get; set; }
public ProfileSides? Unheard { get; set; }
[JsonPropertyName("Tournament")]
public ProfileSides Tournament { get; set; }
public ProfileSides? Tournament { get; set; }
[JsonPropertyName("SPT Developer")]
public ProfileSides SPTDeveloper { get; set; }
public ProfileSides? SPTDeveloper { get; set; }
[JsonPropertyName("SPT Easy start")]
public ProfileSides SPTEasyStart { get; set; }
public ProfileSides? SPTEasyStart { get; set; }
[JsonPropertyName("SPT Zero to hero")]
public ProfileSides SPTZeroToHero { get; set; }
public ProfileSides? SPTZeroToHero { get; set; }
}
public class ProfileSides
{
[JsonPropertyName("descriptionLocaleKey")]
public string DescriptionLocaleKey { get; set; }
public string? DescriptionLocaleKey { get; set; }
[JsonPropertyName("usec")]
public TemplateSide Usec { get; set; }
public TemplateSide? Usec { get; set; }
[JsonPropertyName("bear")]
public TemplateSide Bear { get; set; }
public TemplateSide? Bear { get; set; }
}
public class TemplateSide
{
[JsonPropertyName("character")]
public PmcData Character { get; set; }
public PmcData? Character { get; set; }
[JsonPropertyName("suits")]
public List<string> Suits { get; set; }
public List<string>? Suits { get; set; }
[JsonPropertyName("dialogues")]
public Dictionary<string, Dialogue> Dialogues { get; set; }
public Dictionary<string, Dialogue>? Dialogues { get; set; }
[JsonPropertyName("userbuilds")]
public UserBuilds UserBuilds { get; set; }
public UserBuilds? UserBuilds { get; set; }
[JsonPropertyName("trader")]
public ProfileTraderTemplate Trader { get; set; }
public ProfileTraderTemplate? Trader { get; set; }
}
public class ProfileTraderTemplate
{
[JsonPropertyName("initialLoyaltyLevel")]
public Dictionary<string, int> InitialLoyaltyLevel { get; set; }
public Dictionary<string, int>? InitialLoyaltyLevel { get; set; }
[JsonPropertyName("initialStanding")]
public Dictionary<string, int> InitialStanding { get; set; }
public Dictionary<string, int>? InitialStanding { get; set; }
[JsonPropertyName("setQuestsAvailableForStart")]
public bool? SetQuestsAvailableForStart { get; set; }
@@ -78,10 +78,10 @@ public class ProfileTraderTemplate
public bool? SetQuestsAvailableForFinish { get; set; }
[JsonPropertyName("initialSalesSum")]
public int InitialSalesSum { get; set; }
public int? InitialSalesSum { get; set; }
[JsonPropertyName("jaegerUnlocked")]
public bool JaegerUnlocked { get; set; }
public bool? JaegerUnlocked { get; set; }
/** How many days is usage of the flea blocked for upon profile creation */
[JsonPropertyName("fleaBlockedDays")]
@@ -89,9 +89,9 @@ public class ProfileTraderTemplate
/** What traders default to being locked on profile creation */
[JsonPropertyName("lockedByDefaultOverride")]
public List<string> LockedByDefaultOverride { get; set; }
public List<string>? LockedByDefaultOverride { get; set; }
/** What traders should have their clothing unlocked/purchased on creation */
[JsonPropertyName("purchaseAllClothingByDefaultForTrader")]
public List<string> PurchaseAllClothingByDefaultForTrader { get; set; }
public List<string>? PurchaseAllClothingByDefaultForTrader { get; set; }
}
+63 -63
View File
@@ -12,61 +12,61 @@ public class Quest
public string? QuestName { get; set; }
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("canShowNotificationsInGame")]
public bool CanShowNotificationsInGame { get; set; }
public bool? CanShowNotificationsInGame { get; set; }
[JsonPropertyName("conditions")]
public QuestConditionTypes Conditions { get; set; }
public QuestConditionTypes? Conditions { get; set; }
[JsonPropertyName("description")]
public string Description { get; set; }
public string? Description { get; set; }
[JsonPropertyName("failMessageText")]
public string FailMessageText { get; set; }
public string? FailMessageText { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("note")]
public string Note { get; set; }
public string? Note { get; set; }
[JsonPropertyName("traderId")]
public string TraderId { get; set; }
public string? TraderId { get; set; }
[JsonPropertyName("location")]
public string Location { get; set; }
public string? Location { get; set; }
[JsonPropertyName("image")]
public string Image { get; set; }
public string? Image { get; set; }
[JsonPropertyName("type")]
public QuestTypeEnum Type { get; set; }
public QuestTypeEnum? Type { get; set; }
[JsonPropertyName("isKey")]
public bool IsKey { get; set; }
public bool? IsKey { get; set; }
[JsonPropertyName("restartable")]
public bool Restartable { get; set; }
public bool? Restartable { get; set; }
[JsonPropertyName("instantComplete")]
public bool InstantComplete { get; set; }
public bool? InstantComplete { get; set; }
[JsonPropertyName("secretQuest")]
public bool SecretQuest { get; set; }
public bool? SecretQuest { get; set; }
[JsonPropertyName("startedMessageText")]
public string StartedMessageText { get; set; }
public string? StartedMessageText { get; set; }
[JsonPropertyName("successMessageText")]
public string SuccessMessageText { get; set; }
public string? SuccessMessageText { get; set; }
[JsonPropertyName("acceptPlayerMessage")]
public string? AcceptPlayerMessage { get; set; }
[JsonPropertyName("declinePlayerMessage")]
public string DeclinePlayerMessage { get; set; }
public string? DeclinePlayerMessage { get; set; }
[JsonPropertyName("completePlayerMessage")]
public string? CompletePlayerMessage { get; set; }
@@ -75,7 +75,7 @@ public class Quest
public string? TemplateId { get; set; }
[JsonPropertyName("rewards")]
public QuestRewards Rewards { get; set; }
public QuestRewards? Rewards { get; set; }
/// <summary>
/// Becomes 'AppearStatus' inside client
@@ -87,28 +87,28 @@ public class Quest
public bool? KeyQuest { get; set; }
[JsonPropertyName("changeQuestMessageText")]
public string ChangeQuestMessageText { get; set; }
public string? ChangeQuestMessageText { get; set; }
/// <summary>
/// "Pmc" or "Scav"
/// </summary>
[JsonPropertyName("side")]
public string Side { get; set; }
public string? Side { get; set; }
[JsonPropertyName("acceptanceAndFinishingSource")]
public string AcceptanceAndFinishingSource { get; set; }
public string? AcceptanceAndFinishingSource { get; set; }
[JsonPropertyName("progressSource")]
public string ProgressSource { get; set; }
public string? ProgressSource { get; set; }
[JsonPropertyName("rankingModes")]
public List<string> RankingModes { get; set; }
public List<string>? RankingModes { get; set; }
[JsonPropertyName("gameModes")]
public List<string> GameModes { get; set; }
public List<string>? GameModes { get; set; }
[JsonPropertyName("arenaLocations")]
public List<string> ArenaLocations { get; set; }
public List<string>? ArenaLocations { get; set; }
/// <summary>
/// Status of quest to player
@@ -123,22 +123,22 @@ public class QuestConditionTypes
public List<QuestCondition>? Started { get; set; }
[JsonPropertyName("AvailableForFinish")]
public List<QuestCondition> AvailableForFinish { get; set; }
public List<QuestCondition>? AvailableForFinish { get; set; }
[JsonPropertyName("AvailableForStart")]
public List<QuestCondition> AvailableForStart { get; set; }
public List<QuestCondition>? AvailableForStart { get; set; }
[JsonPropertyName("Success")]
public List<QuestCondition>? Success { get; set; }
[JsonPropertyName("Fail")]
public List<QuestCondition> Fail { get; set; }
public List<QuestCondition>? Fail { get; set; }
}
public class QuestCondition
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("index")]
public int? Index { get; set; }
@@ -147,7 +147,7 @@ public class QuestCondition
public string? CompareMethod { get; set; }
[JsonPropertyName("dynamicLocale")]
public bool DynamicLocale { get; set; }
public bool? DynamicLocale { get; set; }
[JsonPropertyName("visibilityConditions")]
public List<VisibilityCondition>? VisibilityConditions { get; set; }
@@ -225,22 +225,22 @@ public class QuestCondition
public string? ConditionType { get; set; }
[JsonPropertyName("areaType")]
public HideoutAreas AreaType { get; set; }
public HideoutAreas? AreaType { get; set; }
}
public class QuestConditionCounter
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("conditions")]
public List<QuestConditionCounterCondition> Conditions { get; set; }
public List<QuestConditionCounterCondition>? Conditions { get; set; }
}
public class QuestConditionCounterCondition
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("dynamicLocale")]
public bool? DynamicLocale { get; set; }
@@ -318,46 +318,46 @@ public class QuestConditionCounterCondition
public class EnemyHealthEffect
{
[JsonPropertyName("bodyParts")]
public List<string> BodyParts { get; set; }
public List<string>? BodyParts { get; set; }
[JsonPropertyName("effects")]
public List<string> Effects { get; set; }
public List<string>? Effects { get; set; }
}
public class ValueCompare
{
[JsonPropertyName("compareMethod")]
public string CompareMethod { get; set; }
public string? CompareMethod { get; set; }
[JsonPropertyName("value")]
public int Value { get; set; }
public int? Value { get; set; }
}
public class CounterConditionDistance
{
[JsonPropertyName("value")]
public int Value { get; set; }
public int? Value { get; set; }
[JsonPropertyName("compareMethod")]
public string CompareMethod { get; set; }
public string? CompareMethod { get; set; }
}
public class DaytimeCounter
{
[JsonPropertyName("from")]
public int From { get; set; }
public int? From { get; set; }
[JsonPropertyName("to")]
public int To { get; set; }
public int? To { get; set; }
}
public class VisibilityCondition
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("target")]
public string Target { get; set; }
public string? Target { get; set; }
[JsonPropertyName("value")]
public int? Value { get; set; }
@@ -369,59 +369,59 @@ public class VisibilityCondition
public bool? OneSessionOnly { get; set; }
[JsonPropertyName("conditionType")]
public string ConditionType { get; set; }
public string? ConditionType { get; set; }
}
public class QuestRewards
{
[JsonPropertyName("AvailableForStart")]
public List<QuestReward> AvailableForStart { get; set; }
public List<QuestReward>? AvailableForStart { get; set; }
[JsonPropertyName("AvailableForFinish")]
public List<QuestReward> AvailableForFinish { get; set; }
public List<QuestReward>? AvailableForFinish { get; set; }
[JsonPropertyName("Started")]
public List<QuestReward> Started { get; set; }
public List<QuestReward>? Started { get; set; }
[JsonPropertyName("Success")]
public List<QuestReward> Success { get; set; }
public List<QuestReward>? Success { get; set; }
[JsonPropertyName("Fail")]
public List<QuestReward> Fail { get; set; }
public List<QuestReward>? Fail { get; set; }
[JsonPropertyName("FailRestartable")]
public List<QuestReward> FailRestartable { get; set; }
public List<QuestReward>? FailRestartable { get; set; }
[JsonPropertyName("Expired")]
public List<QuestReward> Expired { get; set; }
public List<QuestReward>? Expired { get; set; }
}
public class QuestReward
{
[JsonPropertyName("value")]
public object Value { get; set; } // TODO: Can be either string or number
public object? Value { get; set; } // TODO: Can be either string or number
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("type")]
public QuestRewardType Type { get; set; }
public QuestRewardType? Type { get; set; }
[JsonPropertyName("index")]
public int Index { get; set; }
public int? Index { get; set; }
[JsonPropertyName("target")]
public string Target { get; set; }
public string? Target { get; set; }
[JsonPropertyName("items")]
public List<Item> Items { get; set; }
public List<Item>? Items { get; set; }
[JsonPropertyName("loyaltyLevel")]
public int? LoyaltyLevel { get; set; }
/** Hideout area id */
[JsonPropertyName("traderId")]
public string TraderId { get; set; }
public string? TraderId { get; set; }
[JsonPropertyName("isEncoded")]
public bool? IsEncoded { get; set; }
@@ -433,13 +433,13 @@ public class QuestReward
public bool? FindInRaid { get; set; }
[JsonPropertyName("gameMode")]
public List<string> GameMode { get; set; }
public List<string>? GameMode { get; set; }
/** Game editions whitelisted to get reward */
[JsonPropertyName("availableInGameEditions")]
public List<string> AvailableInGameEditions { get; set; }
public List<string>? AvailableInGameEditions { get; set; }
/** Game editions blacklisted from getting reward */
[JsonPropertyName("notAvailableInGameEditions")]
public List<string> NotAvailableInGameEditions { get; set; }
public List<string>? NotAvailableInGameEditions { get; set; }
}
@@ -5,79 +5,79 @@ namespace Core.Models.Eft.Common.Tables;
public class RepeatableQuest : Quest
{
[JsonPropertyName("changeCost")]
public List<ChangeCost> ChangeCost { get; set; }
public List<ChangeCost?>? ChangeCost { get; set; }
[JsonPropertyName("changeStandingCost")]
public int ChangeStandingCost { get; set; }
public int? ChangeStandingCost { get; set; }
[JsonPropertyName("sptRepatableGroupName")]
public string SptRepatableGroupName { get; set; }
public string? SptRepatableGroupName { get; set; }
[JsonPropertyName("acceptanceAndFinishingSource")]
public string AcceptanceAndFinishingSource { get; set; }
public string? AcceptanceAndFinishingSource { get; set; }
[JsonPropertyName("progressSource")]
public string ProgressSource { get; set; }
public string? ProgressSource { get; set; }
[JsonPropertyName("rankingModes")]
public List<string> RankingModes { get; set; }
public List<string?>? RankingModes { get; set; }
[JsonPropertyName("gameModes")]
public List<string> GameModes { get; set; }
public List<string>? GameModes { get; set; }
[JsonPropertyName("arenaLocations")]
public List<string> ArenaLocations { get; set; }
public List<string>? ArenaLocations { get; set; }
[JsonPropertyName("questStatus")]
public RepeatableQuestStatus QuestStatus { get; set; }
public RepeatableQuestStatus? QuestStatus { get; set; }
}
public class RepeatableQuestDatabase
{
[JsonPropertyName("templates")]
public RepeatableTemplates Templates { get; set; }
public RepeatableTemplates? Templates { get; set; }
[JsonPropertyName("rewards")]
public RewardOptions Rewards { get; set; }
public RewardOptions? Rewards { get; set; }
[JsonPropertyName("data")]
public Options Data { get; set; }
public Options? Data { get; set; }
[JsonPropertyName("samples")]
public List<SampleQuests> Samples { get; set; }
public List<SampleQuests?>? Samples { get; set; }
}
public class RepeatableQuestStatus
{
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("uid")]
public string Uid { get; set; }
public string? Uid { get; set; }
[JsonPropertyName("qid")]
public string Qid { get; set; }
public string? Qid { get; set; }
[JsonPropertyName("startTime")]
public long StartTime { get; set; }
public long? StartTime { get; set; }
[JsonPropertyName("status")]
public int Status { get; set; }
public int? Status { get; set; }
[JsonPropertyName("statusTimers")]
public object StatusTimers { get; set; } // Use object for any type
public object? StatusTimers { get; set; } // Use object for any type
}
public class RepeatableTemplates
{
[JsonPropertyName("Elimination")]
public Quest Elimination { get; set; }
public Quest? Elimination { get; set; }
[JsonPropertyName("Completion")]
public Quest Completion { get; set; }
public Quest? Completion { get; set; }
[JsonPropertyName("Exploration")]
public Quest Exploration { get; set; }
public Quest? Exploration { get; set; }
}
public class PmcDataRepeatableQuest
@@ -86,46 +86,46 @@ public class PmcDataRepeatableQuest
public string? Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("unavailableTime")]
public string? UnavailableTime { get; set; }
[JsonPropertyName("activeQuests")]
public List<RepeatableQuest> ActiveQuests { get; set; }
public List<RepeatableQuest?>? ActiveQuests { get; set; }
[JsonPropertyName("inactiveQuests")]
public List<RepeatableQuest> InactiveQuests { get; set; }
public List<RepeatableQuest>? InactiveQuests { get; set; }
[JsonPropertyName("endTime")]
public long EndTime { get; set; }
public long? EndTime { get; set; }
[JsonPropertyName("changeRequirement")]
public Dictionary<string, ChangeRequirement> ChangeRequirement { get; set; }
public Dictionary<string?, ChangeRequirement?>? ChangeRequirement { get; set; }
[JsonPropertyName("freeChanges")]
public int FreeChanges { get; set; }
public int? FreeChanges { get; set; }
[JsonPropertyName("freeChangesAvailable")]
public int FreeChangesAvailable { get; set; }
public int? FreeChangesAvailable { get; set; }
}
public class ChangeRequirement
{
[JsonPropertyName("changeCost")]
public List<ChangeCost> ChangeCost { get; set; }
public List<ChangeCost?>? ChangeCost { get; set; }
[JsonPropertyName("changeStandingCost")]
public int ChangeStandingCost { get; set; }
public int? ChangeStandingCost { get; set; }
}
public class ChangeCost
{
[JsonPropertyName("templateId")]
public string TemplateId { get; set; }
public string? TemplateId { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
public int? Count { get; set; }
}
// Config Options
@@ -133,98 +133,98 @@ public class ChangeCost
public class RewardOptions
{
[JsonPropertyName("itemsBlacklist")]
public List<string> ItemsBlacklist { get; set; }
public List<string>? ItemsBlacklist { get; set; }
}
public class Options
{
[JsonPropertyName("Completion")]
public CompletionFilter Completion { get; set; }
public CompletionFilter? Completion { get; set; }
}
public class CompletionFilter
{
[JsonPropertyName("itemsBlacklist")]
public List<ItemsBlacklist> ItemsBlacklist { get; set; }
public List<ItemsBlacklist>? ItemsBlacklist { get; set; }
[JsonPropertyName("itemsWhitelist")]
public List<ItemsWhitelist> ItemsWhitelist { get; set; }
public List<ItemsWhitelist>? ItemsWhitelist { get; set; }
}
public class ItemsBlacklist
{
[JsonPropertyName("minPlayerLevel")]
public int MinPlayerLevel { get; set; }
public int? MinPlayerLevel { get; set; }
[JsonPropertyName("itemIds")]
public List<string> ItemIds { get; set; }
public List<string>? ItemIds { get; set; }
}
public class ItemsWhitelist
{
[JsonPropertyName("minPlayerLevel")]
public int MinPlayerLevel { get; set; }
public int? MinPlayerLevel { get; set; }
[JsonPropertyName("itemIds")]
public List<string> ItemIds { get; set; }
public List<string>? ItemIds { get; set; }
}
public class SampleQuests
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("traderId")]
public string TraderId { get; set; }
public string? TraderId { get; set; }
[JsonPropertyName("location")]
public string Location { get; set; }
public string? Location { get; set; }
[JsonPropertyName("image")]
public string Image { get; set; }
public string? Image { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
public string? Type { get; set; }
[JsonPropertyName("isKey")]
public bool IsKey { get; set; }
public bool? IsKey { get; set; }
[JsonPropertyName("restartable")]
public bool Restartable { get; set; }
public bool? Restartable { get; set; }
[JsonPropertyName("instantComplete")]
public bool InstantComplete { get; set; }
public bool? InstantComplete { get; set; }
[JsonPropertyName("secretQuest")]
public bool SecretQuest { get; set; }
public bool? SecretQuest { get; set; }
[JsonPropertyName("canShowNotificationsInGame")]
public bool CanShowNotificationsInGame { get; set; }
public bool? CanShowNotificationsInGame { get; set; }
[JsonPropertyName("rewards")]
public QuestRewards Rewards { get; set; }
public QuestRewards? Rewards { get; set; }
[JsonPropertyName("conditions")]
public QuestConditionTypes Conditions { get; set; }
public QuestConditionTypes? Conditions { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("note")]
public string Note { get; set; }
public string? Note { get; set; }
[JsonPropertyName("description")]
public string Description { get; set; }
public string? Description { get; set; }
[JsonPropertyName("successMessageText")]
public string SuccessMessageText { get; set; }
public string? SuccessMessageText { get; set; }
[JsonPropertyName("failMessageText")]
public string FailMessageText { get; set; }
public string? FailMessageText { get; set; }
[JsonPropertyName("startedMessageText")]
public string StartedMessageText { get; set; }
public string? StartedMessageText { get; set; }
[JsonPropertyName("templateId")]
public string TemplateId { get; set; }
public string? TemplateId { get; set; }
}
+165 -165
View File
@@ -5,19 +5,19 @@ namespace Core.Models.Eft.Common.Tables;
public class TemplateItem
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("_name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("_parent")]
public string Parent { get; set; }
public string? Parent { get; set; }
[JsonPropertyName("_type")]
public ItemType Type { get; set; }
public ItemType? Type { get; set; }
[JsonPropertyName("_props")]
public Props Properties { get; set; }
public Props? Properties { get; set; }
[JsonPropertyName("_proto")]
public string? Prototype { get; set; }
@@ -26,7 +26,7 @@ public class TemplateItem
public class Props
{
[JsonPropertyName("AllowSpawnOnLocations")]
public string[] AllowSpawnOnLocations { get; set; }
public List<string>? AllowSpawnOnLocations { get; set; }
[JsonPropertyName("BeltMagazineRefreshCount")]
public int? BeltMagazineRefreshCount { get; set; }
@@ -77,10 +77,10 @@ public class Props
public string? ItemSound { get; set; }
[JsonPropertyName("Prefab")]
public Prefab Prefab { get; set; }
public Prefab? Prefab { get; set; }
[JsonPropertyName("UsePrefab")]
public Prefab UsePrefab { get; set; }
public Prefab? UsePrefab { get; set; }
[JsonPropertyName("airDropTemplateId")]
public string? AirDropTemplateId { get; set; }
@@ -110,10 +110,10 @@ public class Props
public bool? IsUngivable { get; set; }
[JsonPropertyName("IsUnremovable")]
public bool? IsUnremovable { get; set; }
public bool? IsUnRemovable { get; set; }
[JsonPropertyName("IsLockedafterEquip")]
public bool? IsLockedafterEquip { get; set; }
public bool? IsLockedAfterEquip { get; set; }
[JsonPropertyName("IsSecretExitRequirement")]
public bool? IsSecretExitRequirement { get; set; }
@@ -161,7 +161,7 @@ public class Props
public int? ExtraSizeUp { get; set; }
[JsonPropertyName("FlareTypes")]
public List<string> FlareTypes { get; set; }
public List<string>? FlareTypes { get; set; }
[JsonPropertyName("ExtraSizeDown")]
public int? ExtraSizeDown { get; set; }
@@ -173,7 +173,7 @@ public class Props
public bool? MergesWithChildren { get; set; }
[JsonPropertyName("MetascoreGroup")]
public string? MetascoreGroup { get; set; }
public string? MetaScoreGroup { get; set; }
[JsonPropertyName("CanSellOnRagfair")]
public bool? CanSellOnRagfair { get; set; }
@@ -182,7 +182,7 @@ public class Props
public bool? CanRequireOnRagfair { get; set; }
[JsonPropertyName("ConflictingItems")]
public List<string> ConflictingItems { get; set; }
public List<string>? ConflictingItems { get; set; }
[JsonPropertyName("Unlootable")]
public bool? Unlootable { get; set; }
@@ -191,7 +191,7 @@ public class Props
public string? UnlootableFromSlot { get; set; }
[JsonPropertyName("UnlootableFromSide")]
public List<string> UnlootableFromSide { get; set; }
public List<string>? UnlootableFromSide { get; set; }
[JsonPropertyName("AnimationVariantsNumber")]
public int? AnimationVariantsNumber { get; set; }
@@ -233,10 +233,10 @@ public class Props
public bool? CanPutIntoDuringTheRaid { get; set; }
[JsonPropertyName("CantRemoveFromSlotsDuringRaid")]
public List<string> CantRemoveFromSlotsDuringRaid { get; set; }
public List<string>? CantRemoveFromSlotsDuringRaid { get; set; }
[JsonPropertyName("KeyIds")]
public List<string> KeyIds { get; set; }
public List<string>? KeyIds { get; set; }
[JsonPropertyName("TagColor")]
public int? TagColor { get; set; }
@@ -266,7 +266,7 @@ public class Props
public int? Velocity { get; set; }
[JsonPropertyName("WeaponRecoilSettings")]
public WeaponRecoilSettings WeaponRecoilSettings { get; set; }
public WeaponRecoilSettings? WeaponRecoilSettings { get; set; }
[JsonPropertyName("WithAnimatorAiming")]
public bool? WithAnimatorAiming { get; set; }
@@ -323,7 +323,7 @@ public class Props
public bool? IsAdjustableOptic { get; set; }
[JsonPropertyName("MinMaxFov")]
public XYZ MinMaxFov { get; set; }
public XYZ? MinMaxFov { get; set; }
[JsonPropertyName("sightModType")]
public string? SightModType { get; set; }
@@ -335,7 +335,7 @@ public class Props
public int? SightModesCount { get; set; }
[JsonPropertyName("OpticCalibrationDistances")]
public List<int> OpticCalibrationDistances { get; set; }
public List<int>? OpticCalibrationDistances { get; set; }
[JsonPropertyName("ScopesCount")]
public int? ScopesCount { get; set; }
@@ -344,10 +344,10 @@ public class Props
public object? AimSensitivity { get; set; } // TODO: object here
[JsonPropertyName("Zooms")]
public List<List<int>> Zooms { get; set; }
public List<List<int>>? Zooms { get; set; }
[JsonPropertyName("CalibrationDistances")]
public List<List<int>> CalibrationDistances { get; set; }
public List<List<int>>? CalibrationDistances { get; set; }
[JsonPropertyName("Intensity")]
public int? Intensity { get; set; }
@@ -368,7 +368,7 @@ public class Props
public int? NoiseScale { get; set; }
[JsonPropertyName("Color")]
public Color Color { get; set; }
public Color? Color { get; set; }
[JsonPropertyName("DiffuseIntensity")]
public int? DiffuseIntensity { get; set; }
@@ -431,7 +431,7 @@ public class Props
public int? MagAnimationIndex { get; set; }
[JsonPropertyName("Cartridges")]
public List<Slot> Cartridges { get; set; }
public List<Slot>? Cartridges { get; set; }
[JsonPropertyName("CanFast")]
public bool? CanFast { get; set; }
@@ -452,10 +452,10 @@ public class Props
public int? CheckOverride { get; set; }
[JsonPropertyName("reloadMagType")]
public string ReloadMagType { get; set; }
public string? ReloadMagType { get; set; }
[JsonPropertyName("visibleAmmoRangesString")]
public string VisibleAmmoRangesString { get; set; }
public string? VisibleAmmoRangesString { get; set; }
[JsonPropertyName("malfunctionChance")]
public int? MalfunctionChance { get; set; }
@@ -485,7 +485,7 @@ public class Props
public int? DeviationMax { get; set; }
[JsonPropertyName("searchSound")]
public string SearchSound { get; set; }
public string? SearchSound { get; set; }
[JsonPropertyName("blocksArmorVest")]
public bool? BlocksArmorVest { get; set; }
@@ -494,19 +494,19 @@ public class Props
public int? SpeedPenaltyPercent { get; set; }
[JsonPropertyName("gridLayoutName")]
public string GridLayoutName { get; set; }
public string? GridLayoutName { get; set; }
[JsonPropertyName("containerSpawnChanceModifier")]
public int? ContainerSpawnChanceModifier { get; set; }
[JsonPropertyName("spawnExcludedFilter")]
public List<string> SpawnExcludedFilter { get; set; }
public List<string>? SpawnExcludedFilter { get; set; }
[JsonPropertyName("spawnFilter")]
public List<object> SpawnFilter { get; set; } // TODO: object here
public List<object>? SpawnFilter { get; set; } // TODO: object here
[JsonPropertyName("containType")]
public List<object> ContainType { get; set; } // TODO: object here
public List<object>? ContainType { get; set; } // TODO: object here
[JsonPropertyName("sizeWidth")]
public int? SizeWidth { get; set; }
@@ -518,13 +518,13 @@ public class Props
public bool? IsSecured { get; set; }
[JsonPropertyName("spawnTypes")]
public string SpawnTypes { get; set; }
public string? SpawnTypes { get; set; }
[JsonPropertyName("lootFilter")]
public List<object> LootFilter { get; set; } // TODO: object here
public List<object>? LootFilter { get; set; } // TODO: object here
[JsonPropertyName("spawnRarity")]
public string SpawnRarity { get; set; }
public string? SpawnRarity { get; set; }
[JsonPropertyName("minCountSpawn")]
public int? MinCountSpawn { get; set; }
@@ -533,25 +533,25 @@ public class Props
public int? MaxCountSpawn { get; set; }
[JsonPropertyName("openedByKeyID")]
public List<string> OpenedByKeyID { get; set; }
public List<string>? OpenedByKeyID { get; set; }
[JsonPropertyName("rigLayoutName")]
public string RigLayoutName { get; set; }
public string? RigLayoutName { get; set; }
[JsonPropertyName("maxDurability")]
public int? MaxDurability { get; set; }
[JsonPropertyName("armorZone")]
public List<string> ArmorZone { get; set; }
public List<string>? ArmorZone { get; set; }
[JsonPropertyName("armorClass")]
public object ArmorClass { get; set; } // TODO: object here
public object? ArmorClass { get; set; } // TODO: object here
[JsonPropertyName("armorColliders")]
public List<string> ArmorColliders { get; set; }
public List<string>? ArmorColliders { get; set; }
[JsonPropertyName("armorPlateColliders")]
public List<string> ArmorPlateColliders { get; set; }
public List<string>? ArmorPlateColliders { get; set; }
[JsonPropertyName("bluntDamageReduceFromSoftArmor")]
public bool? BluntDamageReduceFromSoftArmor { get; set; }
@@ -566,31 +566,31 @@ public class Props
public int? BluntThroughput { get; set; }
[JsonPropertyName("armorMaterial")]
public string ArmorMaterial { get; set; }
public string? ArmorMaterial { get; set; }
[JsonPropertyName("armorType")]
public string ArmorType { get; set; }
public string? ArmorType { get; set; }
[JsonPropertyName("weapClass")]
public string WeapClass { get; set; }
public string? WeapClass { get; set; }
[JsonPropertyName("weapUseType")]
public string WeapUseType { get; set; }
public string? WeapUseType { get; set; }
[JsonPropertyName("ammoCaliber")]
public string AmmoCaliber { get; set; }
public string? AmmoCaliber { get; set; }
[JsonPropertyName("operatingResource")]
public int? OperatingResource { get; set; }
[JsonPropertyName("postRecoilHorizontalRangeHandRotation")]
public XYZ PostRecoilHorizontalRangeHandRotation { get; set; }
public XYZ? PostRecoilHorizontalRangeHandRotation { get; set; }
[JsonPropertyName("postRecoilVerticalRangeHandRotation")]
public XYZ PostRecoilVerticalRangeHandRotation { get; set; }
public XYZ? PostRecoilVerticalRangeHandRotation { get; set; }
[JsonPropertyName("progressRecoilAngleOnStable")]
public XYZ ProgressRecoilAngleOnStable { get; set; }
public XYZ? ProgressRecoilAngleOnStable { get; set; }
[JsonPropertyName("repairComplexity")]
public int? RepairComplexity { get; set; }
@@ -653,10 +653,10 @@ public class Props
public bool? IsBoltCatch { get; set; }
[JsonPropertyName("defMagType")]
public string DefMagType { get; set; }
public string? DefMagType { get; set; }
[JsonPropertyName("defAmmo")]
public string DefAmmo { get; set; }
public string? DefAmmo { get; set; }
[JsonPropertyName("adjustCollimatorsToTrajectory")]
public bool? AdjustCollimatorsToTrajectory { get; set; }
@@ -665,43 +665,43 @@ public class Props
public int? ShotgunDispersion { get; set; }
[JsonPropertyName("chambers")]
public List<Slot> Chambers { get; set; }
public List<Slot>? Chambers { get; set; }
[JsonPropertyName("cameraSnap")]
public int? CameraSnap { get; set; }
[JsonPropertyName("cameraToWeaponAngleSpeedRange")]
public XYZ CameraToWeaponAngleSpeedRange { get; set; }
public XYZ? CameraToWeaponAngleSpeedRange { get; set; }
[JsonPropertyName("cameraToWeaponAngleStep")]
public int? CameraToWeaponAngleStep { get; set; }
[JsonPropertyName("reloadMode")]
public string ReloadMode { get; set; }
public string? ReloadMode { get; set; }
[JsonPropertyName("aimPlane")]
public int? AimPlane { get; set; }
[JsonPropertyName("tacticalReloadStiffnes")]
public XYZ TacticalReloadStiffnes { get; set; }
public XYZ? TacticalReloadStiffnes { get; set; }
[JsonPropertyName("tacticalReloadFixation")]
public int? TacticalReloadFixation { get; set; }
[JsonPropertyName("recoilCenter")]
public XYZ RecoilCenter { get; set; }
public XYZ? RecoilCenter { get; set; }
[JsonPropertyName("rotationCenter")]
public XYZ RotationCenter { get; set; }
public XYZ? RotationCenter { get; set; }
[JsonPropertyName("rotationCenterNoStock")]
public XYZ RotationCenterNoStock { get; set; }
public XYZ? RotationCenterNoStock { get; set; }
[JsonPropertyName("shotsGroupSettings")]
public List<ShotsGroupSettings> ShotsGroupSettings { get; set; }
[JsonPropertyName("foldedSlot")]
public string FoldedSlot { get; set; }
public string? FoldedSlot { get; set; }
[JsonPropertyName("forbidMissingVitalParts")]
public bool? ForbidMissingVitalParts { get; set; }
@@ -836,10 +836,10 @@ public class Props
public int? MountingHorizontalOutOfBreathMultiplier { get; set; }
[JsonPropertyName("mountingPosition")]
public XYZ MountingPosition { get; set; }
public XYZ? MountingPosition { get; set; }
[JsonPropertyName("mountingVerticalOutOfBreathMultiplier")]
public XYZ MountingVerticalOutOfBreathMultiplier { get; set; }
public XYZ? MountingVerticalOutOfBreathMultiplier { get; set; }
[JsonPropertyName("blocksEarpiece")]
public bool? BlocksEarpiece { get; set; }
@@ -857,22 +857,22 @@ public class Props
public int? Indestructibility { get; set; }
[JsonPropertyName("headSegments")]
public List<string> HeadSegments { get; set; }
public List<string>? HeadSegments { get; set; }
[JsonPropertyName("faceShieldComponent")]
public bool? FaceShieldComponent { get; set; }
[JsonPropertyName("faceShieldMask")]
public string FaceShieldMask { get; set; }
public string? FaceShieldMask { get; set; }
[JsonPropertyName("materialType")]
public string MaterialType { get; set; }
public string? MaterialType { get; set; }
[JsonPropertyName("ricochetParams")]
public XYZ RicochetParams { get; set; }
public XYZ? RicochetParams { get; set; }
[JsonPropertyName("deafStrength")]
public string DeafStrength { get; set; }
public string? DeafStrength { get; set; }
[JsonPropertyName("blindnessProtection")]
public int? BlindnessProtection { get; set; }
@@ -920,16 +920,16 @@ public class Props
public int? FoodUseTime { get; set; }
[JsonPropertyName("foodEffectType")]
public string FoodEffectType { get; set; }
public string? FoodEffectType { get; set; }
[JsonPropertyName("stimulatorBuffs")]
public string StimulatorBuffs { get; set; }
public string? StimulatorBuffs { get; set; }
[JsonPropertyName("effects_health")]
public object EffectsHealth { get; set; } // TODO: object here
public object? EffectsHealth { get; set; } // TODO: object here
[JsonPropertyName("effects_damage")]
public Dictionary<string, EffectDamageProps> EffectsDamage { get; set; }
public Dictionary<string, EffectDamageProps>? EffectsDamage { get; set; }
[JsonPropertyName("maximumNumberOfUsage")]
public int? MaximumNumberOfUsage { get; set; }
@@ -977,10 +977,10 @@ public class Props
public int? DeflectionConsumption { get; set; }
[JsonPropertyName("appliedTrunkRotation")]
public XYZ AppliedTrunkRotation { get; set; }
public XYZ? AppliedTrunkRotation { get; set; }
[JsonPropertyName("appliedHeadRotation")]
public XYZ AppliedHeadRotation { get; set; }
public XYZ? AppliedHeadRotation { get; set; }
[JsonPropertyName("displayOnModel")]
public bool? DisplayOnModel { get; set; }
@@ -992,10 +992,10 @@ public class Props
public int? StaminaBurnRate { get; set; }
[JsonPropertyName("colliderScaleMultiplier")]
public XYZ ColliderScaleMultiplier { get; set; }
public XYZ? ColliderScaleMultiplier { get; set; }
[JsonPropertyName("configPathStr")]
public string ConfigPathStr { get; set; }
public string? ConfigPathStr { get; set; }
[JsonPropertyName("maxMarkersCount")]
public int? MaxMarkersCount { get; set; }
@@ -1010,7 +1010,7 @@ public class Props
public int? MedUseTime { get; set; }
[JsonPropertyName("medEffectType")]
public string MedEffectType { get; set; }
public string? MedEffectType { get; set; }
[JsonPropertyName("maxHpResource")]
public int? MaxHpResource { get; set; }
@@ -1031,13 +1031,13 @@ public class Props
public int? MaxRepairResource { get; set; }
[JsonPropertyName("targetItemFilter")]
public string[] TargetItemFilter { get; set; }
public List<string>? TargetItemFilter { get; set; }
[JsonPropertyName("repairQuality")]
public int? RepairQuality { get; set; }
[JsonPropertyName("repairType")]
public string RepairType { get; set; }
public string? RepairType { get; set; }
[JsonPropertyName("stackMinRandom")]
public int? StackMinRandom { get; set; }
@@ -1046,7 +1046,7 @@ public class Props
public int? StackMaxRandom { get; set; }
[JsonPropertyName("ammoType")]
public string AmmoType { get; set; }
public string? AmmoType { get; set; }
[JsonPropertyName("initialSpeed")]
public int? InitialSpeed { get; set; }
@@ -1085,7 +1085,7 @@ public class Props
public int? AmmoHear { get; set; }
[JsonPropertyName("ammoSfx")]
public string AmmoSfx { get; set; }
public string? AmmoSfx { get; set; }
[JsonPropertyName("misfireChance")]
public int? MisfireChance { get; set; }
@@ -1100,7 +1100,7 @@ public class Props
public int? AmmoShiftChance { get; set; }
[JsonPropertyName("casingName")]
public string CasingName { get; set; }
public string? CasingName { get; set; }
[JsonPropertyName("casingEjectPower")]
public int? CasingEjectPower { get; set; }
@@ -1109,7 +1109,7 @@ public class Props
public int? CasingMass { get; set; }
[JsonPropertyName("casingSounds")]
public string CasingSounds { get; set; }
public string? CasingSounds { get; set; }
[JsonPropertyName("projectileCount")]
public int? ProjectileCount { get; set; }
@@ -1136,7 +1136,7 @@ public class Props
public bool? Tracer { get; set; }
[JsonPropertyName("tracerColor")]
public string TracerColor { get; set; }
public string? TracerColor { get; set; }
[JsonPropertyName("tracerDistance")]
public int? TracerDistance { get; set; }
@@ -1145,7 +1145,7 @@ public class Props
public int? ArmorDamage { get; set; }
[JsonPropertyName("caliber")]
public string Caliber { get; set; }
public string? Caliber { get; set; }
[JsonPropertyName("staminaBurnPerDamage")]
public int? StaminaBurnPerDamage { get; set; }
@@ -1184,7 +1184,7 @@ public class Props
public bool? ShowHitEffectOnExplode { get; set; }
[JsonPropertyName("explosionType")]
public string ExplosionType { get; set; }
public string? ExplosionType { get; set; }
[JsonPropertyName("ammoLifeTimeSec")]
public int? AmmoLifeTimeSec { get; set; }
@@ -1193,13 +1193,13 @@ public class Props
public string AmmoTooltipClass { get; set; }
[JsonPropertyName("contusion")]
public XYZ Contusion { get; set; }
public XYZ? Contusion { get; set; }
[JsonPropertyName("armorDistanceDistanceDamage")]
public XYZ ArmorDistanceDistanceDamage { get; set; }
public XYZ? ArmorDistanceDistanceDamage { get; set; }
[JsonPropertyName("blindness")]
public XYZ Blindness { get; set; }
public XYZ? Blindness { get; set; }
[JsonPropertyName("isLightAndSoundShot")]
public bool? IsLightAndSoundShot { get; set; }
@@ -1220,10 +1220,10 @@ public class Props
public int? MalfFeedChance { get; set; }
[JsonPropertyName("stackSlots")]
public StackSlot[] StackSlots { get; set; }
public List<StackSlot>? StackSlots { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
public string? Type { get; set; }
[JsonPropertyName("eqMin")]
public int? EqMin { get; set; }
@@ -1235,7 +1235,7 @@ public class Props
public int? Rate { get; set; }
[JsonPropertyName("throwType")]
public string ThrowType { get; set; }
public string? ThrowType { get; set; }
[JsonPropertyName("explDelay")]
public int? ExplDelay { get; set; }
@@ -1262,16 +1262,16 @@ public class Props
public int? MinTimeToContactExplode { get; set; }
[JsonPropertyName("explosionEffectType")]
public string ExplosionEffectType { get; set; }
public string? ExplosionEffectType { get; set; }
[JsonPropertyName("linkedWeapon")]
public string LinkedWeapon { get; set; }
public string? LinkedWeapon { get; set; }
[JsonPropertyName("useAmmoWithoutShell")]
public bool? UseAmmoWithoutShell { get; set; }
[JsonPropertyName("randomLootSettings")]
public RandomLootSettings RandomLootSettings { get; set; }
public RandomLootSettings? RandomLootSettings { get; set; }
[JsonPropertyName("recoilDampingHandRotation")]
public int? RecoilDampingHandRotation { get; set; }
@@ -1283,16 +1283,16 @@ public class Props
public bool? RemoveShellAfterFire { get; set; }
[JsonPropertyName("repairStrategyTypes")]
public List<string> RepairStrategyTypes { get; set; }
public List<string>? RepairStrategyTypes { get; set; }
[JsonPropertyName("isEncoded")]
public bool? IsEncoded { get; set; }
[JsonPropertyName("layoutName")]
public string LayoutName { get; set; }
public string? LayoutName { get; set; }
[JsonPropertyName("lower75Prefab")]
public Prefab Lower75Prefab { get; set; }
public Prefab? Lower75Prefab { get; set; }
[JsonPropertyName("maxUsages")]
public int? MaxUsages { get; set; }
@@ -1364,85 +1364,85 @@ public class WeaponRecoilTransformationCurve
public class WeaponRecoilTransformationCurveKey
{
[JsonPropertyName("inTangent")]
public double InTangent { get; set; }
public double? InTangent { get; set; }
[JsonPropertyName("outTangent")]
public double OutTangent { get; set; }
public double? OutTangent { get; set; }
[JsonPropertyName("time")]
public double Time { get; set; }
public double? Time { get; set; }
[JsonPropertyName("value")]
public double Value { get; set; }
public double? Value { get; set; }
}
public class HealthEffect
{
[JsonPropertyName("type")]
public string Type { get; set; }
public string? Type { get; set; }
[JsonPropertyName("value")]
public double Value { get; set; }
public double? Value { get; set; }
}
public class Prefab
{
[JsonPropertyName("path")]
public string Path { get; set; }
public string? Path { get; set; }
[JsonPropertyName("rcid")]
public string Rcid { get; set; }
public string? Rcid { get; set; }
}
public class Grid
{
[JsonPropertyName("_name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("_parent")]
public string Parent { get; set; }
public string? Parent { get; set; }
[JsonPropertyName("_props")]
public GridProps Props { get; set; }
public GridProps? Props { get; set; }
[JsonPropertyName("_proto")]
public string Proto { get; set; }
public string? Proto { get; set; }
}
public class GridProps
{
[JsonPropertyName("filters")]
public List<GridFilter> Filters { get; set; }
public List<GridFilter>? Filters { get; set; }
[JsonPropertyName("cellsH")]
public int CellsH { get; set; }
public int? CellsH { get; set; }
[JsonPropertyName("cellsV")]
public int CellsV { get; set; }
public int? CellsV { get; set; }
[JsonPropertyName("minCount")]
public int MinCount { get; set; }
public int? MinCount { get; set; }
[JsonPropertyName("maxCount")]
public int MaxCount { get; set; }
public int? MaxCount { get; set; }
[JsonPropertyName("maxWeight")]
public int MaxWeight { get; set; }
public int? MaxWeight { get; set; }
[JsonPropertyName("isSortingTable")]
public bool IsSortingTable { get; set; }
public bool? IsSortingTable { get; set; }
}
public class GridFilter
{
[JsonPropertyName("Filter")]
public List<string> Filter { get; set; }
public List<string>? Filter { get; set; }
[JsonPropertyName("ExcludedFilter")]
public List<string> ExcludedFilter { get; set; }
public List<string>? ExcludedFilter { get; set; }
[JsonPropertyName("locked")]
public bool? Locked { get; set; }
@@ -1451,16 +1451,16 @@ public class GridFilter
public class Slot
{
[JsonPropertyName("_name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("_parent")]
public string Parent { get; set; }
public string? Parent { get; set; }
[JsonPropertyName("_props")]
public SlotProps Props { get; set; }
public SlotProps? Props { get; set; }
[JsonPropertyName("_max_count")]
public int? MaxCount { get; set; }
@@ -1472,13 +1472,13 @@ public class Slot
public bool? MergeSlotWithChildren { get; set; }
[JsonPropertyName("_proto")]
public string Proto { get; set; }
public string? Proto { get; set; }
}
public class SlotProps
{
[JsonPropertyName("filters")]
public List<SlotFilter> Filters { get; set; }
public List<SlotFilter>? Filters { get; set; }
[JsonPropertyName("MaxStackCount")]
public int? MaxStackCount { get; set; }
@@ -1493,16 +1493,16 @@ public class SlotFilter
public bool? Locked { get; set; }
[JsonPropertyName("Plate")]
public string Plate { get; set; }
public string? Plate { get; set; }
[JsonPropertyName("armorColliders")]
public List<string> ArmorColliders { get; set; }
public List<string>? ArmorColliders { get; set; }
[JsonPropertyName("armorPlateColliders")]
public List<string> ArmorPlateColliders { get; set; }
public List<string>? ArmorPlateColliders { get; set; }
[JsonPropertyName("Filter")]
public List<string> Filter { get; set; }
public List<string>? Filter { get; set; }
[JsonPropertyName("AnimationIndex")]
public int? AnimationIndex { get; set; }
@@ -1514,19 +1514,19 @@ public class StackSlot
public string? Name { get; set; }
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("_parent")]
public string Parent { get; set; }
public string? Parent { get; set; }
[JsonPropertyName("_max_count")]
public int MaxCount { get; set; }
public int? MaxCount { get; set; }
[JsonPropertyName("_props")]
public StackSlotProps Props { get; set; }
public StackSlotProps? Props { get; set; }
[JsonPropertyName("_proto")]
public string Proto { get; set; }
public string? Proto { get; set; }
[JsonPropertyName("upd")]
public object? Upd { get; set; } // TODO: object here
@@ -1535,91 +1535,91 @@ public class StackSlot
public class StackSlotProps
{
[JsonPropertyName("filters")]
public List<SlotFilter> Filters { get; set; }
public List<SlotFilter>? Filters { get; set; }
}
public class RandomLootSettings {
[JsonPropertyName("allowToSpawnIdenticalItems")]
public bool AllowToSpawnIdenticalItems { get; set; }
public bool? AllowToSpawnIdenticalItems { get; set; }
[JsonPropertyName("allowToSpawnQuestItems")]
public bool AllowToSpawnQuestItems { get; set; }
public bool? AllowToSpawnQuestItems { get; set; }
[JsonPropertyName("countByRarity")]
public List<object> CountByRarity { get; set; } // TODO: object here
public List<object>? CountByRarity { get; set; } // TODO: object here
[JsonPropertyName("excluded")]
public RandomLootExcluded Excluded { get; set; }
public RandomLootExcluded? Excluded { get; set; }
[JsonPropertyName("filters")]
public List<object> Filters { get; set; } // TODO: object here
public List<object>? Filters { get; set; } // TODO: object here
[JsonPropertyName("findInRaid")]
public bool FindInRaid { get; set; }
public bool? FindInRaid { get; set; }
[JsonPropertyName("maxCount")]
public int MaxCount { get; set; }
public int? MaxCount { get; set; }
[JsonPropertyName("minCount")]
public int MinCount { get; set; }
public int? MinCount { get; set; }
}
public class RandomLootExcluded {
[JsonPropertyName("categoryTemplates")]
public List<object> CategoryTemplates { get; set; } // TODO: object here
public List<object>? CategoryTemplates { get; set; } // TODO: object here
[JsonPropertyName("rarity")]
public List<string> Rarity { get; set; }
public List<string>? Rarity { get; set; }
[JsonPropertyName("templates")]
public List<object> Templates { get; set; } // TODO: object here
public List<object>? Templates { get; set; } // TODO: object here
}
public class EffectsHealth {
[JsonPropertyName("Energy")]
public EffectsHealthProps Energy { get; set; }
public EffectsHealthProps? Energy { get; set; }
[JsonPropertyName("Hydration")]
public EffectsHealthProps Hydration { get; set; }
public EffectsHealthProps? Hydration { get; set; }
}
public class EffectsHealthProps {
[JsonPropertyName("value")]
public int Value { get; set; }
public int? Value { get; set; }
}
public class EffectsDamage {
[JsonPropertyName("Pain")]
public EffectDamageProps Pain { get; set; }
public EffectDamageProps? Pain { get; set; }
[JsonPropertyName("LightBleeding")]
public EffectDamageProps LightBleeding { get; set; }
public EffectDamageProps? LightBleeding { get; set; }
[JsonPropertyName("HeavyBleeding")]
public EffectDamageProps HeavyBleeding { get; set; }
public EffectDamageProps? HeavyBleeding { get; set; }
[JsonPropertyName("Contusion")]
public EffectDamageProps Contusion { get; set; }
public EffectDamageProps? Contusion { get; set; }
[JsonPropertyName("RadExposure")]
public EffectDamageProps RadExposure { get; set; }
public EffectDamageProps? RadExposure { get; set; }
[JsonPropertyName("Fracture")]
public EffectDamageProps Fracture { get; set; }
public EffectDamageProps? Fracture { get; set; }
[JsonPropertyName("DestroyedPart")]
public EffectDamageProps DestroyedPart { get; set; }
public EffectDamageProps? DestroyedPart { get; set; }
}
public class EffectDamageProps {
[JsonPropertyName("delay")]
public int Delay { get; set; }
public int? Delay { get; set; }
[JsonPropertyName("duration")]
public int Duration { get; set; }
public int? Duration { get; set; }
[JsonPropertyName("fadeOut")]
public int FadeOut { get; set; }
public int? FadeOut { get; set; }
[JsonPropertyName("cost")]
public int? Cost { get; set; }
@@ -1633,33 +1633,33 @@ public class EffectDamageProps {
public class Color {
[JsonPropertyName("r")]
public int R { get; set; }
public int? R { get; set; }
[JsonPropertyName("g")]
public int G { get; set; }
public int? G { get; set; }
[JsonPropertyName("b")]
public int B { get; set; }
public int? B { get; set; }
[JsonPropertyName("a")]
public int A { get; set; }
public int? A { get; set; }
}
public class ShotsGroupSettings {
[JsonPropertyName("EndShotIndex")]
public int EndShotIndex { get; set; }
public int? EndShotIndex { get; set; }
[JsonPropertyName("ShotRecoilPositionStrength")]
public XYZ ShotRecoilPositionStrength { get; set; }
public XYZ? ShotRecoilPositionStrength { get; set; }
[JsonPropertyName("ShotRecoilRadianRange")]
public XYZ ShotRecoilRadianRange { get; set; }
public XYZ? ShotRecoilRadianRange { get; set; }
[JsonPropertyName("ShotRecoilRotationStrength")]
public XYZ ShotRecoilRotationStrength { get; set; }
public XYZ? ShotRecoilRotationStrength { get; set; }
[JsonPropertyName("StartShotIndex")]
public int StartShotIndex { get; set; }
public int? StartShotIndex { get; set; }
}
public enum ItemType {
+77 -77
View File
@@ -10,10 +10,10 @@ public class Trader
public TraderAssort? Assort { get; set; }
[JsonPropertyName("base")]
public TraderBase Base { get; set; }
public TraderBase? Base { get; set; }
[JsonPropertyName("dialogue")]
public Dictionary<string, string[]>? Dialogue { get; set; }
public Dictionary<string, List<string>>? Dialogue { get; set; }
[JsonPropertyName("questassort")]
public Dictionary<string, Dictionary<string, string>>? QuestAssort { get; set; }
@@ -28,55 +28,55 @@ public class Trader
public class TraderBase
{
[JsonPropertyName("refreshTraderRagfairOffers")]
public bool RefreshTraderRagfairOffers { get; set; }
public bool? RefreshTraderRagfairOffers { get; set; }
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("availableInRaid")]
public bool AvailableInRaid { get; set; }
public bool? AvailableInRaid { get; set; }
[JsonPropertyName("avatar")]
public string Avatar { get; set; }
public string? Avatar { get; set; }
[JsonPropertyName("balance_dol")]
public decimal BalanceDollar { get; set; }
public decimal? BalanceDollar { get; set; }
[JsonPropertyName("balance_eur")]
public decimal BalanceEuro { get; set; }
public decimal? BalanceEuro { get; set; }
[JsonPropertyName("balance_rub")]
public decimal BalanceRub { get; set; }
public decimal? BalanceRub { get; set; }
[JsonPropertyName("buyer_up")]
public bool BuyerUp { get; set; }
public bool? BuyerUp { get; set; }
[JsonPropertyName("currency")]
public string Currency { get; set; }
public string? Currency { get; set; }
[JsonPropertyName("customization_seller")]
public bool CustomizationSeller { get; set; }
public bool? CustomizationSeller { get; set; }
[JsonPropertyName("discount")]
public decimal Discount { get; set; }
public decimal? Discount { get; set; }
[JsonPropertyName("discount_end")]
public decimal DiscountEnd { get; set; }
public decimal? DiscountEnd { get; set; }
[JsonPropertyName("gridHeight")]
public int GridHeight { get; set; }
public int? GridHeight { get; set; }
[JsonPropertyName("sell_modifier_for_prohibited_items")]
public decimal? SellModifierForProhibitedItems { get; set; }
[JsonPropertyName("insurance")]
public TraderInsurance Insurance { get; set; }
public TraderInsurance? Insurance { get; set; }
[JsonPropertyName("items_buy")]
public ItemBuyData ItemsBuy { get; set; }
public ItemBuyData? ItemsBuy { get; set; }
[JsonPropertyName("items_buy_prohibited")]
public ItemBuyData ItemsBuyProhibited { get; set; }
public ItemBuyData? ItemsBuyProhibited { get; set; }
[JsonPropertyName("isCanTransferItems")]
public bool? IsCanTransferItems { get; set; }
@@ -88,136 +88,136 @@ public class TraderBase
public ItemBuyData? ProhibitedTransferableItems { get; set; }
[JsonPropertyName("location")]
public string Location { get; set; }
public string? Location { get; set; }
[JsonPropertyName("loyaltyLevels")]
public List<TraderLoyaltyLevel> LoyaltyLevels { get; set; }
public List<TraderLoyaltyLevel>? LoyaltyLevels { get; set; }
[JsonPropertyName("medic")]
public bool Medic { get; set; }
public bool? Medic { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("nextResupply")]
public int NextResupply { get; set; }
public int? NextResupply { get; set; }
[JsonPropertyName("nickname")]
public string Nickname { get; set; }
public string? Nickname { get; set; }
[JsonPropertyName("repair")]
public TraderRepair Repair { get; set; }
public TraderRepair? Repair { get; set; }
[JsonPropertyName("sell_category")]
public List<string> SellCategory { get; set; }
public List<string>? SellCategory { get; set; }
[JsonPropertyName("surname")]
public string Surname { get; set; }
public string? Surname { get; set; }
[JsonPropertyName("unlockedByDefault")]
public bool UnlockedByDefault { get; set; }
public bool? UnlockedByDefault { get; set; }
}
public class ItemBuyData
{
[JsonPropertyName("category")]
public List<string> Category { get; set; }
public List<string>? Category { get; set; }
[JsonPropertyName("id_list")]
public List<string> IdList { get; set; }
public List<string>? IdList { get; set; }
}
public class TraderInsurance
{
[JsonPropertyName("availability")]
public bool Availability { get; set; }
public bool? Availability { get; set; }
[JsonPropertyName("excluded_category")]
public List<string> ExcludedCategory { get; set; }
public List<string>? ExcludedCategory { get; set; }
[JsonPropertyName("max_return_hour")]
public int MaxReturnHour { get; set; }
public int? MaxReturnHour { get; set; }
[JsonPropertyName("max_storage_time")]
public int MaxStorageTime { get; set; }
public int? MaxStorageTime { get; set; }
[JsonPropertyName("min_payment")]
public int MinPayment { get; set; }
public int? MinPayment { get; set; }
[JsonPropertyName("min_return_hour")]
public int MinReturnHour { get; set; }
public int? MinReturnHour { get; set; }
}
public class TraderLoyaltyLevel
{
[JsonPropertyName("buy_price_coef")]
public int BuyPriceCoefficient { get; set; }
public int? BuyPriceCoefficient { get; set; }
[JsonPropertyName("exchange_price_coef")]
public int ExchangePriceCoefficient { get; set; }
public int? ExchangePriceCoefficient { get; set; }
[JsonPropertyName("heal_price_coef")]
public int HealPriceCoefficient { get; set; }
public int? HealPriceCoefficient { get; set; }
[JsonPropertyName("insurance_price_coef")]
public int InsurancePriceCoefficient { get; set; }
public int? InsurancePriceCoefficient { get; set; }
[JsonPropertyName("minLevel")]
public int MinLevel { get; set; }
public int? MinLevel { get; set; }
[JsonPropertyName("minSalesSum")]
public int MinSalesSum { get; set; }
public int? MinSalesSum { get; set; }
[JsonPropertyName("minStanding")]
public int MinStanding { get; set; }
public int? MinStanding { get; set; }
[JsonPropertyName("repair_price_coef")]
public int RepairPriceCoefficient { get; set; }
public int? RepairPriceCoefficient { get; set; }
}
public class TraderRepair
{
[JsonPropertyName("availability")]
public bool Availability { get; set; }
public bool? Availability { get; set; }
[JsonPropertyName("currency")]
public string Currency { get; set; }
public string? Currency { get; set; }
[JsonPropertyName("currency_coefficient")]
public double CurrencyCoefficient { get; set; }
public double? CurrencyCoefficient { get; set; }
[JsonPropertyName("excluded_category")]
public List<string> ExcludedCategory { get; set; }
public List<string>? ExcludedCategory { get; set; }
[JsonPropertyName("excluded_id_list")]
public List<string> ExcludedIdList { get; set; } // Doesn't exist in client object
public List<string>? ExcludedIdList { get; set; } // Doesn't exist in client object
[JsonPropertyName("quality")]
public int Quality { get; set; }
public int? Quality { get; set; }
}
public class TraderAssort
{
[JsonPropertyName("nextResupply")]
public int NextResupply { get; set; }
public int? NextResupply { get; set; }
[JsonPropertyName("items")]
public List<Item> Items { get; set; }
public List<Item>? Items { get; set; }
[JsonPropertyName("barter_scheme")]
public Dictionary<string, List<List<BarterScheme>>> BarterScheme { get; set; }
public Dictionary<string, List<List<BarterScheme>>>? BarterScheme { get; set; }
[JsonPropertyName("loyal_level_items")]
public Dictionary<string, int> LoyalLevelItems { get; set; }
public Dictionary<string, int>? LoyalLevelItems { get; set; }
}
public class BarterScheme
{
[JsonPropertyName("count")]
public int Count { get; set; }
public int? Count { get; set; }
[JsonPropertyName("_tpl")]
public string Template { get; set; }
public string? Template { get; set; }
[JsonPropertyName("onlyFunctional")]
public bool? OnlyFunctional { get; set; }
@@ -235,71 +235,71 @@ public class BarterScheme
public class Suit
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("externalObtain")]
public bool ExternalObtain { get; set; }
public bool? ExternalObtain { get; set; }
[JsonPropertyName("internalObtain")]
public bool InternalObtain { get; set; }
public bool? InternalObtain { get; set; }
[JsonPropertyName("isHiddenInPVE")]
public bool IsHiddenInPVE { get; set; }
public bool? IsHiddenInPVE { get; set; }
[JsonPropertyName("tid")]
public string Tid { get; set; }
public string? Tid { get; set; }
[JsonPropertyName("suiteId")]
public string SuiteId { get; set; }
public string? SuiteId { get; set; }
[JsonPropertyName("isActive")]
public bool IsActive { get; set; }
public bool? IsActive { get; set; }
[JsonPropertyName("requirements")]
public SuitRequirements Requirements { get; set; }
public SuitRequirements? Requirements { get; set; }
}
public class SuitRequirements
{
[JsonPropertyName("achievementRequirements")]
public List<string> AchievementRequirements { get; set; }
public List<string>? AchievementRequirements { get; set; }
[JsonPropertyName("loyaltyLevel")]
public int LoyaltyLevel { get; set; }
public int? LoyaltyLevel { get; set; }
[JsonPropertyName("profileLevel")]
public int ProfileLevel { get; set; }
public int? ProfileLevel { get; set; }
[JsonPropertyName("standing")]
public int Standing { get; set; }
public int? Standing { get; set; }
[JsonPropertyName("skillRequirements")]
public List<string> SkillRequirements { get; set; }
public List<string>? SkillRequirements { get; set; }
[JsonPropertyName("questRequirements")]
public List<string> QuestRequirements { get; set; }
public List<string>? QuestRequirements { get; set; }
[JsonPropertyName("itemRequirements")]
public List<ItemRequirement> ItemRequirements { get; set; }
public List<ItemRequirement>? ItemRequirements { get; set; }
[JsonPropertyName("requiredTid")]
public string RequiredTid { get; set; }
public string? RequiredTid { get; set; }
}
public class ItemRequirement
{
[JsonPropertyName("count")]
public int Count { get; set; }
public int? Count { get; set; }
[JsonPropertyName("_tpl")]
public string Tpl { get; set; }
public string? Tpl { get; set; }
[JsonPropertyName("id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("onlyFunctional")]
public bool OnlyFunctional { get; set; }
public bool ?OnlyFunctional { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
public string? Type { get; set; }
}
+2 -2
View File
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Common;
public class XY
{
[JsonPropertyName("x")]
public double X { get; set; }
public double? X { get; set; }
[JsonPropertyName("y")]
public double Y { get; set; }
public double? Y { get; set; }
}
+3 -3
View File
@@ -5,11 +5,11 @@ namespace Core.Models.Eft.Common;
public class XYZ
{
[JsonPropertyName("x")]
public double X { get; set; }
public double? X { get; set; }
[JsonPropertyName("y")]
public double Y { get; set; }
public double? Y { get; set; }
[JsonPropertyName("z")]
public double Z { get; set; }
public double? Z { get; set; }
}
@@ -4,24 +4,24 @@ namespace Core.Models.Eft.Customization;
public class BuyClothingRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "CustomizationBuy";
[JsonPropertyName("Action")]
public string Action { get; set; } = "CustomizationBuy";
[JsonPropertyName("offer")]
public string Offer { get; set; }
[JsonPropertyName("offer")]
public string? Offer { get; set; }
[JsonPropertyName("items")]
public List<PaymentItemForClothing> Items { get; set; }
[JsonPropertyName("items")]
public List<PaymentItemForClothing>? Items { get; set; }
}
public class PaymentItemForClothing
{
[JsonPropertyName("del")]
public bool Del { get; set; }
[JsonPropertyName("del")]
public bool? Del { get; set; }
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("id")]
public string? Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("count")]
public int? Count { get; set; }
}
@@ -4,21 +4,21 @@ namespace Core.Models.Eft.Customization;
public class CustomizationSetRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "CustomizationSet";
[JsonPropertyName("Action")]
public string Action { get; set; } = "CustomizationSet";
[JsonPropertyName("customizations")]
public List<CustomizationSetOption> Customizations { get; set; }
[JsonPropertyName("customizations")]
public List<CustomizationSetOption>? Customizations { get; set; }
}
public class CustomizationSetOption
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("id")]
public string? Id { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("type")]
public string? Type { get; set; }
[JsonPropertyName("source")]
public string Source { get; set; }
[JsonPropertyName("source")]
public string? Source { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Customization;
public class GetSuitsResponse
{
[JsonPropertyName("_id")]
public string Id { get; set; }
public string? Id { get; set; }
[JsonPropertyName("suites")]
public List<string> Suites { get; set; }
public List<string>? Suites { get; set; }
}
@@ -17,5 +17,5 @@ public class DeclineFriendRequestData : BaseFriendRequest
public class BaseFriendRequest
{
[JsonPropertyName("profileId")]
public string ProfileId { get; set; }
public string? ProfileId { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog;
public class AddUserGroupMailRequest
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
[JsonPropertyName("uid")]
public string Uid { get; set; }
public string? Uid { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog;
public class ChangeGroupMailOwnerRequest
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
[JsonPropertyName("uid")]
public string Uid { get; set; }
public string? Uid { get; set; }
}
+32 -32
View File
@@ -4,40 +4,40 @@ namespace Core.Models.Eft.Dialog;
public class ChatServer
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("RegistrationId")]
public int RegistrationId { get; set; }
[JsonPropertyName("VersionId")]
public string VersionId { get; set; }
[JsonPropertyName("Ip")]
public string Ip { get; set; }
[JsonPropertyName("Port")]
public int Port { get; set; }
[JsonPropertyName("DateTime")]
public long DateTime { get; set; }
[JsonPropertyName("Chats")]
public List<Chat> Chats { get; set; }
[JsonPropertyName("Regions")]
public List<string> Regions { get; set; }
/** Possibly removed */
[JsonPropertyName("IsDeveloper")]
public bool? IsDeveloper { get; set; }
[JsonPropertyName("_id")]
public string? Id { get; set; }
[JsonPropertyName("RegistrationId")]
public int? RegistrationId { get; set; }
[JsonPropertyName("VersionId")]
public string? VersionId { get; set; }
[JsonPropertyName("Ip")]
public string? Ip { get; set; }
[JsonPropertyName("Port")]
public int? Port { get; set; }
[JsonPropertyName("DateTime")]
public long? DateTime { get; set; }
[JsonPropertyName("Chats")]
public List<Chat>? Chats { get; set; }
[JsonPropertyName("Regions")]
public List<string>? Regions { get; set; }
/** Possibly removed */
[JsonPropertyName("IsDeveloper")]
public bool? IsDeveloper { get; set; }
}
public class Chat
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("Members")]
public int Members { get; set; }
[JsonPropertyName("_id")]
public string? Id { get; set; }
[JsonPropertyName("Members")]
public int? Members { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class ClearMailMessageRequest
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog;
public class CreateGroupMailRequest
{
[JsonPropertyName("Name")]
public string Name { get; set; }
public string? Name { get; set; }
[JsonPropertyName("Users")]
public List<string> Users { get; set; }
public List<string>? Users { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class DeleteFriendRequest
{
[JsonPropertyName("friend_id")]
public string FriendId { get; set; }
public string? FriendId { get; set; }
}
+3 -3
View File
@@ -5,11 +5,11 @@ namespace Core.Models.Eft.Dialog;
public class FriendRequestData
{
[JsonPropertyName("status")]
public int Status { get; set; }
public int? Status { get; set; }
[JsonPropertyName("requestId")]
public string RequestId { get; set; }
public string? RequestId { get; set; }
[JsonPropertyName("retryAfter")]
public int RetryAfter { get; set; }
public int? RetryAfter { get; set; }
}
@@ -4,12 +4,12 @@ namespace Core.Models.Eft.Dialog;
public class FriendRequestSendResponse
{
[JsonPropertyName("status")]
public int Status { get; set; }
[JsonPropertyName("status")]
public int? Status { get; set; }
[JsonPropertyName("requestId")]
public string RequestId { get; set; }
[JsonPropertyName("requestId")]
public string? RequestId { get; set; }
[JsonPropertyName("retryAfter")]
public int RetryAfter { get; set; }
[JsonPropertyName("retryAfter")]
public int? RetryAfter { get; set; }
}
@@ -5,12 +5,12 @@ namespace Core.Models.Eft.Dialog;
public class GetAllAttachmentsResponse
{
[JsonPropertyName("messages")]
public List<Message> Messages { get; set; }
[JsonPropertyName("messages")]
public List<Message>? Messages { get; set; }
[JsonPropertyName("profiles")]
public List<object> Profiles { get; set; } // Assuming 'any' translates to 'object'
[JsonPropertyName("profiles")]
public List<object> Profiles { get; set; } // Assuming 'any' translates to 'object'
[JsonPropertyName("hasMessagesWithRewards")]
public bool HasMessagesWithRewards { get; set; }
[JsonPropertyName("hasMessagesWithRewards")]
public bool? HasMessagesWithRewards { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class GetChatServerListRequestData
{
[JsonPropertyName("VersionId")]
public string VersionId { get; set; }
public string? VersionId { get; set; }
}
@@ -5,12 +5,12 @@ namespace Core.Models.Eft.Dialog;
public class GetFriendListDataResponse
{
[JsonPropertyName("Friends")]
public List<UserDialogInfo> Friends { get; set; }
[JsonPropertyName("Friends")]
public List<UserDialogInfo>? Friends { get; set; }
[JsonPropertyName("Ignore")]
public List<string> Ignore { get; set; }
[JsonPropertyName("Ignore")]
public List<string>? Ignore { get; set; }
[JsonPropertyName("InIgnoreList")]
public List<string> InIgnoreList { get; set; }
[JsonPropertyName("InIgnoreList")]
public List<string>? InIgnoreList { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class GetMailDialogInfoRequestData
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog;
public class GetMailDialogListRequestData
{
[JsonPropertyName("limit")]
public int Limit { get; set; }
public int? Limit { get; set; }
[JsonPropertyName("offset")]
public int Offset { get; set; }
public int? Offset { get; set; }
}
@@ -5,15 +5,15 @@ namespace Core.Models.Eft.Dialog;
public class GetMailDialogViewRequestData
{
[JsonPropertyName("type")]
public MessageType Type { get; set; }
[JsonPropertyName("type")]
public MessageType? Type { get; set; }
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
[JsonPropertyName("dialogId")]
public string? DialogId { get; set; }
[JsonPropertyName("limit")]
public int Limit { get; set; }
[JsonPropertyName("limit")]
public int? Limit { get; set; }
[JsonPropertyName("time")]
public decimal Time { get; set; } // decimal
[JsonPropertyName("time")]
public decimal Time { get; set; } // decimal
}
@@ -5,12 +5,12 @@ namespace Core.Models.Eft.Dialog;
public class GetMailDialogViewResponseData
{
[JsonPropertyName("messages")]
public List<Message> Messages { get; set; }
[JsonPropertyName("messages")]
public List<Message>? Messages { get; set; }
[JsonPropertyName("profiles")]
public List<UserDialogInfo> Profiles { get; set; }
[JsonPropertyName("profiles")]
public List<UserDialogInfo>? Profiles { get; set; }
[JsonPropertyName("hasMessagesWithRewards")]
public bool HasMessagesWithRewards { get; set; }
[JsonPropertyName("hasMessagesWithRewards")]
public bool? HasMessagesWithRewards { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class PinDialogRequestData
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class RemoveDialogRequestData
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class RemoveMailMessageRequest
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
}
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Dialog;
public class RemoveUserGroupMailRequest
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
[JsonPropertyName("uid")]
public string Uid { get; set; }
public string? Uid { get; set; }
}
+10 -9
View File
@@ -3,16 +3,17 @@ using Core.Models.Enums;
namespace Core.Models.Eft.Dialog;
public class SendMessageRequest {
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public class SendMessageRequest
{
[JsonPropertyName("dialogId")]
public string? DialogId { get; set; }
[JsonPropertyName("type")]
public MessageType Type { get; set; }
[JsonPropertyName("type")]
public MessageType? Type { get; set; }
[JsonPropertyName("text")]
public string Text { get; set; }
[JsonPropertyName("text")]
public string? Text { get; set; }
[JsonPropertyName("replyTo")]
public string ReplyTo { get; set; }
[JsonPropertyName("replyTo")]
public string? ReplyTo { get; set; }
}
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Dialog;
public class SetDialogReadRequestData
{
[JsonPropertyName("dialogId")]
public List<string> DialogId { get; set; }
public List<string>? DialogId { get; set; }
}
+1 -1
View File
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Ws;
public class WsAid : WsNotificationEvent
{
[JsonPropertyName("aid")]
public int Aid { get; set; }
public int? Aid { get; set; }
}
+2 -2
View File
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Ws;
public class WsAidNickname : WsNotificationEvent
{
[JsonPropertyName("aid")]
public int Aid { get; set; }
public int? Aid { get; set; }
[JsonPropertyName("Nickname")]
public string Nickname { get; set; }
public string? Nickname { get; set; }
}
+2 -2
View File
@@ -7,10 +7,10 @@ namespace Core.Models.Eft.Ws;
public class WsChatMessageReceived : WsNotificationEvent
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
public string? DialogId { get; set; }
[JsonPropertyName("message")]
public Message Message { get; set; }
public Message? Message { get; set; }
[JsonPropertyName("profiles")]
public List<GroupCharacter>? Profiles { get; set; }
+1 -1
View File
@@ -6,5 +6,5 @@ namespace Core.Models.Eft.Ws;
public class WsFriendsListAccept : WsNotificationEvent
{
[JsonPropertyName("profile")]
public SearchFriendResponse Profile { get; set; }
public SearchFriendResponse? Profile { get; set; }
}
+1 -1
View File
@@ -5,5 +5,5 @@ namespace Core.Models.Eft.Ws;
public class WsGroupId : WsNotificationEvent
{
[JsonPropertyName("groupId")]
public string GroupId { get; set; }
public string? GroupId { get; set; }
}
+29 -3
View File
@@ -9,14 +9,40 @@ namespace Core.Utils;
public class HashUtil
{
private readonly Regex MongoIdRegex = new Regex("^[a-fA-F0-9]{24}$");
private readonly RandomUtil _randomUtil;
public HashUtil(RandomUtil randomUtil)
{
_randomUtil = randomUtil;
}
/// <summary>
/// Create a 24 character id using the sha256 algorithm + current timestamp
/// Create a 24 character MongoId
/// </summary>
/// <returns>24 character hash</returns>
/// <returns>24 character objectId</returns>
public string Generate()
{
throw new NotImplementedException();
var objectId = new byte[12];
// Time stamp (4 bytes)
var timestamp = BitConverter.GetBytes((int)DateTimeOffset.UtcNow.ToUnixTimeSeconds());
// Convert to big-endian
Array.Reverse(timestamp);
Array.Copy(timestamp, 0, objectId, 0, 4);
// Random value (5 bytes)
var randomValue = new byte[5];
_randomUtil.Random.NextBytes(randomValue);
Array.Copy(randomValue, 0, objectId, 4, 5);
// Incrementing counter (3 bytes)
// 24-bit counter
var counter = BitConverter.GetBytes(_randomUtil.GetInt(0, 16777215));
Array.Reverse(counter);
Array.Copy(counter, 0, objectId, 9, 3);
return Convert.ToHexStringLower(objectId);
}
/// <summary>
+116
View File
@@ -0,0 +1,116 @@
using System.Numerics;
using Core.Annotations;
namespace Core.Utils;
[Injectable(InjectionType.Singleton)]
public class MathUtil
{
/// <summary>
/// Helper to create the sum of all list elements
/// </summary>
/// <param name="values">List of floats to sum</param>
/// <returns>sum of all values</returns>
public float ListSum(List<float> values)
{
// Sum the list starting with an initial value of 0
return values.Aggregate(0f, (sum, x) => sum + x);
}
/// <summary>
/// Helper to create the cumulative sum of all list elements
/// ListCumSum([1, 2, 3, 4]) = [1, 3, 6, 10]
/// </summary>
/// <param name="values">The list with numbers of which to calculate the cumulative sum</param>
/// <returns>cumulative sum of values</returns>
public List<float> ListCumSum(List<float> values)
{
var cumSumList = new List<float>(values.Count);
float sum = 0;
foreach (var value in values)
{
sum += value;
cumSumList.Add(sum);
}
return cumSumList;
}
/// <summary>
/// Helper to create the product of each element times factor
/// </summary>
/// <param name="values">The list of numbers which shall be multiplied by the factor</param>
/// <param name="factor">Number to multiply each element by</param>
/// <returns>A list of elements all multiplied by the factor</returns>
public List<float> ListProduct(List<float> values, float factor)
{
return values.Select(v => v * factor).ToList();
}
/// <summary>
/// Helper to add a constant to all list elements
/// </summary>
/// <param name="values">The list of numbers to which the summand should be added</param>
/// <param name="additive"></param>
/// <returns>A list of elements with the additive added to all elements</returns>
public List<float> ListAdd(List<float> values, float additive)
{
return values.Select(v => v + additive).ToList();
}
/// <summary>
/// Maps a value from an input range to an output range linearly.
///
/// Example:
/// a_min = 0; a_max=1;
/// b_min = 1; b_max=3;
/// MapToRange(0.5, a_min, a_max, b_min, b_max) // returns 2
///
/// </summary>
/// <param name="x">The value from the input range to be mapped to the output range.</param>
/// <param name="minIn">Minimum of the input range.</param>
/// <param name="maxIn">Maximum of the input range.</param>
/// <param name="minOut">Minimum of the output range.</param>
/// <param name="maxOut">Maximum of the output range.</param>
/// <returns>The result of the mapping.</returns>
public double MapToRange(double x, double minIn, double maxIn, double minOut, double maxOut)
{
var deltaIn = maxIn - minIn;
var deltaOut = maxOut - minOut;
var xScale = (x - minIn) / deltaIn;
return Math.Max(minOut, Math.Min(maxOut, minOut + xScale * deltaOut));
}
/// <summary>
/// Linear interpolation
/// e.g. used to do a continuous integration for quest rewards which are defined for specific support centers of pmcLevel
/// </summary>
/// <param name="xp">The point of x at which to interpolate</param>
/// <param name="x">Support points in x (of same length as y)</param>
/// <param name="y">Support points in y (of same length as x)</param>
/// <returns>Interpolated value at xp, or null if xp is out of bounds</returns>
public static double? Interp1(double xp, double[] x, double[] y)
{
if (xp > x[^1]) // ^1 is the last index in C#
{
return y[^1];
}
if (xp < x[0])
{
return y[0];
}
for (var i = 0; i < x.Length - 1; i++)
{
if (xp >= x[i] && xp <= x[i + 1])
{
return y[i] + (xp - x[i]) * (y[i + 1] - y[i]) / (x[i + 1] - x[i]);
}
}
return null;
}
}
+235 -9
View File
@@ -7,7 +7,13 @@ namespace Core.Utils;
[Injectable(InjectionType.Singleton)]
public class RandomUtil
{
private readonly Random _random = new();
public readonly Random Random = new();
/// <summary>
/// The IEEE-754 standard for double-precision floating-point numbers limits the number of digits (including both
/// integer + fractional parts) to about 1517 significant digits. 15 is a safe upper bound, so we'll use that.
/// </summary>
public const int MaxSignificantDigits = 15;
/// <summary>
/// Generates a random integer between the specified minimum and maximum values, inclusive.
@@ -24,7 +30,7 @@ public class RandomUtil
}
// maxVal is exclusive of the passed value, so add 1
return max > min ? _random.Next(min, max + 1) : min;
return max > min ? Random.Next(min, max + 1) : min;
}
/// <summary>
@@ -35,11 +41,11 @@ public class RandomUtil
/// <returns>A random integer between 1 and max - 1, or 1 if max is less than or equal to 1.</returns>
public int GetIntEx(int max)
{
return max > 2 ? _random.Next(1, max - 1) : 1;
return max > 2 ? Random.Next(1, max - 1) : 1;
}
/// <summary>
/// Generates a random floating-point number within the specified range.
/// Generates a random floating-point number within the specified range ~6-9 digits (4 bytes).
/// </summary>
/// <param name="min">The minimum value of the range (inclusive).</param>
/// <param name="max">The maximum value of the range (exclusive).</param>
@@ -48,6 +54,17 @@ public class RandomUtil
{
return (float)GetSecureRandomNumber() * (max - min) + min;
}
/// <summary>
/// Generates a random floating-point number within the specified range ~15-17 digits (8 bytes).
/// </summary>
/// <param name="min">The minimum value of the range (inclusive).</param>
/// <param name="max">The maximum value of the range (exclusive).</param>
/// <returns>A random floating-point number between `min` (inclusive) and `max` (exclusive).</returns>
public double GetDouble(double min, double max)
{
return GetSecureRandomNumber() * (max - min) + min;
}
/// <summary>
/// Generates a random boolean value.
@@ -110,9 +127,9 @@ public class RandomUtil
}
/// <summary>
/// Returns a random string from the provided collection of strings.
/// Returns a random type T from the provided collection of type T.
/// </summary>
/// <param name="collection"></param>
/// <param name="collection">The collection to get the random element from</param>
/// <typeparam name="T">The type of elements in the collection.</typeparam>
/// <returns>A random element from the collection.</returns>
/// <remarks>This was formerly getArrayValue() in the node server</remarks>
@@ -132,6 +149,211 @@ public class RandomUtil
{
return GetCollectionValue(dictionary.Keys);
}
/// <summary>
/// Gets a random val from the given dictionary
/// </summary>
/// <param name="dictionary">The dictionary from which to retrieve a value.</param>
/// <typeparam name="TKey">Type of key</typeparam>
/// <typeparam name="TVal">Type of Value</typeparam>
/// <returns>A random TVal representing one of the values of the dictionary.</returns>
public TVal GetVal<TKey, TVal>(Dictionary<TKey, TVal> dictionary) where TKey : notnull
{
return GetCollectionValue(dictionary.Values);
}
/// <summary>
/// Generates a normally distributed random number using the Box-Muller transform.
/// </summary>
/// <param name="mean">The mean (μ) of the normal distribution.</param>
/// <param name="sigma">The standard deviation (σ) of the normal distribution.</param>
/// <param name="attempt">The current attempt count to generate a valid number (default is 0).</param>
/// <returns>A normally distributed random number.</returns>
/// <remarks>
/// This function uses the Box-Muller transform to generate a normally distributed random number.
/// If the generated number is less than 0, it will recursively attempt to generate a valid number up to 100 times.
/// If it fails to generate a valid number after 100 attempts, it will return a random float between 0.01 and twice the mean.
/// </remarks>
public double GetNormallyDistributedRandomNumber(double mean, double sigma, int attempt = 0)
{
double u, v;
do
{
u = GetSecureRandomNumber();
} while (u == 0);
do
{
v = GetSecureRandomNumber();
} while (v == 0);
// Apply the Box-Muller transform
var w = Math.Sqrt(-2.0 * Math.Log(u)) * Math.Cos(2.0 * Math.PI * v);
var valueDrawn = mean + w * sigma;
// Check if the generated value is valid
if (valueDrawn < 0)
{
return attempt > 100
? GetDouble(0.01f, mean * 2f)
: GetNormallyDistributedRandomNumber(mean, sigma, attempt + 1);
}
return valueDrawn;
}
/// <summary>
/// Generates a random integer between the specified range.
/// </summary>
/// <param name="low">The lower bound of the range (inclusive).</param>
/// <param name="high">The upper bound of the range (exclusive). If not provided, the range will be from 0 to `low`.</param>
/// <returns>A random integer within the specified range.</returns>
public int RandInt(int low, int? high = null)
{
// Return a random integer from 0 to low if high is not provided
if (high is null)
{
return Random.Next(0, low);
}
// Return low directly when low and high are equal
return low == high
? low
: Random.Next(low, (int)high);
}
/// <summary>
/// Generates a random number between two given values with optional precision.
/// </summary>
/// <param name="val1">The first value to determine the range.</param>
/// <param name="val2">The second value to determine the range. If not provided, 0 is used.</param>
/// <param name="precision">
/// The number of decimal places to round the result to. Must be a positive integer between 0
/// and MaxSignificantDigits(15), inclusive. If not provided, precision is determined by the input values.
/// </param>
/// <returns></returns>
public double RandNum(double val1, double val2 = 0, byte? precision = null)
{
if (!double.IsFinite(val1) || !double.IsFinite(val2))
{
throw new ArgumentException("RandNum() parameters 'value1' and 'value2' must be finite numbers.");
}
// Determine the range
var min = Math.Min(val1, val2);
var max = Math.Max(val1, val2);
// Validate and adjust precision
if (precision is not null)
{
if (precision > MaxSignificantDigits)
{
throw new ArgumentOutOfRangeException(
nameof(precision), "Must be less than 16");
}
// Calculate the number of whole-number digits in the maximum absolute value of the range
var maxAbsoluteValue = Math.Max(Math.Abs(min), Math.Abs(max));
var wholeNumberDigits = (int)Math.Floor(Math.Log10(maxAbsoluteValue)) + 1;
var maxAllowedPrecision = Math.Max(0, MaxSignificantDigits - wholeNumberDigits);
if (precision > maxAllowedPrecision)
{
throw new ArgumentException(
$"RandNum() precision of {precision} exceeds the allowable precision ({maxAllowedPrecision}) for the given values."
);
}
}
var result = GetSecureRandomNumber() * (max - min) + min;
// Determine effective precision
var maxPrecision = Math.Max(GetNumberPrecision(val1), GetNumberPrecision(val2));
var effectivePrecision = precision ?? maxPrecision;
var factor = Math.Pow(2, effectivePrecision);
return Math.Round(result * factor) / factor;
}
/// <summary>
/// Draws a specified number of random elements from a given list.
/// </summary>
/// <param name="originalList">The list to draw elements from.</param>
/// <param name="count">The number of elements to draw. Defaults to 1.</param>
/// <param name="replacement">Whether to draw with replacement. Defaults to true.</param>
/// <typeparam name="T">The type of elements in the list.</typeparam>
/// <returns>A List containing the drawn elements.</returns>
public List<T> DrawRandomFromList<T>(List<T> originalList, int count = 1, bool replacement = true)
{
throw new NotImplementedException("ICloneable needs implemented on types before this can be written");
}
/// <summary>
/// Draws a specified number of random keys from a given dictionary.
/// </summary>
/// <param name="dict">The dictionary from which to draw keys.</param>
/// <param name="count">The number of keys to draw. Defaults to 1.</param>
/// <param name="replacement">Whether to draw with replacement. Defaults to true.</param>
/// <typeparam name="TKey">The type of elements in keys</typeparam>
/// <typeparam name="TVal">The type of elements in values</typeparam>
/// <returns>A list of randomly drawn keys from the dictionary.</returns>
public List<TKey> DrawRandomFromDict<TKey, TVal>(Dictionary<TKey, TVal> dict, int count = 1, bool replacement = true) where TKey : notnull
{
throw new NotImplementedException("ICloneable needs implemented on types before this can be written");
}
/// <summary>
/// Generates a biased random number within a specified range.
/// </summary>
/// <param name="min">The minimum value of the range (inclusive).</param>
/// <param name="max">The maximum value of the range (inclusive).</param>
/// <param name="shift">The bias shift to apply to the random number generation.</param>
/// <param name="n">The number of iterations to use for generating a Gaussian random number.</param>
/// <returns>A biased random number within the specified range.</returns>
public double GetBiasedRandomNumber(double min, double max, double shift, double n)
{
/***
* This function generates a random number based on a gaussian distribution with an option to add a bias via shifting.
*
* Here's an example graph of how the probabilities can be distributed:
* https://www.boost.org/doc/libs/1_49_0/libs/math/doc/sf_and_dist/graphs/normal_pdf.png
*
* Our parameter 'n' is sort of like σ (sigma) in the example graph.
*
* An 'n' of 1 means all values are equally likely. Increasing 'n' causes numbers near the edge to become less likely.
* By setting 'shift' to whatever 'max' is, we can make values near 'min' very likely, while values near 'max' become extremely unlikely.
*
* Here's a place where you can play around with the 'n' and 'shift' values to see how the distribution changes:
* http://jsfiddle.net/e08cumyx/
*/
throw new NotImplementedException("This honestly went over my head...");
}
/// <summary>
/// Shuffles a list in place using the Fisher-Yates algorithm.
/// </summary>
/// <param name="originalList">The list to shuffle.</param>
/// <typeparam name="T">The type of elements in the list.</typeparam>
/// <returns>The shuffled list.</returns>
public List<T> Shuffle<T>(List<T> originalList)
{
var currentIndex = originalList.Count;
while (currentIndex != 0)
{
var randomIndex = GetInt(0, currentIndex);
currentIndex--;
// Swap it with the current element.
(originalList[currentIndex], originalList[randomIndex]) = (originalList[randomIndex], originalList[currentIndex]);
}
return originalList;
}
/// <summary>
/// Generates a secure random number between 0 (inclusive) and 1 (exclusive).
@@ -158,7 +380,7 @@ public class RandomUtil
const ulong maxInt = 1UL << 48;
return (double)integer / maxInt;
return (double)Math.Abs(integer) / maxInt;
}
/// <summary>
@@ -166,8 +388,12 @@ public class RandomUtil
/// </summary>
/// <param name="num">The number to analyze.</param>
/// <returns>The number of decimal places, or 0 if none exist.</returns>
private static int GetNumberPrecision(double num)
public int GetNumberPrecision(double num)
{
return num.ToString().Split('.')[1]?.Length ?? 0;
var parts = num.ToString($"G{MaxSignificantDigits}").Split('.');
return parts.Length > 1
? parts[1].Length
: 0;
}
}
+56
View File
@@ -0,0 +1,56 @@
using Core.Utils;
namespace UnitTests.Tests.Utils;
[TestClass]
public class HashUtilTests
{
private readonly HashUtil _hashUtil = new(new RandomUtil());
[TestMethod]
public void GenerateTest()
{
// Generate 100 MongoId's
for (var i = 0; i < 100; i++)
{
// Invalid mongoId character
var result = _hashUtil.Generate();
// Invalid mongoId length
var test = _hashUtil.IsValidMongoId(result);
Assert.AreEqual(
true,
test,
$"IsValidMongoId() `{result}` is not a valid MongoId.");
}
}
[TestMethod]
public void IsValidMongoIdTest()
{
// Invalid mongoId character
var ResultBadChar = _hashUtil.IsValidMongoId("677ddb67406e9918a0264bbz");
Assert.AreEqual(
false,
ResultBadChar,
"IsValidMongoId() `677ddb67406e9918a0264bbz` contains invalid char `z`, but result was true");
// Invalid mongoId length
var resultBadLength = _hashUtil.IsValidMongoId("677ddb67406e9918a0264bbcc");
Assert.AreEqual(
false,
resultBadLength,
"IsValidMongoId() `677ddb67406e9918a0264bbcc` is 25 characters, but result was true");
// Valid mongoId
var resultPass = _hashUtil.IsValidMongoId("677ddb67406e9918a0264bbc");
Assert.AreEqual(
true,
resultPass,
"IsValidMongoId() `677ddb67406e9918a0264bbc` is a valid mongoId, but result was false");
}
}
+83
View File
@@ -0,0 +1,83 @@
using Core.Utils;
namespace UnitTests.Tests.Utils;
[TestClass]
public class MathUtilTests
{
private readonly MathUtil _mathUtil = new();
[TestMethod]
public void ListSumTest()
{
var test = new List<float> { 1.1f, 2.1f, 3.3f };
const float expected = 6.5f;
var actual = _mathUtil.ListSum(test);
Assert.AreEqual(expected, actual,
$"ListSum() Expected: {expected}, Actual: {actual}");
}
[TestMethod]
public void ListCumSumTest()
{
var test = new List<float> { 1f, 2f, 3f, 4f };
var expected = new List<float> { 1f, 3f, 6f, 10f };
var actual = _mathUtil.ListCumSum(test);
for (var i = 0; i < actual.Count; i++)
{
if (Math.Abs(expected[i] - actual[i]) > 0.00001f)
{
Assert.Fail($"ListCumSum() Expected: {string.Join(", ", expected)}, Actual: {string.Join(", ", actual)}");
}
}
}
[TestMethod]
public void ListProductTest()
{
var test = new List<float> { 1f, 2f, 3f, 4f };
var expected = new List<float> { 2f, 4f, 6f, 8f };
var actual = _mathUtil.ListProduct(test, 2);
for (var i = 0; i < actual.Count; i++)
{
if (Math.Abs(expected[i] - actual[i]) > 0.00001f)
{
Assert.Fail($"ListProduct() Expected: {string.Join(", ", expected)}, Actual: {string.Join(", ", actual)}");
}
}
}
[TestMethod]
public void ListAddTest()
{
var test = new List<float> { 1f, 2f, 3f, 4f };
var expected = new List<float> { 3f, 4f, 5f, 6f };
var actual = _mathUtil.ListAdd(test, 2);
for (var i = 0; i < actual.Count; i++)
{
if (Math.Abs(expected[i] - actual[i]) > 0.00001f)
{
Assert.Fail($"ListProduct() Expected: {string.Join(", ", expected)}, Actual: {string.Join(", ", actual)}");
}
}
}
[TestMethod]
public void MapToRangeTest()
{
const double expected = 2;
var actual = _mathUtil.MapToRange(0.5, 0, 1, 1, 3);
Assert.AreEqual(expected, actual,
$"MapToRange() Expected: {expected}, Actual: {actual}");
}
}
+146 -2
View File
@@ -17,7 +17,7 @@ public sealed class RandomUtilTests
if (result < 0 || result > 10)
{
Assert.Fail("GetInt() out of range.");
Assert.Fail($"GetInt(0, 10) out of range. Expected range [0, 10] but was {result}.");
}
}
}
@@ -32,8 +32,152 @@ public sealed class RandomUtilTests
if (result < 1 || result > 9)
{
Assert.Fail("GetIntEx() out of range.");
Assert.Fail($"GetInt(10) out of range. Expected range [1, 9] but was {result}.");
}
}
}
[TestMethod]
public void GetFloatTest()
{
// Run 100 test cases
for (var i = 0; i < 100; i++)
{
var result = _randomUtil.GetFloat(0f, 10f);
if (result < 0f || result >= 9f)
{
Assert.Fail($"GetFloat(0f, 10f) out of range. Expected range [0.0f, 9.999f] but was {result}.");
}
}
}
[TestMethod]
public void GetPercentOfValueTest()
{
const float expected = 45.5f;
var result = _randomUtil.GetPercentOfValue(45.5f, 100f);
Assert.AreEqual(
expected,
result,
0.0001f,
$"GetPercentOfValue(45.5f, 100f) out of range. Expected: {expected}. Actual: {result}.");
}
[TestMethod]
public void ReduceValueByPercentTest()
{
const float expected = 54.5f;
var result = _randomUtil.ReduceValueByPercent(100f, 45.5f);
Assert.AreEqual(
expected,
result,
0.0001f,
$"ReduceValueByPercent(100f, 45.5f) out of range. Expected: {expected}. Actual: {result}.");
}
[TestMethod]
public void GetChance100Test()
{
for (var i = 0; i < 100; i++)
{
const bool expectedTrue = true;
var resultTrue = _randomUtil.GetChance100(100f);
Assert.AreEqual(
expectedTrue,
resultTrue,
$"GetChance100(100f) out of range. Expected: {expectedTrue}. Actual: {resultTrue}.");
}
for (var i = 0; i < 100; i++)
{
const bool expectedFalse = false;
var resultFalse = _randomUtil.GetChance100(0f);
Assert.AreEqual(
expectedFalse,
resultFalse,
$"GetChance100(0f) out of range. Expected: {expectedFalse}. Actual: {resultFalse}.");
}
}
// TODO: Missing methods between these two
[TestMethod]
public void RandIntTest()
{
for (var i = 0; i < 100; i++)
{
var result = _randomUtil.RandInt(0, 10);
if (result < 0 || result > 9)
{
Assert.Fail($"RandInt(0, 10) out of range. Expected range [0, 9] but was {result}.");
}
}
for (var i = 0; i < 100; i++)
{
var result = _randomUtil.RandInt(10);
if (result < 0 || result > 9)
{
Assert.Fail($"RandInt(10, null) out of range. Expected range [0, 9] but was {result}.");
}
}
}
[TestMethod]
public void RandNumTest()
{
for (var i = 0; i < 100; i++)
{
var result = _randomUtil.RandNum(0, 10);
if (result < 0 || result > 9)
{
Assert.Fail($"RandNum(0, 10) out of range. Expected range [0, 9.999d] but was {result}.");
}
if (_randomUtil.GetNumberPrecision(result) > RandomUtil.MaxSignificantDigits)
{
Assert.Fail($"RandNum(0, 10) precision of {result} exceeds the allowable precision ({RandomUtil.MaxSignificantDigits}) for the given values.");
}
}
for (var i = 0; i < 100; i++)
{
var result = _randomUtil.RandNum(10);
if (result < 0 || result > 9)
{
Assert.Fail($"RandNum(10) out of range. Expected range [0, 9.999d] but was {result}.");
}
if (_randomUtil.GetNumberPrecision(result) > RandomUtil.MaxSignificantDigits)
{
Assert.Fail($"RandNum(10) precision of {result} exceeds the allowable precision ({RandomUtil.MaxSignificantDigits}) for the given values.");
}
}
}
[TestMethod]
public void ShuffleTest()
{
var testList = new List<int>()
{
1,2,3,4,5,6,7,8,9,10
};
var orig = new List<int>(testList);
var result = _randomUtil.Shuffle(testList);
Assert.IsFalse(
result.SequenceEqual(orig),
$"Shuffle test failed. Expected: {string.Join(", ", orig)}, but got {string.Join(", ", result)}");
}
}