using System.Text.Json.Serialization; using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.ItemEvent; using Core.Models.Eft.Repair; using Core.Models.Enums; using BonusSettings = Core.Models.Spt.Config.BonusSettings; namespace Core.Services; [Injectable(InjectionType.Singleton)] public class RepairService { /// /// Use trader to repair an items durability /// /// Session id /// Profile to find item to repair in /// Details of the item to repair /// Trader being used to repair item /// RepairDetails object public RepairDetails RepairItemByTrader( string sessionID, PmcData pmcData, RepairItem repairItemDetails, string traderId ) { throw new NotImplementedException(); } /// /// /// Session id /// Profile to take money from /// Repaired item id /// Cost to repair item in roubles /// Id of the trader who repaired the item / who is paid /// public void PayForRepair( string sessionID, PmcData pmcData, string repairedItemId, decimal repairCost, string traderId, ItemEventRouterResponse output ) { throw new NotImplementedException(); } /// /// Add skill points to profile after repairing an item /// /// Session id /// Details of item repaired, cost/item /// Profile to add points to public void AddRepairSkillPoints(string sessionId, RepairDetails repairDetails, PmcData pmcData) { throw new NotImplementedException(); } protected decimal GetIntellectGainedFromRepair(RepairDetails repairDetails) { throw new NotImplementedException(); } /// /// Return an approximation of the amount of skill points live would return for the given repairDetails /// /// The repair details to calculate skill points for /// The number of skill points to reward the user protected decimal GetWeaponRepairSkillPoints(RepairDetails repairDetails) { throw new NotImplementedException(); } /// /// /// Session id /// Profile to update repaired item in /// List of Repair kits to use /// Item id to repair /// ItemEventRouterResponse /// Details of repair, item/price public RepairDetails RepairItemByKit( string sessionId, PmcData pmcData, List repairKits, string itemToRepairId, ItemEventRouterResponse output ) { throw new NotImplementedException(); } /// /// Calculate value repairkit points need to be divided by to get the durability points to be added to an item /// /// Item to repair details /// Is the item being repaired armor /// Player profile /// Number to divide kit points by protected decimal GetKitDivisor(TemplateItem itemToRepairDetails, bool isArmor, PmcData pmcData) { throw new NotImplementedException(); } /// /// Get the bonus multiplier for a skill from a player profile /// /// Bonus to get multiplier of /// Player profile to look in for skill /// Multiplier value protected decimal GetBonusMultiplierValue(BonusType skillBonus, PmcData pmcData) { throw new NotImplementedException(); } /// /// Should a repair kit apply total durability loss on repair /// /// Player profile /// Value from repair config /// True if loss should be applied protected bool ShouldRepairKitApplyDurabilityLoss(PmcData pmcData, bool applyRandomizeDurabilityLoss) { throw new NotImplementedException(); } /// /// Update repair kits Resource object if it doesn't exist /// /// Repair kit details from db /// Repair kit to update protected void AddMaxResourceToKitIfMissing(TemplateItem repairKitDetails, Item repairKitInInventory) { throw new NotImplementedException(); } /// /// Chance to apply buff to an item (Armor/weapon) if repaired by armor kit /// /// Repair details of item /// Player profile public void AddBuffToItem(RepairDetails repairDetails, PmcData pmcData) { throw new NotImplementedException(); } /// /// Add random buff to item /// /// weapon/armor config /// Details for item to repair public void AddBuff(Core.Models.Spt.Config.BonusSettings itemConfig, Item item) { throw new NotImplementedException(); } /// /// Check if item should be buffed by checking the item type and relevant player skill level /// /// Item that was repaired /// tpl of item to be buffed /// Player profile /// True if item should have buff applied protected bool ShouldBuffItem(RepairDetails repairDetails, PmcData pmcData) { throw new NotImplementedException(); } /// /// Based on item, what underlying skill does this item use for buff settings /// /// Item to check for skill /// Skill name protected SkillTypes? GetItemSkillType(TemplateItem itemTemplate) { throw new NotImplementedException(); } /// /// Ensure multiplier is between 1 and 0.01 /// /// Max durability percent /// current durability percent /// durability multiplier value protected double GetDurabilityMultiplier(double receiveDurabilityMaxPercent, double receiveDurabilityPercent) { throw new NotImplementedException(); } } public class RepairDetails { [JsonPropertyName("repairCost")] public double? RepairCost { get; set; } [JsonPropertyName("repairPoints")] public double? RepairPoints { get; set; } [JsonPropertyName("repairedItem")] public Item? RepairedItem { get; set; } [JsonPropertyName("repairedItemIsArmor")] public bool? RepairedItemIsArmor { get; set; } [JsonPropertyName("repairAmount")] public double? RepairAmount { get; set; } [JsonPropertyName("repairedByKit")] public bool? RepairedByKit { get; set; } }