using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.Ragfair;
using Core.Models.Spt.Config;
using Core.Models.Spt.Ragfair;
namespace Core.Generators;
public class RagfairOfferGenerator
{
public RagfairOfferGenerator()
{
}
///
/// Create a flea offer and store it in the Ragfair server offers list
///
/// Owner of the offer
/// Time offer is listed at
/// Items in the offer
/// Cost of item (currency or barter)
/// Loyalty level needed to buy item
/// Flags sellInOnePiece to be true
/// Created flea offer
public RagfairOffer CreateAndAddFleaOffer(
string userID,
double time,
List- items,
List barterScheme,
int loyalLevel,
bool sellInOnePiece = false)
{
throw new NotImplementedException();
}
///
/// Create an offer object ready to send to ragfairOfferService.addOffer()
///
/// Owner of the offer
/// Time offer is listed at
/// Items in the offer
/// Cost of item (currency or barter)
/// Loyalty level needed to buy item
/// Is offer being created flagged as a pack
/// RagfairOffer
protected RagfairOffer CreateOffer(
string userID,
double time,
List
- items,
List barterScheme,
int loyalLevel,
bool isPackOffer = false)
{
throw new NotImplementedException();
}
///
/// Create the user object stored inside each flea offer object
///
/// user creating the offer
/// Is the user creating the offer a trader
/// RagfairOfferUser
protected RagfairOfferUser CreateUserDataForFleaOffer(string userID, bool isTrader)
{
throw new NotImplementedException();
}
///
/// Calculate the offer price that's listed on the flea listing
///
/// barter requirements for offer
/// rouble cost of offer
protected decimal ConvertOfferRequirementsIntoRoubles(List offerRequirements)
{
throw new NotImplementedException();
}
///
/// Get avatar url from trader table in db
///
/// Is user we're getting avatar for a trader
/// persons id to get avatar of
/// url of avatar
protected string GetAvatarUrl(bool isTrader, string userId)
{
throw new NotImplementedException();
}
///
/// Convert a count of currency into roubles
///
/// amount of currency to convert into roubles
/// Type of currency (euro/dollar/rouble)
/// count of roubles
protected double CalculateRoublePrice(decimal currencyCount, string currencyType)
{
throw new NotImplementedException();
}
///
/// Check userId, if its a player, return their pmc _id, otherwise return userId parameter
///
/// Users Id to check
/// Users Id
protected string GetTraderId(string userId)
{
throw new NotImplementedException();
}
///
/// Get a flea trading rating for the passed in user
///
/// User to get flea rating of
/// Flea rating value
protected double GetRating(string userId)
{
throw new NotImplementedException();
}
///
/// Is the offers user rating growing
///
/// user to check rating of
/// true if its growing
protected bool GetRatingGrowing(string userID)
{
throw new NotImplementedException();
}
///
/// Get number of section until offer should expire
///
/// Id of the offer owner
/// Time the offer is posted
/// number of seconds until offer expires
protected double GetOfferEndTime(string userID, double time)
{
throw new NotImplementedException();
}
///
/// Create multiple offers for items by using a unique list of items we've generated previously
///
/// optional, expired offers to regenerate
public async Task GenerateDynamicOffers(List
> expiredOffers = null)
{
throw new NotImplementedException();
}
///
///
/// Item with its children to process into offers
/// is an expired offer
/// Ragfair dynamic config
protected async Task CreateOffersFromAssort(List- assortItemWithChildren, bool isExpiredOffer, Dynamic config)
{
throw new NotImplementedException();
}
///
/// iterate over an items chidren and look for plates above desired level and remove them
///
/// preset to check for plates
/// Settings
/// True if plate removed
protected bool RemoveBannedPlatesFromPreset(List
- presetWithChildren, ArmorPlateBlacklistSettings plateSettings)
{
throw new NotImplementedException();
}
///
/// Create one flea offer for a specific item
///
/// Id of seller
/// Item to create offer for
/// Is item a weapon preset
/// Raw db item details
/// Item array
protected async Task CreateSingleOfferForItem(string sellerId, List
- itemWithChildren, bool isPreset, TemplateItem itemToSellDetails)
{
throw new NotImplementedException();
}
///
/// Generate trader offers on flea using the traders assort data
///
/// Trader to generate offers for
public void GenerateFleaOffersForTrader(string traderID)
{
throw new NotImplementedException();
}
///
/// Get array of an item with its mods + condition properties (e.g durability)
/// Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition
///
/// id of owner of item
/// Item and mods, get condition of first item (only first array item is modified)
/// db details of first item
protected void RandomiseOfferItemUpdProperties(string userID, List
- itemWithMods, TemplateItem itemDetails)
{
throw new NotImplementedException();
}
protected string? GetDynamicConditionIdForTpl(string tpl)
{
throw new NotImplementedException();
}
/**
* Alter an items condition based on its item base type
* @param conditionSettingsId also the parentId of item being altered
* @param itemWithMods Item to adjust condition details of
* @param itemDetails db item details of first item in array
*/
protected void RandomiseItemCondition(string conditionSettingsId, List
- itemWithMods, TemplateItem itemDetails)
{
throw new NotImplementedException();
}
/**
* Adjust an items durability/maxDurability value
* @param item item (weapon/armor) to Adjust
* @param itemDbDetails Weapon details from db
* @param maxMultiplier Value to multiply max durability by
* @param currentMultiplier Value to multiply current durability by
*/
protected void RandomiseWeaponDurability(Item item, TemplateItem itemDbDetails, double maxMultiplier, double currentMultiplier)
{
throw new NotImplementedException();
}
/**
* Randomise the durability values for an armors plates and soft inserts
* @param armorWithMods Armor item with its child mods
* @param currentMultiplier Chosen multiplier to use for current durability value
* @param maxMultiplier Chosen multiplier to use for max durability value
*/
protected void RandomiseArmorDurabilityValues(List
- armorWithMods, double currentMultiplier, double maxMultiplier)
{
throw new NotImplementedException();
}
///
/// Add missing conditions to an item if needed
/// Durability for repairable items
/// HpResource for medical items
///
/// item to add conditions to
protected void AddMissingConditions(Item item)
{
throw new NotImplementedException();
}
///
/// Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
///
/// Items for sale in offer
/// Barter config from ragfairConfig.dynamic.barter
/// Barter scheme
protected List CreateBarterBarterScheme(List
- offerItems, BarterDetails barterConfig)
{
throw new NotImplementedException();
}
///
/// Get a list of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter`
///
/// list with tpl/price values
protected List GetFleaPricesAsList()
{
throw new NotImplementedException();
}
///
/// Create a random currency-based barter scheme for a list of items
///
/// Items on offer
/// Is the barter scheme being created for a pack offer
/// What to multiply the resulting price by
/// Barter scheme for offer
protected List CreateCurrencyBarterScheme(List
- offerWithChildren, bool isPackOffer, double multipler = 1)
{
throw new NotImplementedException();
}
}