diff --git a/Core/Helpers/AssortHelper.cs b/Core/Helpers/AssortHelper.cs index c479963d..67dba009 100644 --- a/Core/Helpers/AssortHelper.cs +++ b/Core/Helpers/AssortHelper.cs @@ -1,6 +1,61 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; + +namespace Core.Helpers; public class AssortHelper { - + /** + * Remove assorts from a trader that have not been unlocked yet (via player completing corresponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to + * @param traderAssorts All assort items from same trader + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts + */ + public TraderAssort StripLockedQuestAssort( + PmcData pmcProfile, + string traderId, + List traderAssorts, + Dictionary> mergedQuestAssorts, + bool flea = false) + { + throw new NotImplementedException(); + } + + /** + * Get a quest id + the statuses quest can be in to unlock assort + * @param mergedQuestAssorts quest assorts to search for assort id + * @param assortId Assort to look for linked quest id + * @returns quest id + array of quest status the assort should show for + */ + protected (string questId, QuestStatus[] status) GetQuestIdAndStatusThatShowAssort( + Dictionary> mergedQuestAssorts, + string assortId) + { + throw new NotImplementedException(); + } + + /** + * Remove assorts from a trader that have not been unlocked yet + * @param pmcProfile player profile + * @param traderId traders id + * @param assort traders assorts + * @returns traders assorts minus locked loyalty assorts + */ + public TraderAssort StripLockedLoyaltyAssort(PmcData pmcProfile, string traderId, List assort) + { + throw new NotImplementedException(); + } + + /** + * Remove an item from an assort + * @param assort assort to modify + * @param itemID item id to remove from assort + * @returns Modified assort + */ + public TraderAssort RemoveItemFromAssort(List assort, string itemID, bool flea = false) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/BotDifficultyHelper.cs b/Core/Helpers/BotDifficultyHelper.cs index 961d56a9..9c172c8e 100644 --- a/Core/Helpers/BotDifficultyHelper.cs +++ b/Core/Helpers/BotDifficultyHelper.cs @@ -1,6 +1,49 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common.Tables; +using Core.Models.Spt.Bots; + +namespace Core.Helpers; public class BotDifficultyHelper { - + /// + /// Get difficulty settings for desired bot type, if not found use assault bot types + /// + /// bot type to retrieve difficulty of + /// difficulty to get settings for (easy/normal etc) + /// bots from database + /// Difficulty object + public DifficultyCategories GetBotDifficultySettings(string botType, string difficultyLevel, Bots botDatabase) + { + throw new NotImplementedException(); + } + + /// + /// Get difficulty settings for a PMC + /// + /// "usec" / "bear" + /// what difficulty to retrieve + /// Difficulty object + protected DifficultyCategories GetDifficultySettings(string botType, string difficultyLevel) + { + throw new NotImplementedException(); + } + + /// + /// Translate chosen value from pre-raid difficulty dropdown into bot difficulty value + /// + /// Dropdown difficulty value to convert + /// bot difficulty + public string ConvertBotDifficultyDropdownToBotDifficulty(string dropDownDifficultyValue) + { + throw new NotImplementedException(); + } + + /// + /// Choose a random difficulty from - easy/normal/hard/impossible + /// + /// random difficulty + public string ChooseRandomDifficulty() + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/BotGeneratorHelper.cs b/Core/Helpers/BotGeneratorHelper.cs index 1e35785f..ad38f2f3 100644 --- a/Core/Helpers/BotGeneratorHelper.cs +++ b/Core/Helpers/BotGeneratorHelper.cs @@ -1,6 +1,117 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common.Tables; +using Core.Models.Spt.Config; + +namespace Core.Helpers; public class BotGeneratorHelper { - + /// + /// Adds properties to an item + /// e.g. Repairable / HasHinge / Foldable / MaxDurability + /// + /// Item extra properties are being generated for + /// Used by weapons to randomize the durability values. Null for non-equipped items + /// Item Upd object with extra properties + public object GenerateExtraPropertiesForItem(TemplateItem itemTemplate, string botRole = null) + { + throw new NotImplementedException(); + } + + /// + /// Randomize the HpResource for bots e.g (245/400 resources) + /// + /// Max resource value of medical items + /// Value provided from config + /// Randomized value from maxHpResource + protected double GetRandomizedResourceValue(double maxResource, RandomisedResourceValues randomizationValues) + { + throw new NotImplementedException(); + } + + /// + /// Get the chance for the weapon attachment or helmet equipment to be set as activated + /// + /// role of bot with weapon/helmet + /// the setting of the weapon attachment/helmet equipment to be activated + /// default value for the chance of activation if the botrole or bot equipment role is undefined + /// Percent chance to be active + protected double GetBotEquipmentSettingFromConfig(string botRole, string setting, double defaultValue) + { + throw new NotImplementedException(); + } + + /// + /// Create a repairable object for a weapon that containers durability + max durability properties + /// + /// weapon object being generated for + /// type of bot being generated for + /// Repairable object + protected object GenerateWeaponRepairableProperties(TemplateItem itemTemplate, string botRole = null) + { + throw new NotImplementedException(); + } + + /// + /// Create a repairable object for an armor that containers durability + max durability properties + /// + /// weapon object being generated for + /// type of bot being generated for + /// Repairable object + protected object GenerateArmorRepairableProperties(TemplateItem itemTemplate, string botRole = null) + { + throw new NotImplementedException(); + } + + /// + /// Can item be added to another item without conflict + /// + /// Items to check compatibilities with + /// Tpl of the item to check for incompatibilities + /// Slot the item will be placed into + /// false if no incompatibilities, also has incompatibility reason + public object IsItemIncompatibleWithCurrentItems(List itemsEquipped, string tplToCheck, string equipmentSlot) + { + throw new NotImplementedException(); + } + + /// + /// Convert a bots role to the equipment role used in config/bot.json + /// + /// Role to convert + /// Equipment role (e.g. pmc / assault / bossTagilla) + public string GetBotEquipmentRole(string botRole) + { + throw new NotImplementedException(); + } + + /// + /// Adds an item with all its children into specified equipmentSlots, wherever it fits. + /// + /// Slot to add item+children into + /// Root item id to use as mod items parentid + /// Root itms tpl id + /// Item to add + /// Inventory to add item+children into + /// ItemAddedResult result object + public object AddItemWithChildrenToEquipmentSlot( + List equipmentSlots, + string rootItemId, + string rootItemTplId, + List itemWithChildren, + BotBaseInventory inventory, + HashSet containersIdFull = null) + { + throw new NotImplementedException(); + } + + /// + /// Is the provided item allowed inside a container + /// + /// Items sub-grid we want to place item inside + /// Item tpl being placed + /// True if allowed + protected bool ItemAllowedInContainer(Grid slotGrid, string itemTpl) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/BotHelper.cs b/Core/Helpers/BotHelper.cs index 8bbd70e2..94567116 100644 --- a/Core/Helpers/BotHelper.cs +++ b/Core/Helpers/BotHelper.cs @@ -1,6 +1,128 @@ -namespace Core.Helpers; +using Core.Models.Common; +using Core.Models.Eft.Common.Tables; +using Core.Models.Spt.Config; + +namespace Core.Helpers; public class BotHelper { - + /// + /// Get a template object for the specified botRole from bots.types db + /// + /// botRole to get template for + /// BotType object + public BotType GetBotTemplate(string role) + { + throw new NotImplementedException(); + } + + /// + /// Is the passed in bot role a PMC (usec/bear/pmc) + /// + /// bot role to check + /// true if is pmc + public bool IsBotPmc(string botRole) + { + throw new NotImplementedException(); + } + + public bool IsBotBoss(string botRole) + { + throw new NotImplementedException(); + } + + public bool IsBotFollower(string botRole) + { + throw new NotImplementedException(); + } + + /// + /// Add a bot to the FRIENDLY_BOT_TYPES list + /// + /// bot settings to alter + /// bot type to add to friendly list + public void AddBotToFriendlyList(DifficultyCategories difficultySettings, string typeToAdd) + { + throw new NotImplementedException(); + } + + /// + /// Add a bot to the REVENGE_BOT_TYPES list + /// + /// bot settings to alter + /// bot type to add to revenge list + public void AddBotToRevengeList(DifficultyCategories difficultySettings, string[] typesToAdd) + { + throw new NotImplementedException(); + } + + public bool RollChanceToBePmc(MinMax botConvertMinMax) + { + throw new NotImplementedException(); + } + + protected void GetPmcConversionValuesForLocation(string location) + { + throw new NotImplementedException(); + } + + /// + /// is the provided role a PMC, case-agnostic + /// + /// Role to check + /// True if role is PMC + public bool BotRoleIsPmc(string botRole) + { + throw new NotImplementedException(); + } + + /// + /// Get randomization settings for bot from config/bot.json + /// + /// level of bot + /// bot equipment json + /// RandomisationDetails + public RandomisationDetails GetBotRandomizationDetails(int botLevel, EquipmentFilters botEquipConfig) + { + throw new NotImplementedException(); + } + + /// + /// Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec + /// + /// pmc role + public string GetRandomizedPmcRole() + { + throw new NotImplementedException(); + } + + /// + /// Get the corresponding side when pmcBEAR or pmcUSEC is passed in + /// + /// role to get side for + /// side (usec/bear) + public string GetPmcSideByRole(string botRole) + { + throw new NotImplementedException(); + } + + /// + /// Get a randomized PMC side based on bot config value 'isUsec' + /// + /// pmc side as string + protected string GetRandomizedPmcSide() + { + throw new NotImplementedException(); + } + + /// + /// Get a name from a PMC that fits the desired length + /// + /// Max length of name, inclusive + /// OPTIONAL - what side PMC to get name from (usec/bear) + /// name of PMC + public string GetPmcNicknameOfMaxLength(int maxLength, string side = null) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/BotWeaponGeneratorHelper.cs b/Core/Helpers/BotWeaponGeneratorHelper.cs index 237209f8..9c2f1a73 100644 --- a/Core/Helpers/BotWeaponGeneratorHelper.cs +++ b/Core/Helpers/BotWeaponGeneratorHelper.cs @@ -1,6 +1,77 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common.Tables; +using Core.Models.Enums; + +namespace Core.Helpers; public class BotWeaponGeneratorHelper { - + /// + /// Get a randomized number of bullets for a specific magazine + /// + /// Weights of magazines + /// Magazine to generate bullet count for + /// Bullet count number + public int GetRandomizedBulletCount(GenerationData magCounts, TemplateItem magTemplate) + { + throw new NotImplementedException(); + } + + /// + /// Get a randomized count of magazines + /// + /// Min and max value returned value can be between + /// Numerical value of magazine count + public int GetRandomizedMagazineCount(GenerationData magCounts) + { + throw new NotImplementedException(); + } + + /// + /// Is this magazine cylinder related (revolvers and grenade launchers) + /// + /// The name of the magazines parent + /// True if it is cylinder related + public bool MagazineIsCylinderRelated(string magazineParentName) + { + throw new NotImplementedException(); + } + + /// + /// Create a magazine using the parameters given + /// + /// Tpl of the magazine to create + /// Ammo to add to magazine + /// Template object of magazine + /// Item array + public List CreateMagazineWithAmmo(string magazineTpl, string ammoTpl, TemplateItem magTemplate) + { + throw new NotImplementedException(); + } + + /// + /// Add a specific number of cartridges to a bots inventory (defaults to vest and pockets) + /// + /// Ammo tpl to add to vest/pockets + /// Number of cartridges to add to vest/pockets + /// Bot inventory to add cartridges to + /// What equipment slots should bullets be added into + public void AddAmmoIntoEquipmentSlots( + string ammoTpl, + int cartridgeCount, + BotBaseInventory inventory, + object equipmentSlotsToAddTo // TODO: EquipmentSlots[] equipmentSlotsToAddTo = new EquipmentSlots[] { EquipmentSlots.TACTICAL_VEST, EquipmentSlots.POCKETS } + ) + { + throw new NotImplementedException(); + } + + /// + /// Get a weapons default magazine template id + /// + /// Weapon to get default magazine for + /// Tpl of magazine + public string GetWeaponsDefaultMagazineTpl(TemplateItem weaponTemplate) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/ContainerHelper.cs b/Core/Helpers/ContainerHelper.cs index 463f7573..c2ca1d36 100644 --- a/Core/Helpers/ContainerHelper.cs +++ b/Core/Helpers/ContainerHelper.cs @@ -1,6 +1,76 @@ -namespace Core.Helpers; +using System.Text.Json.Serialization; + +namespace Core.Helpers; public class ContainerHelper { - + /// + /// Finds a slot for an item in a given 2D container map + /// + /// List of container with slots filled/free + /// Width of item + /// Height of item + /// Location to place item in container + public FindSlotResult FindSlotForItem(List> container2D, int itemWidth, int itemHeight) + { + throw new NotImplementedException(); + } + + /// + /// Find a slot inside a container an item can be placed in + /// + /// Container to find space in + /// Container x size + /// Container y size + /// ??? + /// ??? + /// Items width + /// Items height + /// True - slot found + protected bool LocateSlot( + List> container2D, + int containerX, + int containerY, + int x, + int y, + int itemW, + int itemH) + { + throw new NotImplementedException(); + } + + /// + /// Find a free slot for an item to be placed at + /// + /// Container to place item in + /// Container x size + /// Container y size + /// Items width + /// Items height + /// is item rotated + public void FillContainerMapWithItem( + List> container2D, + int x, + int y, + int itemW, + int itemH, + bool rotate) + { + throw new NotImplementedException(); + } +} + +public class FindSlotResult +{ + [JsonPropertyName("success")] + public bool? Success { get; set; } + + [JsonPropertyName("x")] + public double? X { get; set; } + + [JsonPropertyName("y")] + public double? Y { get; set; } + + [JsonPropertyName("rotation")] + public bool? Rotation { get; set; } } diff --git a/Core/Helpers/Dialogue/AbstractDialogChatBot.cs b/Core/Helpers/Dialogue/AbstractDialogChatBot.cs index a2e4b29e..7d76336c 100644 --- a/Core/Helpers/Dialogue/AbstractDialogChatBot.cs +++ b/Core/Helpers/Dialogue/AbstractDialogChatBot.cs @@ -1,6 +1,28 @@ -namespace Core.Helpers.Dialogue; +using Core.Helpers.Dialog.Commando; +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; -public class AbstractDialogChatBot +namespace Core.Helpers.Dialogue; + +public class AbstractDialogChatBot : IDialogueChatBot { - + public UserDialogInfo GetChatBot() + { + throw new NotImplementedException(); + } + + public string HandleMessage(string sessionId, SendMessageRequest request) + { + throw new NotImplementedException(); + } + + public void RegisterChatCommand(IChatCommand chatCommand) + { + throw new NotImplementedException(); + } + + protected string GetUnrecognizedCommandMessage() + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/Dialogue/Commando/ChatCommand.cs b/Core/Helpers/Dialogue/Commando/ChatCommand.cs deleted file mode 100644 index 440718de..00000000 --- a/Core/Helpers/Dialogue/Commando/ChatCommand.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Core.Helpers.Dialog.Commando; - -public class ChatCommand -{ - -} diff --git a/Core/Helpers/Dialogue/Commando/IChatCommand.cs b/Core/Helpers/Dialogue/Commando/IChatCommand.cs new file mode 100644 index 00000000..673a42a0 --- /dev/null +++ b/Core/Helpers/Dialogue/Commando/IChatCommand.cs @@ -0,0 +1,12 @@ +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; + +namespace Core.Helpers.Dialog.Commando; + +public interface IChatCommand +{ + public string GetCommandPrefix(); + public string GetCommandHelp(string command); + public List GetCommands(); + public string Handle(string command, UserDialogInfo commandHandler, string sesssionId, SendMessageRequest request); +} diff --git a/Core/Helpers/Dialogue/Commando/SptCommandoCommands.cs b/Core/Helpers/Dialogue/Commando/SptCommandoCommands.cs index b2056c8c..d08cde1c 100644 --- a/Core/Helpers/Dialogue/Commando/SptCommandoCommands.cs +++ b/Core/Helpers/Dialogue/Commando/SptCommandoCommands.cs @@ -1,6 +1,33 @@ -namespace Core.Helpers.Dialog.Commando; +using Core.Helpers.Dialog.Commando.SptCommands; +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; -public class SptCommandoCommands +namespace Core.Helpers.Dialog.Commando; + +public class SptCommandoCommands : IChatCommand { + public void RegisterSptCommandoCommand(ISptCommand command) + { + throw new NotImplementedException(); + } + public string GetCommandPrefix() + { + throw new NotImplementedException(); + } + + public string GetCommandHelp(string command) + { + throw new NotImplementedException(); + } + + public List GetCommands() + { + throw new NotImplementedException(); + } + + public string Handle(string command, UserDialogInfo commandHandler, string sesssionId, SendMessageRequest request) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs b/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs index 40450a11..bec8a9a9 100644 --- a/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs +++ b/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs @@ -1,6 +1,35 @@ -namespace Core.Helpers.Dialog.Commando.SptCommands.GiveCommand; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; + +namespace Core.Helpers.Dialog.Commando.SptCommands.GiveCommand; public class GiveSptCommand { - + public string GetCommand() + { + return "give"; + } + + public string GetCommandHelp() + { + return "spt give\n========\nSends items to the player through the message system.\n\n\tspt give [template ID] [quantity]\n\t\tEx: " + + "spt give 544fb25a4bdc2dfb738b4567 2\n\n\tspt give [\"item name\"] [quantity]\n\t\tEx: spt give \"pack of sugar\" 10\n\n\tspt " + + "give [locale] [\"item name\"] [quantity]\n\t\tEx: spt give fr \"figurine de chat\" 3"; + } + + public string PerformAction(UserDialogInfo commandHandler, string sessionId, SendMessageRequest request) + { + throw new NotImplementedException(); + } + + /** + * A "simple" function that checks if an item is supposed to be given to a player or not + * @param templateItem the template item to check + * @returns true if its obtainable, false if its not + */ + protected bool IsItemAllowed(TemplateItem templateItem) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/Dialogue/Commando/SptCommands/ISptCommand.cs b/Core/Helpers/Dialogue/Commando/SptCommands/ISptCommand.cs new file mode 100644 index 00000000..6438fc84 --- /dev/null +++ b/Core/Helpers/Dialogue/Commando/SptCommands/ISptCommand.cs @@ -0,0 +1,11 @@ +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; + +namespace Core.Helpers.Dialog.Commando.SptCommands; + +public interface ISptCommand +{ + public string GetCommand(); + public string GetCommandHelp(); + public string PerformAction(UserDialogInfo commandHandler, string sessionId, SendMessageRequest request); +} diff --git a/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs b/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs index 95257a11..a8773eae 100644 --- a/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs +++ b/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs @@ -1,6 +1,35 @@ -namespace Core.Helpers.Dialog.Commando.SptCommands.ProfileCommand; +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; +using Core.Models.Spt.Dialog; -public class ProfileSptCommand +namespace Core.Helpers.Dialog.Commando.SptCommands.ProfileCommand; + +public class ProfileSptCommand : ISptCommand { - + public string GetCommand() + { + return "profile"; + } + + public string GetCommandHelp() + { + return "spt profile\n========\nSets the profile level or skill to the desired level through the message system.\n\n\tspt " + + "profile level [desired level]\n\t\tEx: spt profile level 20\n\n\tspt profile skill [skill name] [quantity]\n\t\tEx: " + + "spt profile skill metabolism 51"; + } + + public string PerformAction(UserDialogInfo commandHandler, string sessionId, SendMessageRequest request) + { + throw new NotImplementedException(); + } + + protected ProfileChangeEvent HandleSkillCommand(string skill, int level) + { + throw new NotImplementedException(); + } + + protected ProfileChangeEvent HandleLevelCommand(int level) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/Dialogue/Commando/SptCommands/SptCommand.cs b/Core/Helpers/Dialogue/Commando/SptCommands/SptCommand.cs deleted file mode 100644 index e586d3c4..00000000 --- a/Core/Helpers/Dialogue/Commando/SptCommands/SptCommand.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Core.Helpers.Dialog.Commando.SptCommands; - -public class SptCommand -{ - -} diff --git a/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs b/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs index f0ddda60..50942d1a 100644 --- a/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs +++ b/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs @@ -1,6 +1,22 @@ -namespace Core.Helpers.Dialog.Commando.SptCommands.TraderCommand; +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; -public class TraderSptCommand +namespace Core.Helpers.Dialog.Commando.SptCommands.TraderCommand; + +public class TraderSptCommand : ISptCommand { - + public string GetCommand() + { + return "trader"; + } + + public string GetCommandHelp() + { + return "spt trader\n========\nSets the reputation or money spent to the input quantity through the message system.\n\n\tspt trader [trader] rep [quantity]\n\t\tEx: spt trader prapor rep 2\n\n\tspt trader [trader] spend [quantity]\n\t\tEx: spt trader therapist spend 1000000"; + } + + public string PerformAction(UserDialogInfo commandHandler, string sessionId, SendMessageRequest request) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/Dialogue/CommandoDialogChatBot.cs b/Core/Helpers/Dialogue/CommandoDialogChatBot.cs index 5a565be4..5a58341d 100644 --- a/Core/Helpers/Dialogue/CommandoDialogChatBot.cs +++ b/Core/Helpers/Dialogue/CommandoDialogChatBot.cs @@ -1,6 +1,16 @@ -namespace Core.Helpers.Dialogue; +using Core.Models.Eft.Profile; -public class CommandoDialogChatBot +namespace Core.Helpers.Dialogue; + +public class CommandoDialogChatBot : AbstractDialogChatBot { - + public UserDialogInfo GetChatBot() + { + throw new NotImplementedException(); + } + + protected string GetUnrecognizedCommandMessage() + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/Dialogue/DialogueChatBot.cs b/Core/Helpers/Dialogue/DialogueChatBot.cs deleted file mode 100644 index d6d24f29..00000000 --- a/Core/Helpers/Dialogue/DialogueChatBot.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Core.Helpers.Dialogue; - -public class DialogueChatBot -{ - -} diff --git a/Core/Helpers/Dialogue/IDialogueChatBot.cs b/Core/Helpers/Dialogue/IDialogueChatBot.cs new file mode 100644 index 00000000..d50269ef --- /dev/null +++ b/Core/Helpers/Dialogue/IDialogueChatBot.cs @@ -0,0 +1,10 @@ +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; + +namespace Core.Helpers.Dialogue; + +public interface IDialogueChatBot +{ + public UserDialogInfo GetChatBot(); + public string HandleMessage(string sessionId, SendMessageRequest request); +} diff --git a/Core/Helpers/Dialogue/SptDialogueChatBot.cs b/Core/Helpers/Dialogue/SptDialogueChatBot.cs index 625de802..4e1867f4 100644 --- a/Core/Helpers/Dialogue/SptDialogueChatBot.cs +++ b/Core/Helpers/Dialogue/SptDialogueChatBot.cs @@ -1,6 +1,17 @@ -namespace Core.Helpers.Dialogue; +using Core.Models.Eft.Dialog; +using Core.Models.Eft.Profile; -public class SptDialogueChatBot +namespace Core.Helpers.Dialogue; + +public class SptDialogueChatBot : IDialogueChatBot { - + public UserDialogInfo GetChatBot() + { + throw new NotImplementedException(); + } + + public string HandleMessage(string sessionId, SendMessageRequest request) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/DialogueHelper.cs b/Core/Helpers/DialogueHelper.cs index 5c025678..741dc843 100644 --- a/Core/Helpers/DialogueHelper.cs +++ b/Core/Helpers/DialogueHelper.cs @@ -1,6 +1,39 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Profile; + +namespace Core.Helpers; public class DialogueHelper { - + /// + /// Get the preview contents of the last message in a dialogue. + /// + /// + /// MessagePreview + public MessagePreview GetMessagePreview(Models.Eft.Profile.Dialogue dialogue) + { + throw new NotImplementedException(); + } + + /// + /// Get the item contents for a particular message. + /// + /// + /// + /// Item being moved to inventory + /// + public List GetMessageItemContents(string messageID, string sessionID, string itemId) + { + throw new NotImplementedException(); + } + + /// + /// Get the dialogs dictionary for a profile, create if doesn't exist + /// + /// Session/player id + /// Dialog dictionary + public Dictionary GetDialogsForProfile(string sessionId) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/DurabilityLimitsHelper.cs b/Core/Helpers/DurabilityLimitsHelper.cs index 657b33ef..784f0259 100644 --- a/Core/Helpers/DurabilityLimitsHelper.cs +++ b/Core/Helpers/DurabilityLimitsHelper.cs @@ -1,6 +1,112 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common.Tables; + +namespace Core.Helpers; public class DurabilityLimitsHelper { - + /// + /// Get max durability for a weapon based on bot role + /// + /// UNUSED - Item to get durability for + /// Role of bot to get max durability for + /// Max durability of weapon + public double GetRandomizedMaxWeaponDurability(TemplateItem itemTemplate, string? botRole = null) + { + throw new NotImplementedException(); + } + + /// + /// Get max durability value for armor based on bot role + /// + /// Item to get max durability for + /// Role of bot to get max durability for + /// max durability + public double GetRandomizedMaxArmorDurability(TemplateItem itemTemplate, string? botRole = null) + { + throw new NotImplementedException(); + } + + /// + /// Get randomised current weapon durability by bot role + /// + /// Unused - Item to get current durability of + /// Role of bot to get current durability for + /// Max durability of weapon + /// Current weapon durability + public double GetRandomizedWeaponDurability(TemplateItem itemTemplate, string? botRole, double maxDurability) + { + throw new NotImplementedException(); + } + + /// + /// Get randomised current armor durability by bot role + /// + /// Unused - Item to get current durability of + /// Role of bot to get current durability for + /// Max durability of armor + /// Current armor durability + public double GetRandomizedArmorDurability(TemplateItem itemTemplate, string? botRole, double maxDurability) + { + throw new NotImplementedException(); + } + + protected double GenerateMaxWeaponDurability(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GenerateMaxPmcArmorDurability(double itemMaxDurability) + { + throw new NotImplementedException(); + } + + protected double GetLowestMaxWeaponFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GetHighestMaxWeaponDurabilityFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GenerateWeaponDurability(string? botRole, double maxDurability) + { + throw new NotImplementedException(); + } + + protected double GenerateArmorDurability(string? botRole, double maxDurability) + { + throw new NotImplementedException(); + } + + protected double GetMinWeaponDeltaFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GetMaxWeaponDeltaFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GetMinArmorDeltaFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GetMaxArmorDeltaFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GetMinArmorLimitPercentFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } + + protected double GetMinWeaponLimitPercentFromConfig(string? botRole = null) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/HandbookHelper.cs b/Core/Helpers/HandbookHelper.cs index a4d70611..999823c1 100644 --- a/Core/Helpers/HandbookHelper.cs +++ b/Core/Helpers/HandbookHelper.cs @@ -1,6 +1,87 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common.Tables; + +namespace Core.Helpers; public class HandbookHelper { - + /// + /// Create an in-memory cache of all items with associated handbook price in handbookPriceCache class + /// + public void HydrateLookup() + { + throw new NotImplementedException(); + } + + /// + /// Get price from internal cache, if cache empty look up price directly in handbook (expensive) + /// If no values found, return 0 + /// + /// Item tpl to look up price for + /// price in roubles + public double GetTemplatePrice(string tpl) + { + throw new NotImplementedException(); + } + + public double GetTemplatePriceForItems(List items) + { + throw new NotImplementedException(); + } + + /// + /// Get all items in template with the given parent category + /// + /// + /// string array + public List TemplatesWithParent(string parentId) + { + throw new NotImplementedException(); + } + + /// + /// Does category exist in handbook cache + /// + /// + /// true if exists in cache + public bool IsCategory(string category) + { + throw new NotImplementedException(); + } + + /// + /// Get all items associated with a categories parent + /// + /// + /// string array + public List ChildrenCategories(string categoryParent) + { + throw new NotImplementedException(); + } + + /// + /// Convert non-roubles into roubles + /// + /// Currency count to convert + /// What current currency is + /// Count in roubles + public double InRUB(double nonRoubleCurrencyCount, string currencyTypeFrom) + { + throw new NotImplementedException(); + } + + /// + /// Convert roubles into another currency + /// + /// roubles to convert + /// Currency to convert roubles into + /// currency count in desired type + public double FromRUB(double roubleCurrencyCount, string currencyTypeTo) + { + throw new NotImplementedException(); + } + + public HandbookCategory GetCategoryById(string handbookId) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/HealthHelper.cs b/Core/Helpers/HealthHelper.cs index 53a64de8..3e0f15e9 100644 --- a/Core/Helpers/HealthHelper.cs +++ b/Core/Helpers/HealthHelper.cs @@ -1,6 +1,116 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Health; +using Core.Models.Eft.Profile; +using Effects = Core.Models.Eft.Profile.Effects; +using Health = Core.Models.Eft.Profile.Health; + +namespace Core.Helpers; public class HealthHelper { - + /// + /// Resets the profiles vitality/health and vitality/effects properties to their defaults + /// + /// Session Id + /// Updated profile + public SptProfile ResetVitality(string sessionID) + { + throw new NotImplementedException(); + } + + /// + /// Update player profile vitality values with changes from client request object + /// + /// Player profile + /// Post raid data + /// Session id + /// Is player dead + /// Should effects be added to profile (default - true) + /// Should all prior effects be removed before apply new ones (default - true) + public void UpdateProfileHealthPostRaid( + PmcData pmcData, + Health postRaidHealth, + string sessionID, + bool isDead) + { + throw new NotImplementedException(); + } + + protected void StoreHydrationEnergyTempInProfile( + SptProfile fullProfile, + double hydration, + double energy, + double temprature) + { + throw new NotImplementedException(); + } + + /// + /// Take body part effects from client profile and apply to server profile + /// + /// Post-raid body part data + /// Player profile on server + protected void TransferPostRaidLimbEffectsToProfile(BodyPartsHealth postRaidBodyParts, PmcData profileData) + { + throw new NotImplementedException(); + } + + /// + /// Update player profile vitality values with changes from client request object + /// + /// Player profile + /// Heal request + /// Session id + /// Should effects be added to profile (default - true) + /// Should all prior effects be removed before apply new ones (default - true) + public void SaveVitality( + PmcData pmcData, + SyncHealthRequestData request, + string sessionID, + bool addEffects = true, + bool deleteExistingEffects = true) + { + throw new NotImplementedException(); + } + + /// + /// Adjust hydration/energy/temperate and body part hp values in player profile to values in profile.vitality + /// + /// Profile to update + /// Session id + protected void SaveHealth(PmcData pmcData, string sessionID) + { + throw new NotImplementedException(); + } + + /// + /// Save effects to profile + /// Works by removing all effects and adding them back from profile + /// Removes empty 'Effects' objects if found + /// + /// Player profile + /// Session id + /// Dictionary of body parts with effects that should be added to profile + /// Should effects be added back to profile + protected void SaveEffects( + PmcData pmcData, + string sessionID, + Effects bodyPartsWithEffects, + bool deleteExistingEffects = true) + { + throw new NotImplementedException(); + } + + /// + /// Add effect to body part in profile + /// + /// Player profile + /// Body part to edit + /// Effect to add to body part + /// How long the effect has left in seconds (-1 by default, no duration). + protected void AddEffect(PmcData pmcData, string effectBodyPart, string effectType, int duration = -1) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/HideoutHelper.cs b/Core/Helpers/HideoutHelper.cs index 5e9aa595..79685ac3 100644 --- a/Core/Helpers/HideoutHelper.cs +++ b/Core/Helpers/HideoutHelper.cs @@ -1,6 +1,474 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Hideout; +using Core.Models.Eft.ItemEvent; +using Core.Models.Enums; + +namespace Core.Helpers; public class HideoutHelper { - + /// + /// Add production to profiles' Hideout.Production array + /// + /// Profile to add production to + /// Production request + /// Session id + /// client response + public void RegisterProduction( + PmcData profileData, + HideoutSingleProductionStartRequestData productionRequest, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// This convenience function initializes new Production Object + /// with all the constants. + /// + public void InitProduction( + string recipeId, + int productionTime, + bool needFuelForAllProductionTime) + { + throw new NotImplementedException(); + } + + /// + /// Is the provided object a Production type + /// + /// + /// + public bool IsProductionType(Productive productive) + { + throw new NotImplementedException(); + } + + /// + /// Apply bonus to player profile given after completing hideout upgrades + /// + /// Profile to add bonus to + /// Bonus to add to profile + public void ApplyPlayerUpgradesBonuses(PmcData profileData, StageBonus bonus) + { + throw new NotImplementedException(); + } + + /// + /// Process a players hideout, update areas that use resources + increment production timers + /// + /// Session id + public void UpdatePlayerHideout(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Get various properties that will be passed to hideout update-related functions + /// + /// Player profile + /// Properties + protected (int btcFarmCGs, bool isGeneratorOn, bool waterCollectorHasFilter) GetHideoutProperties(PmcData profileData) + { + throw new NotImplementedException(); + } + + protected bool DoesWaterCollectorHaveFilter(BotHideoutArea waterCollector) + { + throw new NotImplementedException(); + } + + /// + /// Iterate over productions and update their progress timers + /// + /// Profile to check for productions and update + /// Hideout properties + protected void UpdateProductionTimers( + PmcData profileData, + (int btcFarmCGs, bool isGeneratorOn, bool waterCollectorHasFilter) hideoutProperties) + { + throw new NotImplementedException(); + } + + /// + /// Is a craft from a particular hideout area + /// + /// Craft to check + /// Type to check craft against + /// True if it is from that area + protected bool IsCraftOfType(Production craft, HideoutAreas hideoutType) + { + throw new NotImplementedException(); + } + + /// + /// Has the craft completed + /// Ignores bitcoin farm/cultist circle as they're continuous crafts + /// + /// Craft to check + /// True when craft is complete + protected bool IsCraftComplete(Production craft) + { + throw new NotImplementedException(); + } + + /// + /// Update progress timer for water collector + /// + /// profile to update + /// id of water collection production to update + /// Hideout properties + protected void UpdateWaterCollectorProductionTimer( + PmcData pmcData, + string productionId, + Dictionary hideoutProperties) + { + throw new NotImplementedException(); + } + + /// + /// Update a productions progress value based on the amount of time that has passed + /// + /// Player profile + /// Production id being crafted + /// Recipe data being crafted + /// + protected void UpdateProductionProgress( + PmcData pmcData, + string prodId, + HideoutProduction recipe, + Dictionary hideoutProperties) + { + throw new NotImplementedException(); + } + + protected void UpdateCultistCircleCraftProgress(PmcData pmcData, string prodId) + { + throw new NotImplementedException(); + } + + protected void FlagCultistCircleCraftAsComplete(Productive production) + { + throw new NotImplementedException(); + } + + /// + /// Check if a productions progress value matches its corresponding recipes production time value + /// + /// Player profile + /// Production id + /// Recipe being crafted + /// progress matches productionTime from recipe + protected bool DoesProgressMatchProductionTime(PmcData pmcData, string prodId) + { + throw new NotImplementedException(); + } + + /// + /// Update progress timer for scav case + /// + /// Profile to update + /// Id of scav case production to update + protected void UpdateScavCaseProductionTimer(PmcData pmcData, string productionId) + { + throw new NotImplementedException(); + } + + /// + /// Iterate over hideout areas that use resources (fuel/filters etc) and update associated values + /// + /// Session id + /// Profile to update areas of + /// hideout properties + protected void UpdateAreasWithResources( + string sessionID, + PmcData pmcData, + Dictionary hideoutProperties) + { + throw new NotImplementedException(); + } + + /// + /// Decrease fuel from generator slots based on amount of time since last time this occurred + /// + /// Hideout area + /// Player profile + /// Is the generator turned on since last update + protected void UpdateFuel(BotHideoutArea generatorArea, PmcData pmcData, bool isGeneratorOn) + { + throw new NotImplementedException(); + } + + protected void UpdateWaterCollector( + string sessionId, + PmcData pmcData, + BotHideoutArea area, + Dictionary hideoutProperties) + { + throw new NotImplementedException(); + } + + /// + /// Get craft time and make adjustments to account for dev profile + crafting skill level + /// + /// Player profile making craft + /// Recipe being crafted + /// Should the hideout management bonus be applied to the calculation + /// Items craft time with bonuses subtracted + public double GetAdjustedCraftTimeWithSkills( + PmcData playerProfile, + string recipeId, + bool applyHideoutManagementBonus = false) + { + throw new NotImplementedException(); + } + + /// + /// Adjust water filter objects resourceValue or delete when they reach 0 resource + /// + /// Water filter area to update + /// Production object + /// Is generator enabled + /// Player profile + protected void UpdateWaterFilters( + BotHideoutArea waterFilterArea, + Production production, + bool isGeneratorOn, + PmcData playerProfile) + { + throw new NotImplementedException(); + } + + /// + /// Get an adjusted water filter drain rate based on time elapsed since last run, + /// handle edge case when craft time has gone on longer than total production time + /// + /// Time passed + /// Total time collecting water + /// How far water collector has progressed + /// Base drain rate + /// Drain rate (adjusted) + protected double GetTimeAdjustedWaterFilterDrainRate( + double secondsSinceServerTick, + double totalProductionTime, + double productionProgress, + double baseFilterDrainRate) + { + throw new NotImplementedException(); + } + + /// + /// Get the water filter drain rate based on hideout bonuses player has + /// + /// Player profile + /// Drain rate + protected double GetWaterFilterDrainRate(PmcData playerProfile) + { + throw new NotImplementedException(); + } + + /// + /// Get the production time in seconds for the desired production + /// + /// Id, e.g. Water collector id + /// Seconds to produce item + protected double GetTotalProductionTimeSeconds(string prodId) + { + throw new NotImplementedException(); + } + + /// + /// Create a upd object using passed in parameters + /// + /// + /// + /// + /// Upd + protected Upd GetAreaUpdObject( + int stackCount, + double resourceValue, + int resourceUnitsConsumed, + bool isFoundInRaid) + { + throw new NotImplementedException(); + } + + protected void UpdateAirFilters(BotHideoutArea airFilterArea, PmcData playerProfile, bool isGeneratorOn) + { + throw new NotImplementedException(); + } + + protected void UpdateBitcoinFarm( + PmcData playerProfile, + Productive btcProduction, + int btcFarmCGs, + bool isGeneratorOn) + { + throw new NotImplementedException(); + } + + /// + /// Add bitcoin object to btc production products array and set progress time + /// + /// Bitcoin production object + /// Time to craft a bitcoin + protected void AddBtcToProduction(Production btcProd, double coinCraftTimeSeconds) + { + throw new NotImplementedException(); + } + + /// + /// Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off + /// + /// Player profile + /// Is the generator on for the duration of elapsed time + /// Hideout production recipe being crafted we need the ticks for + /// Amount of time elapsed in seconds + protected double GetTimeElapsedSinceLastServerTick( + PmcData playerProfile, + bool isGeneratorOn, + HideoutProduction recipe = null) + { + throw new NotImplementedException(); + } + + /// + /// Get a count of how many possible BTC can be gathered by the profile + /// + /// Profile to look up + /// Coin slot count + protected int GetBTCSlots(PmcData profileData) + { + throw new NotImplementedException(); + } + + /// + /// Get a count of how many additional bitcoins player hideout can hold with elite skill + /// + protected int GetEliteSkillAdditionalBitcoinSlotCount() + { + throw new NotImplementedException(); + } + + /// + /// HideoutManagement skill gives a consumption bonus the higher the level + /// 0.5% per level per 1-51, (25.5% at max) + /// + /// Profile to get hideout consumption level from + /// Consumption bonus + protected double GetHideoutManagementConsumptionBonus(PmcData profileData) + { + throw new NotImplementedException(); + } + + /// + /// Get a multiplier based on player's skill level and value per level + /// + /// Player profile + /// Player skill from profile + /// Value from globals.config.SkillsSettings - `PerLevel` + /// Multiplier from 0 to 1 + protected double GetSkillBonusMultipliedBySkillLevel(PmcData profileData, SkillTypes skill, double valuePerLevel) + { + throw new NotImplementedException(); + } + + /// + /// + /// Player profile + /// Time to complete hideout craft in seconds + /// Skill bonus to get reduction from + /// Skill bonus amount to apply + /// Seconds to reduce craft time by + public double GetSkillProductionTimeReduction( + PmcData profileData, + double productionTime, + SkillTypes skill, + double amountPerLevel) + { + throw new NotImplementedException(); + } + + public bool IsProduction(Productive productive) + { + throw new NotImplementedException(); + } + + /// + /// Gather crafted BTC from hideout area and add to inventory + /// Reset production start timestamp if hideout area at full coin capacity + /// + /// Player profile + /// Take production request + /// Session id + /// Output object to update + public void GetBTC( + PmcData profileData, + HideoutTakeProductionRequestData request, + string sessionId, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Upgrade hideout wall from starting level to interactable level if necessary stations have been upgraded + /// + /// Profile to upgrade wall in + public void UnlockHideoutWallInProfile(PmcData profileData) + { + throw new NotImplementedException(); + } + + /// + /// Hideout improvement is flagged as complete + /// + /// hideout improvement object + /// true if complete + protected bool HideoutImprovementIsComplete(HideoutImprovement improvement) + { + throw new NotImplementedException(); + } + + /// + /// Iterate over hideout improvements not completed and check if they need to be adjusted + /// + /// Profile to adjust + public void SetHideoutImprovementsToCompleted(PmcData profileData) + { + throw new NotImplementedException(); + } + + /// + /// Add/remove bonus combat skill based on number of dogtags in place of fame hideout area + /// + /// Player profile + public void ApplyPlaceOfFameDogtagBonus(PmcData profileData) + { + throw new NotImplementedException(); + } + + /// + /// Calculate the raw dogtag combat skill bonus for place of fame based on number of dogtags + /// Reverse engineered from client code + /// + /// Player profile + /// Active dogtags in place of fame dogtag slots + /// Combat bonus + protected double GetDogtagCombatSkillBonusPercent(PmcData profileData, List activeDogtags) + { + throw new NotImplementedException(); + } + + /// + /// The wall pollutes a profile with various temp buffs/debuffs, + /// Remove them all + /// + /// Hideout area data + /// Player profile + public void RemoveHideoutWallBuffsAndDebuffs(HideoutArea wallAreaData, PmcData profileData) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/HttpServerHelper.cs b/Core/Helpers/HttpServerHelper.cs index 0fb865aa..a8ee2802 100644 --- a/Core/Helpers/HttpServerHelper.cs +++ b/Core/Helpers/HttpServerHelper.cs @@ -2,5 +2,39 @@ public class HttpServerHelper { - + public string GetMimeText(string key) + { + throw new NotImplementedException(); + } + + /// + /// Combine ip and port into address + /// + /// url + public string BuildUrl() + { + throw new NotImplementedException(); + } + + /// + /// Prepend http to the url:port + /// + /// URI + public string GetBackendUrl() + { + throw new NotImplementedException(); + } + + /// + /// Get websocket url + port + /// + public string GetWebsocketUrl() + { + throw new NotImplementedException(); + } + + public void SendTextJson(object resp, object output) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/InRaidHelper.cs b/Core/Helpers/InRaidHelper.cs index 35940273..98e5ec54 100644 --- a/Core/Helpers/InRaidHelper.cs +++ b/Core/Helpers/InRaidHelper.cs @@ -1,6 +1,102 @@ -namespace Core.Helpers; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; + +namespace Core.Helpers; public class InRaidHelper { - + /// + /// Deprecated. Reset the skill points earned in a raid to 0, ready for next raid. + /// + /// Profile to update + protected void ResetSkillPointsEarnedDuringRaid(PmcData profile) + { + throw new NotImplementedException(); + } + + /// + /// Update a player's inventory post-raid. + /// Remove equipped items from pre-raid. + /// Add new items found in raid to profile. + /// Store insurance items in profile. + /// + /// Session id + /// Profile to update + /// Profile returned by client after a raid + /// Indicates if the player survived the raid + /// Indicates if it is a transfer operation + public void SetInventory( + string sessionID, + PmcData serverProfile, + PmcData postRaidProfile, + bool isSurvived, + bool isTransfer) + { + throw new NotImplementedException(); + } + + /// + /// Remove FiR status from items. + /// + /// Items to process + protected void RemoveFiRStatusFromCertainItems(List items) + { + throw new NotImplementedException(); + } + + /// + /// Add items from one parameter into another. + /// + /// Items we want to add + /// Location to add items to + protected void AddItemsToInventory(List itemsToAdd, List serverInventoryItems) + { + throw new NotImplementedException(); + } + + /// + /// Clear PMC inventory of all items except those that are exempt. + /// Used post-raid to remove items after death. + /// + /// Player profile + /// Session id + public void DeleteInventory(PmcData pmcData, string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Remove FiR status from designated container. + /// + /// Session id + /// Player profile + /// Container slot id to find items for and remove FiR from + public void RemoveFiRStatusFromItemsInContainer( + string sessionId, + PmcData pmcData, + string secureContainerSlotId) + { + throw new NotImplementedException(); + } + + /// + /// Get a list of items from a profile that will be lost on death. + /// + /// Profile to get items from + /// List of items lost on death + protected List GetInventoryItemsLostOnDeath(PmcData pmcProfile) + { + throw new NotImplementedException(); + } + + /// + /// Does the provided item's slotId mean it's kept on the player after death? + /// + /// Player profile + /// Item to check should be kept + /// true if item is kept after death + protected bool IsItemKeptAfterDeath(PmcData pmcData, Item itemToCheck) + { + throw new NotImplementedException(); + } } diff --git a/Core/Helpers/InventoryHelper.cs b/Core/Helpers/InventoryHelper.cs index 3a4ade47..a45d341d 100644 --- a/Core/Helpers/InventoryHelper.cs +++ b/Core/Helpers/InventoryHelper.cs @@ -1,6 +1,399 @@ -namespace Core.Helpers; +using System.Text.Json.Serialization; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Inventory; +using Core.Models.Eft.ItemEvent; +using Core.Models.Spt.Config; +using Core.Models.Spt.Inventory; + +namespace Core.Helpers; public class InventoryHelper { - + /// + /// Add multiple items to player stash (assuming they all fit) + /// + /// Session id + /// AddItemsDirectRequest request + /// Player profile + /// Client response object + public void AddItemsToStash( + string sessionId, + AddItemsDirectRequest request, + PmcData pmcData, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Add whatever is passed in request.itemWithModsToAdd into player inventory (if it fits) + /// + /// Session id + /// AddItemDirect request + /// Player profile + /// Client response object + public void AddItemToStash( + string sessionId, + AddItemDirectRequest request, + PmcData pmcData, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Set FiR status for an item + its children + /// + /// An item + /// Item was found in raid + protected void SetFindInRaidStatusForItem(Item[] itemWithChildren, bool foundInRaid) + { + throw new NotImplementedException(); + } + + /// + /// Remove properties from a Upd object used by a trader/ragfair that are unnecessary to a player + /// + /// Object to update + protected void RemoveTraderRagfairRelatedUpdProperties(Upd upd) + { + throw new NotImplementedException(); + } + + /// + /// Can all provided items be added into player inventory + /// + /// Player id + /// Array of items with children to try and fit + /// True all items fit + public bool CanPlaceItemsInInventory(string sessionId, Item[][] itemsWithChildren) + { + throw new NotImplementedException(); + } + + /// + /// Do the provided items all fit into the grid + /// + /// Container grid to fit items into + /// Items to try and fit into grid + /// True all fit + public bool CanPlaceItemsInContainer(int[][] containerFS2D, Item[][] itemsWithChildren) + { + throw new NotImplementedException(); + } + + /// + /// Does an item fit into a container grid + /// + /// Container grid + /// Item to check fits + /// True it fits + public bool CanPlaceItemInContainer(int[][] containerFS2D, Item[] itemWithChildren) + { + throw new NotImplementedException(); + } + + /// + /// Find a free location inside a container to fit the item + /// + /// Container grid to add item to + /// Item to add to grid + /// Id of the container we're fitting item into + /// Slot id value to use, default is "hideout" + public void PlaceItemInContainer( + int[][] containerFS2D, + Item[] itemWithChildren, + string containerId, + string desiredSlotId = "hideout") + { + throw new NotImplementedException(); + } + + /// + /// Find a location to place an item into inventory and place it + /// + /// 2-dimensional representation of the container slots + /// 2-dimensional representation of the sorting table slots + /// Item to place with children + /// Players inventory + /// Should sorting table to be used if main stash has no space + /// Output to send back to client + protected void PlaceItemInInventory( + int[][] stashFS2D, + int[][] sortingTableFS2D, + Item[] itemWithChildren, + BotBaseInventory playerInventory, + bool useSortingTable, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Handle Remove event + /// Remove item from player inventory + insured items array + /// Also deletes child items + /// + /// Profile to remove item from (pmc or scav) + /// Items id to remove + /// Session id + /// OPTIONAL - ItemEventRouterResponse + public void RemoveItem(PmcData profile, string itemId, string sessionId, ItemEventRouterResponse output = null) + { + throw new NotImplementedException(); + } + + /// + /// Delete desired item from a player profiles mail + /// + /// Session id + /// Remove request + /// OPTIONAL - ItemEventRouterResponse + public void RemoveItemAndChildrenFromMailRewards(string sessionId, InventoryRemoveRequestData removeRequest, ItemEventRouterResponse output = null) + { + throw new NotImplementedException(); + } + + /// + /// Find item by id in player inventory and remove x of its count + /// + /// player profile + /// Item id to decrement StackObjectsCount of + /// Number of item to remove + /// Session id + /// ItemEventRouterResponse + /// ItemEventRouterResponse + public ItemEventRouterResponse RemoveItemByCount(PmcData pmcData, string itemId, int countToRemove, string sessionId, ItemEventRouterResponse output = null) + { + throw new NotImplementedException(); + } + + /// + /// Get the height and width of an item - can have children that alter size + /// + /// Item to get size of + /// Items id to get size of + /// + /// [width, height] + public List GetItemSize(string itemTpl, string itemId, List inventoryItems) + { + throw new NotImplementedException(); + } + + /// + /// Calculates the size of an item including attachments + /// takes into account if item is folded + /// + /// Items template id + /// Items id + /// Hashmap of inventory items + /// An array representing the [width, height] of the item + protected List GetSizeByInventoryItemHash(string itemTpl, string itemId, InventoryItemHash inventoryItemHash) + { + throw new NotImplementedException(); + } + + /// + /// Get a blank two-dimensional representation of a container + /// + /// Horizontal size of container + /// Vertical size of container + /// Two-dimensional representation of container + protected List> GetBlankContainerMap(int containerH, int containerY) + { + throw new NotImplementedException(); + } + + /// + /// Get a 2d mapping of a container with what grid slots are filled + /// + /// Horizontal size of container + /// Vertical size of container + /// Players inventory items + /// Id of the container + /// Two-dimensional representation of container + public List> GetContainerMap(int containerH, int containerV, List itemList, string containerId) + { + throw new NotImplementedException(); + } + + protected bool IsVertical(ItemLocation itemLocation) + { + throw new NotImplementedException(); + } + + protected InventoryItemHash GetInventoryItemHash(List inventoryItems) + { + throw new NotImplementedException(); + } + + /// + /// Return the inventory that needs to be modified (scav/pmc etc) + /// Changes made to result apply to character inventory + /// Based on the item action, determine whose inventories we should be looking at for from and to. + /// + /// Item interaction request + /// Session id / playerid + /// OwnerInventoryItems with inventory of player/scav to adjust + public OwnerInventoryItems GetOwnerInventoryItems( + InventoryMoveRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Get a two dimensional array to represent stash slots + /// 0 value = free, 1 = taken + /// + /// Player profile + /// session id + /// 2-dimensional array + protected int[,] GetStashSlotMap(PmcData pmcData, string sessionID) + { + throw new NotImplementedException(); + } + + /// + /// Get a blank two-dimensional array representation of a container + /// + /// Container to get data for + /// blank two-dimensional array + public int[,] GetContainerSlotMap(string containerTpl) + { + throw new NotImplementedException(); + } + + /// + /// Get a two-dimensional array representation of the players sorting table + /// + /// Player profile + /// two-dimensional array + protected int[,] GetSortingTableSlotMap(PmcData pmcData) + { + throw new NotImplementedException(); + } + + /// + /// Get Players Stash Size + /// + /// Players id + /// Dictionary of 2 values, horizontal and vertical stash size + protected Dictionary GetPlayerStashSize(string sessionID) + { + throw new NotImplementedException(); + } + + /// + /// Get the players stash items tpl + /// + /// Player id + /// Stash tpl + protected string GetStashType(string sessionID) + { + throw new NotImplementedException(); + } + + /// + /// Internal helper function to transfer an item + children from one profile to another. + /// + /// Inventory of the source (can be non-player) + /// Inventory of the destination + /// Move request + public void MoveItemToProfile(Item[] sourceItems, Item[] toItems, InventoryMoveRequestData request) + { + throw new NotImplementedException(); + } + + /// + /// Internal helper function to move item within the same profile. + /// + /// profile to edit + /// + /// client move request + /// True if move was successful + public (bool success, string errorMessage) MoveItemInternal( + PmcData pmcData, + Item[] inventoryItems, + InventoryMoveRequestData moveRequest) + { + throw new NotImplementedException(); + } + + /// + /// Update fast panel bindings when an item is moved into a container that doesn't allow quick slot access + /// + /// Player profile + /// item being moved + protected void UpdateFastPanelBinding(PmcData pmcData, Item itemBeingMoved) + { + throw new NotImplementedException(); + } + + /// + /// Internal helper function to handle cartridges in inventory if any of them exist. + /// + protected void HandleCartridges(Item[] items, InventoryMoveRequestData request) + { + throw new NotImplementedException(); + } + + /// + /// Get details for how a random loot container should be handled, max rewards, possible reward tpls + /// + /// Container being opened + /// Reward details + public RewardDetails GetRandomLootContainerRewardDetails(string itemTpl) + { + throw new NotImplementedException(); + } + + /// + /// Get inventory configuration + /// + /// Inventory configuration + public InventoryConfig GetInventoryConfig() + { + throw new NotImplementedException(); + } + + /// + /// Recursively checks if the given item is + /// inside the stash, that is it has the stash as + /// ancestor with slotId=hideout + /// + /// Player profile + /// Item to look for + /// True if item exists inside stash + public bool IsItemInStash(PmcData pmcData, Item itemToCheck) + { + throw new NotImplementedException(); + } + + public void ValidateInventoryUsesMongoIds(List itemsToValidate) + { + throw new NotImplementedException(); + } + + /// + /// Does the provided item have a root item with the provided id + /// + /// Profile with items + /// Item to check + /// Root item id to check for + /// True when item has rootId, false when not + public bool DoesItemHaveRootId(PmcData pmcData, Item item, string rootId) + { + throw new NotImplementedException(); + } +} + +public class InventoryItemHash +{ + [JsonPropertyName("byItemId")] + public Dictionary ByItemId { get; set; } + + [JsonPropertyName("byParentId")] + public Dictionary> ByParentId { get; set; } } diff --git a/Core/Models/Eft/Common/MetricsTableData.cs b/Core/Models/Eft/Common/MetricsTableData.cs new file mode 100644 index 00000000..9f37630b --- /dev/null +++ b/Core/Models/Eft/Common/MetricsTableData.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Common; + +public class MetricsTableData +{ + [JsonPropertyName("Keys")] + public List? Keys { get; set; } + + [JsonPropertyName("NetProcessingBins")] + public List? NetProcessingBins { get; set; } + + [JsonPropertyName("RenderBins")] + public List? RenderBins { get; set; } + + [JsonPropertyName("GameUpdateBins")] + public List? GameUpdateBins { get; set; } + + [JsonPropertyName("MemoryMeasureInterval")] + public int? MemoryMeasureInterval { get; set; } +} diff --git a/Core/Models/Eft/Health/SyncHealthRequestData.cs b/Core/Models/Eft/Health/SyncHealthRequestData.cs new file mode 100644 index 00000000..fba8921d --- /dev/null +++ b/Core/Models/Eft/Health/SyncHealthRequestData.cs @@ -0,0 +1,57 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Health; + +public class SyncHealthRequestData +{ + [JsonPropertyName("Health")] + public List? Health { get; set; } + + [JsonPropertyName("IsAlive")] + public bool? IsAlive { get; set; } + + [JsonPropertyName("Hydration")] + public double? Hydration { get; set; } + + [JsonPropertyName("Energy")] + public double? Energy { get; set; } + + [JsonPropertyName("Temperature")] + public double? Temperature { get; set; } +} + +public class BodyPartCollection +{ + [JsonPropertyName("Head")] + public BodyPartHealth? Head { get; set; } + + [JsonPropertyName("Chest")] + public BodyPartHealth? Chest { get; set; } + + [JsonPropertyName("Stomach")] + public BodyPartHealth? Stomach { get; set; } + + [JsonPropertyName("LeftArm")] + public BodyPartHealth? LeftArm { get; set; } + + [JsonPropertyName("RightArm")] + public BodyPartHealth? RightArm { get; set; } + + [JsonPropertyName("LeftLeg")] + public BodyPartHealth? LeftLeg { get; set; } + + [JsonPropertyName("RightLeg")] + public BodyPartHealth? RightLeg { get; set; } +} + +public class BodyPartHealth +{ + [JsonPropertyName("Maximum")] + public int? Maximum { get; set; } + + [JsonPropertyName("Current")] + public int? Current { get; set; } + + [JsonPropertyName("Effects")] + public Dictionary? Effects { get; set; } +} diff --git a/Core/Models/Eft/InRaid/InsuredItemsData.cs b/Core/Models/Eft/InRaid/InsuredItemsData.cs new file mode 100644 index 00000000..2d54cb3a --- /dev/null +++ b/Core/Models/Eft/InRaid/InsuredItemsData.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.InRaid; + +public class InsuredItemsData +{ + [JsonPropertyName("id")] + public string? Id { get; set; } + + [JsonPropertyName("durability")] + public int? Durability { get; set; } + + [JsonPropertyName("maxDurability")] + public int? MaxDurability { get; set; } + + [JsonPropertyName("hits")] + public int? Hits { get; set; } + + [JsonPropertyName("usedInQuest")] + public bool? UsedInQuest { get; set; } +} diff --git a/Core/Models/Eft/InRaid/ItemDeliveryRequestData.cs b/Core/Models/Eft/InRaid/ItemDeliveryRequestData.cs new file mode 100644 index 00000000..d582e5af --- /dev/null +++ b/Core/Models/Eft/InRaid/ItemDeliveryRequestData.cs @@ -0,0 +1,13 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Eft.InRaid; + +public class ItemDeliveryRequestData +{ + [JsonPropertyName("items")] + public List? Items { get; set; } + + [JsonPropertyName("traderId")] + public string? TraderId { get; set; } +} diff --git a/Core/Models/Eft/Inventory/AddItemDirectRequest.cs b/Core/Models/Eft/Inventory/AddItemDirectRequest.cs new file mode 100644 index 00000000..0dc05c97 --- /dev/null +++ b/Core/Models/Eft/Inventory/AddItemDirectRequest.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Eft.Inventory; + +public class AddItemDirectRequest +{ + /// + /// Item and child mods to add to player inventory + /// + [JsonPropertyName("itemWithModsToAdd")] + public List? ItemWithModsToAdd { get; set; } + + [JsonPropertyName("foundInRaid")] + public bool? FoundInRaid { get; set; } + + [JsonPropertyName("callback")] + public Action? Callback { get; set; } + + [JsonPropertyName("useSortingTable")] + public bool? UseSortingTable { get; set; } +} diff --git a/Core/Models/Eft/Inventory/AddItemRequestData.cs b/Core/Models/Eft/Inventory/AddItemRequestData.cs new file mode 100644 index 00000000..9f4ebdd9 --- /dev/null +++ b/Core/Models/Eft/Inventory/AddItemRequestData.cs @@ -0,0 +1,25 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Inventory; + +public class AddItemRequestData +{ + // Trader id + [JsonPropertyName("tid")] + public string? TraderId { get; set; } + + [JsonPropertyName("items")] + public List? Items { get; set; } +} + +public class ItemToAdd +{ + [JsonPropertyName("count")] + public int? Count { get; set; } + + [JsonPropertyName("sptIsPreset")] + public bool? IsPreset { get; set; } + + [JsonPropertyName("item_id")] + public string? ItemId { get; set; } +} diff --git a/Core/Models/Eft/Inventory/AddItemTempObject.cs b/Core/Models/Eft/Inventory/AddItemTempObject.cs new file mode 100644 index 00000000..39804d0e --- /dev/null +++ b/Core/Models/Eft/Inventory/AddItemTempObject.cs @@ -0,0 +1,23 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Eft.Inventory; + +public class AddItemTempObject +{ + [JsonPropertyName("itemRef")] + public Item? ItemReference { get; set; } + + [JsonPropertyName("count")] + public int? ItemCount { get; set; } + + [JsonPropertyName("isPreset")] + public bool? IsPresetItem { get; set; } + + [JsonPropertyName("location")] + public ItemLocation? ItemLocation { get; set; } + + // Container item will be placed in - stash or sorting table + [JsonPropertyName("containerId")] + public string? ContainerIdentifier { get; set; } +} diff --git a/Core/Models/Eft/Inventory/AddItemsDirectRequest.cs b/Core/Models/Eft/Inventory/AddItemsDirectRequest.cs new file mode 100644 index 00000000..a34008d9 --- /dev/null +++ b/Core/Models/Eft/Inventory/AddItemsDirectRequest.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Eft.Inventory; + +public class AddItemsDirectRequest +{ + /// Item and child mods to add to player inventory + [JsonPropertyName("itemsWithModsToAdd")] + public List>? ItemsWithModsToAdd { get; set; } + + [JsonPropertyName("foundInRaid")] + public bool? FoundInRaid { get; set; } + + /// Runs after EACH item with children is added + [JsonPropertyName("callback")] + public Action? Callback { get; set; } + + /// Should sorting table be used when no space found in stash + [JsonPropertyName("useSortingTable")] + public bool? UseSortingTable { get; set; } +} diff --git a/Core/Models/Eft/Inventory/InventoryAddRequestData.cs b/Core/Models/Eft/Inventory/InventoryAddRequestData.cs new file mode 100644 index 00000000..a8c96946 --- /dev/null +++ b/Core/Models/Eft/Inventory/InventoryAddRequestData.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Inventory; + +public class InventoryAddRequestData : InventoryBaseActionRequestData +{ + [JsonPropertyName("Action")] + public string? Action { get; set; } = "Add"; + + [JsonPropertyName("item")] + public string? Item { get; set; } + + [JsonPropertyName("container")] + public Container? Container { get; set; } +} diff --git a/Core/Models/Eft/Inventory/InventoryUnbindRequestData.cs b/Core/Models/Eft/Inventory/InventoryUnbindRequestData.cs new file mode 100644 index 00000000..b41131bf --- /dev/null +++ b/Core/Models/Eft/Inventory/InventoryUnbindRequestData.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Inventory; + +public class InventoryUnbindRequestData : InventoryBaseActionRequestData +{ + [JsonPropertyName("Action")] + public string? Action { get; set; } = "Unbind"; + + [JsonPropertyName("item")] + public string? Item { get; set; } + + [JsonPropertyName("index")] + public int? Index { get; set; } +} diff --git a/Core/Models/Eft/Launcher/MiniProfile.cs b/Core/Models/Eft/Launcher/MiniProfile.cs new file mode 100644 index 00000000..584609e8 --- /dev/null +++ b/Core/Models/Eft/Launcher/MiniProfile.cs @@ -0,0 +1,39 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Launcher; + +public class MiniProfile +{ + [JsonPropertyName("username")] + public string? Username { get; set; } + + [JsonPropertyName("nickname")] + public string? Nickname { get; set; } + + [JsonPropertyName("side")] + public string? Side { get; set; } + + [JsonPropertyName("currlvl")] + public int? CurrentLevel { get; set; } + + [JsonPropertyName("currexp")] + public int? CurrentExperience { get; set; } + + [JsonPropertyName("prevexp")] + public int? PreviousExperience { get; set; } + + [JsonPropertyName("nextlvl")] + public int? NextLevel { get; set; } + + [JsonPropertyName("maxlvl")] + public int? MaxLevel { get; set; } + + [JsonPropertyName("edition")] + public string? Edition { get; set; } + + [JsonPropertyName("profileId")] + public string? ProfileId { get; set; } + + [JsonPropertyName("sptData")] + public Profile.Spt? SptData { get; set; } +} diff --git a/Core/Models/Eft/Location/AirdropLootResult.cs b/Core/Models/Eft/Location/AirdropLootResult.cs new file mode 100644 index 00000000..a25ace10 --- /dev/null +++ b/Core/Models/Eft/Location/AirdropLootResult.cs @@ -0,0 +1,13 @@ +using System.Text.Json.Serialization; +using Core.Models.Spt.Services; + +namespace Core.Models.Eft.Location; + +public class AirdropLootResult +{ + [JsonPropertyName("dropType")] + public string? DropType { get; set; } + + [JsonPropertyName("loot")] + public List? Loot { get; set; } +} diff --git a/Core/Models/Eft/Location/GetLocationRequestData.cs b/Core/Models/Eft/Location/GetLocationRequestData.cs new file mode 100644 index 00000000..d246eca7 --- /dev/null +++ b/Core/Models/Eft/Location/GetLocationRequestData.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Location; + +public class GetLocationRequestData +{ + [JsonPropertyName("crc")] + public int? Crc { get; set; } + + [JsonPropertyName("locationId")] + public string? LocationId { get; set; } + + [JsonPropertyName("variantId")] + public int? VariantId { get; set; } +} diff --git a/Core/Models/Eft/Match/EndOfflineRaidRequestData.cs b/Core/Models/Eft/Match/EndOfflineRaidRequestData.cs new file mode 100644 index 00000000..72c5774f --- /dev/null +++ b/Core/Models/Eft/Match/EndOfflineRaidRequestData.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Match; + +public class EndOfflineRaidRequestData +{ + [JsonPropertyName("crc")] + public int? Crc { get; set; } + + [JsonPropertyName("exitStatus")] + public string? ExitStatus { get; set; } + + [JsonPropertyName("exitName")] + public string? ExitName { get; set; } + + [JsonPropertyName("raidSeconds")] + public int? RaidSeconds { get; set; } +} diff --git a/Core/Models/Eft/Match/ProfileStatusRequest.cs b/Core/Models/Eft/Match/ProfileStatusRequest.cs new file mode 100644 index 00000000..56273bfe --- /dev/null +++ b/Core/Models/Eft/Match/ProfileStatusRequest.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Match; + +public class ProfileStatusRequest +{ + [JsonPropertyName("groupId")] + public int? GroupId { get; set; } +} diff --git a/Core/Models/Eft/Match/UpdatePingRequestData.cs b/Core/Models/Eft/Match/UpdatePingRequestData.cs new file mode 100644 index 00000000..26256f83 --- /dev/null +++ b/Core/Models/Eft/Match/UpdatePingRequestData.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Match; + +public class UpdatePingRequestData +{ + [JsonPropertyName("servers")] + public List? servers { get; set; } +} diff --git a/Core/Models/Eft/Profile/MessageContentRagfair.cs b/Core/Models/Eft/Profile/MessageContentRagfair.cs new file mode 100644 index 00000000..adcd2c7e --- /dev/null +++ b/Core/Models/Eft/Profile/MessageContentRagfair.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Eft.Profile; + +public class MessageContentRagfair +{ + [JsonPropertyName("offerId")] + public string? OfferId { get; set; } + + [JsonPropertyName("count")] + public int? Count { get; set; } + + [JsonPropertyName("handbookId")] + public string? HandbookId { get; set; } +} diff --git a/Core/Models/Eft/Profile/SptProfile.cs b/Core/Models/Eft/Profile/SptProfile.cs index c02b6a60..ef43a2af 100644 --- a/Core/Models/Eft/Profile/SptProfile.cs +++ b/Core/Models/Eft/Profile/SptProfile.cs @@ -548,15 +548,3 @@ public class Insurance [JsonPropertyName("items")] public List? Items { get; set; } } - -public class MessageContentRagfair -{ - [JsonPropertyName("offerId")] - public string? OfferId { get; set; } - - [JsonPropertyName("count")] - public int? Count { get; set; } - - [JsonPropertyName("handbookId")] - public string? HandbookId { get; set; } -}