Merge pull request #26 from CWXDEV/main
more shit, fuck that itemtpl enum
This commit is contained in:
+801
-2
@@ -1,6 +1,805 @@
|
||||
namespace Core.Helpers;
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Common;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class ItemHelper
|
||||
{
|
||||
|
||||
/**
|
||||
* Does the provided pool of items contain the desired item
|
||||
* @param itemPool Item collection to check
|
||||
* @param item Item to look for
|
||||
* @param slotId OPTIONAL - slotid of desired item
|
||||
* @returns True if pool contains item
|
||||
*/
|
||||
public bool hasItemWithTpl(List<Item> itemPool, string item, string slotId = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the first item from provided pool with the desired tpl
|
||||
* @param itemPool Item collection to search
|
||||
* @param item Item to look for
|
||||
* @param slotId OPTIONAL - slotid of desired item
|
||||
* @returns Item or null
|
||||
*/
|
||||
public Item getItemFromPoolByTpl(List<Item> itemPool, string item, string slotId = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will compare two items (with all its children) and see if they are equivalent.
|
||||
* This method will NOT compare IDs on the items
|
||||
* @param item1 first item with all its children to compare
|
||||
* @param item2 second item with all its children to compare
|
||||
* @param compareUpdProperties Upd properties to compare between the items
|
||||
* @returns true if they are the same, false if they aren't
|
||||
*/
|
||||
public bool isSameItems(List<Item> item1, List<Item> item2, HashSet<string> compareUpdProperties = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will compare two items and see if they are equivalent.
|
||||
* This method will NOT compare IDs on the items
|
||||
* @param item1 first item to compare
|
||||
* @param item2 second item to compare
|
||||
* @param compareUpdProperties Upd properties to compare between the items
|
||||
* @returns true if they are the same, false if they aren't
|
||||
*/
|
||||
public bool isSameItem(Item item1, Item item2, HashSet<string> compareUpdProperties = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to generate a Upd based on a template
|
||||
* @param itemTemplate the item template to generate a Upd for
|
||||
* @returns A Upd with all the default properties set
|
||||
*/
|
||||
public Upd generateUpdForItem(TemplateItem itemTemplate)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a tpl is a valid item. Valid meaning that it's an item that can be stored in stash
|
||||
* Valid means:
|
||||
* Not quest item
|
||||
* 'Item' type
|
||||
* Not on the invalid base types array
|
||||
* Price above 0 roubles
|
||||
* Not on item config blacklist
|
||||
* @param tpl the template id / tpl
|
||||
* @returns boolean; true for items that may be in player possession and not quest items
|
||||
*/
|
||||
public bool isValidItem(string tpl, List<string> invalidBaseTypes = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Check if the tpl / template Id provided is a descendent of the baseclass
|
||||
//
|
||||
// @param string tpl the item template id to check
|
||||
// @param string baseClassTpl the baseclass to check for
|
||||
// @return bool is the tpl a descendent?
|
||||
public bool OfBaseclass(string tpl, string baseClassTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Check if item has any of the supplied base classes
|
||||
// @param string tpl Item to check base classes of
|
||||
// @param string[] baseClassTpls base classes to check for
|
||||
// @returns true if any supplied base classes match
|
||||
public bool OfBaseclasses(string tpl, List<string> baseClassTpls)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Does the provided item have the chance to require soft armor inserts
|
||||
// Only applies to helmets/vest/armors.
|
||||
// Not all head gear needs them
|
||||
// @param string itemTpl item to check
|
||||
// @returns Does item have the possibility ot need soft inserts
|
||||
public bool ArmorItemCanHoldMods(string itemTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Does the provided item tpl need soft/removable inserts to function
|
||||
// @param string itemTpl Armor item
|
||||
// @returns True if item needs some kind of insert
|
||||
public bool ArmorItemHasRemovableOrSoftInsertSlots(string itemTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Does the pased in tpl have ability to hold removable plate items
|
||||
// @param string itemTpl item tpl to check for plate support
|
||||
// @returns True when armor can hold plates
|
||||
public bool ArmorItemHasRemovablePlateSlots(string itemTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Does the provided item tpl require soft inserts to become a valid armor item
|
||||
// @param string itemTpl Item tpl to check
|
||||
// @returns True if it needs armor inserts
|
||||
public bool ItemRequiresSoftInserts(string itemTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Get all soft insert slot ids
|
||||
// @returns A List of soft insert ids (e.g. soft_armor_back, helmet_top)
|
||||
public List<string> GetSoftInsertSlotIds()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Returns the items total price based on the handbook or as a fallback from the prices.json if the item is not
|
||||
// found in the handbook. If the price can't be found at all return 0
|
||||
// @param List<string> tpls item tpls to look up the price of
|
||||
// @returns Total price in roubles
|
||||
public decimal GetItemAndChildrenPrice(List<string> tpls)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||
/// found in the handbook. If the price can't be found at all return 0
|
||||
/// </summary>
|
||||
/// <param name="tpl">Item to look price up of</param>
|
||||
/// <returns>Price in roubles</returns>
|
||||
public decimal GetItemPrice(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||
/// found in the handbook. If the price can't be found at all return 0
|
||||
/// </summary>
|
||||
/// <param name="tpl">Item to look price up of</param>
|
||||
/// <returns>Price in roubles</returns>
|
||||
public decimal GetItemMaxPrice(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the static (handbook) price in roubles for an item by tpl
|
||||
/// </summary>
|
||||
/// <param name="tpl">Items tpl id to look up price</param>
|
||||
/// <returns>Price in roubles (0 if not found)</returns>
|
||||
public decimal GetStaticItemPrice(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the dynamic (flea) price in roubles for an item by tpl
|
||||
/// </summary>
|
||||
/// <param name="tpl">Items tpl id to look up price</param>
|
||||
/// <returns>Price in roubles (undefined if not found)</returns>
|
||||
public decimal GetDynamicItemPrice(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update items upd.StackObjectsCount to be 1 if its upd is missing or StackObjectsCount is undefined
|
||||
/// </summary>
|
||||
/// <param name="item">Item to update</param>
|
||||
/// <returns>Fixed item</returns>
|
||||
public Item FixItemStackCount(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get cloned copy of all item data from items.json
|
||||
/// </summary>
|
||||
/// <returns>List of TemplateItem objects</returns>
|
||||
public List<TemplateItem> GetItems()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets item data from items.json
|
||||
* @param tpl items template id to look up
|
||||
* @returns bool - is valid + template item object as array
|
||||
*/
|
||||
public (bool, Dictionary<string, TemplateItem>) GetItem(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the item has slots
|
||||
* @param itemTpl Template id of the item to check
|
||||
* @returns true if the item has slots
|
||||
*/
|
||||
public bool ItemHasSlots(string itemTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the item is in the database
|
||||
* @param tpl Template id of the item to check
|
||||
* @returns true if the item is in the database
|
||||
*/
|
||||
public bool IsItemInDb(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the average quality of an item and its children
|
||||
* @param items An offers item to process
|
||||
* @param skipArmorItemsWithoutDurability Skip over armor items without durability
|
||||
* @returns % quality modifier between 0 and 1
|
||||
*/
|
||||
public double GetItemQualityModifierForItems(List<Item> items, bool? skipArmorItemsWithoutDurability = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get normalized value (0-1) based on item condition
|
||||
* Will return -1 for base armor items with 0 durability
|
||||
* @param item Item to check
|
||||
* @param skipArmorItemsWithoutDurability return -1 for armor items that have max durability of 0
|
||||
* @returns Number between 0 and 1
|
||||
*/
|
||||
public double GetItemQualityModifier(Item item, bool? skipArmorItemsWithoutDurability = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a quality value based on a repairable item's current state between current and max durability
|
||||
* @param itemDetails Db details for item we want quality value for
|
||||
* @param repairable Repairable properties
|
||||
* @param item Item quality value is for
|
||||
* @returns A number between 0 and 1
|
||||
*/
|
||||
protected double GetRepairableItemQualityValue(
|
||||
Dictionary<string, TemplateItem> itemDetails,
|
||||
UpdRepairable repairable,
|
||||
Item item
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive function that looks at every item from parameter and gets their children's Ids + includes parent item in results
|
||||
* @param items List of items (item + possible children)
|
||||
* @param baseItemId Parent item's id
|
||||
* @returns a list of strings
|
||||
*/
|
||||
public List<string> FindAndReturnChildrenByItems(List<Item> items, string baseItemId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* A variant of FindAndReturnChildren where the output is list of item objects instead of their ids.
|
||||
* @param items List of items (item + possible children)
|
||||
* @param baseItemId Parent item's id
|
||||
* @param modsOnly Include only mod items, exclude items stored inside root item
|
||||
* @returns A list of Item objects
|
||||
*/
|
||||
public List<Item> FindAndReturnChildrenAsItems(List<Item> items, string baseItemId, bool modsOnly = false)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
||||
* @param itemIdToFind Template id of item to check for
|
||||
* @param assort List of items to check in
|
||||
* @returns List of children of requested item
|
||||
*/
|
||||
public List<Item> FindAndReturnChildrenByAssort(string itemIdToFind, List<Item> assort)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the passed in item has buy count restrictions
|
||||
* @param itemToCheck Item to check
|
||||
* @returns true if it has buy restrictions
|
||||
*/
|
||||
public bool HasBuyRestrictions(Item itemToCheck)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the passed template id is a dog tag.
|
||||
/// </summary>
|
||||
/// <param name="tpl">Template id to check.</param>
|
||||
/// <returns>True if it is a dogtag.</returns>
|
||||
public bool IsDogtag(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the identifier for a child using slotId, locationX and locationY.
|
||||
/// </summary>
|
||||
/// <param name="item">Item.</param>
|
||||
/// <returns>SlotId OR slotid, locationX, locationY.</returns>
|
||||
public string GetChildId(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the passed item can be stacked.
|
||||
/// </summary>
|
||||
/// <param name="tpl">Item to check.</param>
|
||||
/// <returns>True if it can be stacked.</returns>
|
||||
public bool IsItemTplStackable(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Splits the item stack if it exceeds its items StackMaxSize property into child items of the passed parent.
|
||||
/// </summary>
|
||||
/// <param name="itemToSplit">Item to split into smaller stacks.</param>
|
||||
/// <returns>List of root item + children.</returns>
|
||||
public List<Item> SplitStack(Item itemToSplit)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Turns items like money into separate stacks that adhere to max stack size.
|
||||
/// </summary>
|
||||
/// <param name="itemToSplit">Item to split into smaller stacks.</param>
|
||||
/// <returns>List of separate item stacks.</returns>
|
||||
public List<List<Item>> SplitStackIntoSeparateItems(Item itemToSplit)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds Barter items from a list of items.
|
||||
/// </summary>
|
||||
/// <param name="by">Tpl or id.</param>
|
||||
/// <param name="itemsToSearch">Array of items to iterate over.</param>
|
||||
/// <param name="desiredBarterItemIds">Desired barter item ids.</param>
|
||||
/// <returns>List of Item objects.</returns>
|
||||
public List<Item> FindBarterItems(string by, List<Item> itemsToSearch, string desiredBarterItemIds)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the _id value for the base item + all children that are children of it.
|
||||
/// REPARENTS ROOT ITEM ID, NOTHING ELSE.
|
||||
/// </summary>
|
||||
/// <param name="itemWithChildren">Item with mods to update.</param>
|
||||
/// <param name="newId">New id to add on children of base item.</param>
|
||||
public void ReplaceRootItemID(List<Item> itemWithChildren, string newId = "")
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Regenerate all GUIDs with new IDs, for the exception of special item types (e.g. quest, sorting table, etc.) This
|
||||
/// function will not mutate the original items list, but will return a new list with new GUIDs.
|
||||
/// </summary>
|
||||
/// <param name="originalItems">Items to adjust the IDs of</param>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="insuredItems">Insured items that should not have their IDs replaced</param>
|
||||
/// <param name="fastPanel">Quick slot panel</param>
|
||||
/// <returns>List<Item></returns>
|
||||
public List<Item> ReplaceIDs(
|
||||
List<Item> originalItems,
|
||||
PmcData pmcData = null,
|
||||
List<InsuredItem> insuredItems = null,
|
||||
object fastPanel = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the passed in list of items as found in raid.
|
||||
/// Modifies passed in items
|
||||
/// </summary>
|
||||
/// <param name="items">The list of items to mark as FiR</param>
|
||||
public void SetFoundInRaid(List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
||||
/// </summary>
|
||||
/// <param name="tpl">Items tpl to check parents of</param>
|
||||
/// <param name="tplsToCheck">Tpl values to check if parents of item match</param>
|
||||
/// <returns>bool Match found</returns>
|
||||
public bool DoesItemOrParentsIdMatch(string tpl, List<string> tplsToCheck)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if item is quest item
|
||||
/// </summary>
|
||||
/// <param name="tpl">Items tpl to check quest status of</param>
|
||||
/// <returns>true if item is flagged as quest item</returns>
|
||||
public bool IsQuestItem(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if the item is *actually* moddable in-raid. Checks include the items existence in the database, the
|
||||
/// parent items existence in the database, the existence (and value) of the items RaidModdable property, and that
|
||||
/// the parents slot-required property exists, matches that of the item, and its value.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to be checked</param>
|
||||
/// <param name="parent">The parent of the item to be checked</param>
|
||||
/// <returns>True if the item is actually moddable, false if it is not, and null if the check cannot be performed.</returns>
|
||||
public bool? IsRaidModdable(Item item, Item parent)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the main parent item for a given attachment item.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The unique identifier of the item for which to find the main parent.</param>
|
||||
/// <param name="itemsMap">A Dictionary containing item IDs mapped to their corresponding Item objects for quick lookup.</param>
|
||||
/// <returns>The Item object representing the top-most parent of the given item, or null if no such parent exists.</returns>
|
||||
public Item GetAttachmentMainParent(string itemId, Dictionary<string, Item> itemsMap)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if an item is an attachment that is currently attached to its parent item.
|
||||
*
|
||||
* @param item The item to check.
|
||||
* @returns true if the item is attached attachment, otherwise false.
|
||||
*/
|
||||
public bool IsAttachmentAttached(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the equipment parent item for a given item.
|
||||
*
|
||||
* This method traverses up the hierarchy of items starting from a given `itemId`, until it finds the equipment
|
||||
* parent item. In other words, if you pass it an item id of a suppressor, it will traverse up the muzzle brake,
|
||||
* barrel, upper receiver, gun, nested backpack, and finally return the backpack Item that is equipped.
|
||||
*
|
||||
* It's important to note that traversal is expensive, so this method requires that you pass it a Dictionary of the items
|
||||
* to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates
|
||||
* some of the performance concerns, as it allows for quick lookups of items by ID.
|
||||
*
|
||||
* @param itemId - The unique identifier of the item for which to find the equipment parent.
|
||||
* @param itemsMap - A Dictionary containing item IDs mapped to their corresponding Item objects for quick lookup.
|
||||
* @returns The Item object representing the equipment parent of the given item, or `null` if no such parent exists.
|
||||
*/
|
||||
public Item GetEquipmentParent(string itemId, Dictionary<string, Item> itemsMap)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the inventory size of an item
|
||||
* @param items Item with children
|
||||
* @param rootItemId
|
||||
* @returns ItemSize object (width and height)
|
||||
*/
|
||||
public ItemSize GetItemSize(List<Item> items, string rootItemId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a random cartridge from an items Filter property
|
||||
* @param item Db item template to look up Cartridge filter values from
|
||||
* @returns Caliber of cartridge
|
||||
*/
|
||||
public string GetRandomCompatibleCaliberTemplateId(TemplateItem item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add cartridges to the ammo box with correct max stack sizes
|
||||
* @param ammoBox Box to add cartridges to
|
||||
* @param ammoBoxDetails Item template from items db
|
||||
*/
|
||||
public void AddCartridgesToAmmoBox(List<Item> ammoBox, TemplateItem ammoBoxDetails)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a single stack of cartridges to the ammo box
|
||||
* @param ammoBox Box to add cartridges to
|
||||
* @param ammoBoxDetails Item template from items db
|
||||
*/
|
||||
public void AddSingleStackCartridgesToAmmoBox(List<Item> ammoBox, TemplateItem ammoBoxDetails)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if item is stored inside of a container
|
||||
* @param itemToCheck Item to check is inside of container
|
||||
* @param desiredContainerSlotId Name of slot to check item is in e.g. SecuredContainer/Backpack
|
||||
* @param items Inventory with child parent items to check
|
||||
* @returns True when item is in container
|
||||
*/
|
||||
public bool ItemIsInsideContainer(Item itemToCheck, string desiredContainerSlotId, List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add child items (cartridges) to a magazine
|
||||
* @param magazine Magazine to add child items to
|
||||
* @param magTemplate Db template of magazine
|
||||
* @param staticAmmoDist Cartridge distribution
|
||||
* @param caliber Caliber of cartridge to add to magazine
|
||||
* @param minSizePercent % the magazine must be filled to
|
||||
* @param defaultCartridgeTpl Cartridge to use when none found
|
||||
* @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist)
|
||||
*/
|
||||
public void FillMagazineWithRandomCartridge(
|
||||
List<Item> magazine,
|
||||
TemplateItem magTemplate,
|
||||
Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist,
|
||||
string caliber = null,
|
||||
double minSizePercent = 0.25,
|
||||
string defaultCartridgeTpl = null,
|
||||
TemplateItem weapon = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add child items to a magazine of a specific cartridge
|
||||
/// </summary>
|
||||
/// <param name="magazineWithChildCartridges">Magazine to add child items to</param>
|
||||
/// <param name="magTemplate">Db template of magazine</param>
|
||||
/// <param name="cartridgeTpl">Cartridge to add to magazine</param>
|
||||
/// <param name="minSizeMultiplier">% the magazine must be filled to</param>
|
||||
public void FillMagazineWithCartridge(
|
||||
List<Item> magazineWithChildCartridges,
|
||||
TemplateItem magTemplate,
|
||||
string cartridgeTpl,
|
||||
double minSizeMultiplier = 0.25
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Choose a random bullet type from the list of possible a magazine has
|
||||
/// </summary>
|
||||
/// <param name="magTemplate">Magazine template from Db</param>
|
||||
/// <returns>Tpl of cartridge</returns>
|
||||
protected string GetRandomValidCaliber(TemplateItem magTemplate)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chose a randomly weighted cartridge that fits
|
||||
/// </summary>
|
||||
/// <param name="caliber">Desired caliber</param>
|
||||
/// <param name="staticAmmoDist">Cartridges and their weights</param>
|
||||
/// <param name="fallbackCartridgeTpl">If a cartridge cannot be found in the above staticAmmoDist param, use this instead</param>
|
||||
/// <param name="cartridgeWhitelist">OPTIONAL whitelist for cartridges</param>
|
||||
/// <returns>Tpl of cartridge</returns>
|
||||
protected string? DrawAmmoTpl(
|
||||
string caliber,
|
||||
Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist,
|
||||
string fallbackCartridgeTpl,
|
||||
List<string>? cartridgeWhitelist = null
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a basic cartridge object
|
||||
/// </summary>
|
||||
/// <param name="parentId">container cartridges will be placed in</param>
|
||||
/// <param name="ammoTpl">Cartridge to insert</param>
|
||||
/// <param name="stackCount">Count of cartridges inside parent</param>
|
||||
/// <param name="location">Location inside parent (e.g. 0, 1)</param>
|
||||
/// <param name="foundInRaid">OPTIONAL - Are cartridges found in raid (SpawnedInSession)</param>
|
||||
/// <returns>Item</returns>
|
||||
public Item CreateCartridges(
|
||||
string parentId,
|
||||
string ammoTpl,
|
||||
int stackCount,
|
||||
int location,
|
||||
bool foundInRaid = false
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the size of a stack, return 1 if no stack object count property found
|
||||
/// </summary>
|
||||
/// <param name="item">Item to get stack size of</param>
|
||||
/// <returns>size of stack</returns>
|
||||
public int GetItemStackSize(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the name of an item from the locale file using the item tpl
|
||||
/// </summary>
|
||||
/// <param name="itemTpl">Tpl of item to get name of</param>
|
||||
/// <returns>Full name, short name if not found</returns>
|
||||
public string GetItemName(string itemTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all item tpls with a desired base type
|
||||
/// </summary>
|
||||
/// <param name="desiredBaseType">Item base type wanted</param>
|
||||
/// <returns>Array of tpls</returns>
|
||||
public List<string> GetItemTplsOfBaseType(string desiredBaseType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add child slot items to an item, chooses random child item if multiple choices exist
|
||||
/// </summary>
|
||||
/// <param name="itemToAdd">array with single object (root item)</param>
|
||||
/// <param name="itemToAddTemplate">Db template for root item</param>
|
||||
/// <param name="modSpawnChanceDict">Optional dictionary of mod name + % chance mod will be included in item (e.g. front_plate: 100)</param>
|
||||
/// <param name="requiredOnly">Only add required mods</param>
|
||||
/// <returns>Item with children</returns>
|
||||
public List<Item> AddChildSlotItems(
|
||||
List<Item> itemToAdd,
|
||||
TemplateItem itemToAddTemplate,
|
||||
Dictionary<string, double>? modSpawnChanceDict = null,
|
||||
bool requiredOnly = false
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter
|
||||
/// </summary>
|
||||
/// <param name="possibleTpls">Tpls to randomly choose from</param>
|
||||
/// <param name="incompatibleModTpls">Incompatible tpls to not allow</param>
|
||||
/// <returns>Chosen tpl or undefined</returns>
|
||||
public string? GetCompatibleTplFromArray(List<string> possibleTpls, HashSet<string> incompatibleModTpls)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the provided item._props.Slots._name property a plate slot
|
||||
/// </summary>
|
||||
/// <param name="slotName">Name of slot (_name) of Items Slot array</param>
|
||||
/// <returns>True if its a slot that holds a removable plate</returns>
|
||||
public bool IsRemovablePlateSlot(string slotName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Get a list of slot names that hold removable plates
|
||||
// Returns Array of slot ids (e.g. front_plate)
|
||||
public List<string> GetRemovablePlateSlotIds()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Generate new unique ids for child items while preserving hierarchy
|
||||
// Base/primary item
|
||||
// Primary item + children of primary item
|
||||
// Returns Item array with updated IDs
|
||||
public List<Item> ReparentItemAndChildren(Item rootItem, List<Item> itemWithChildren)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Update a root items _id property value to be unique
|
||||
// Item to update root items _id property
|
||||
// Optional: new id to use
|
||||
// Returns New root id
|
||||
public string RemapRootItemId(List<Item> itemWithChildren, string newId) // TODO: string newId = this.hashUtil.Generate()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Adopts orphaned items by resetting them as root "hideout" items. Helpful in situations where a parent has been
|
||||
// deleted from a group of items and there are children still referencing the missing parent. This method will
|
||||
// remove the reference from the children to the parent and set item properties to root values.
|
||||
//
|
||||
// The ID of the "root" of the container.
|
||||
// Array of Items that should be adjusted.
|
||||
// Returns Array of Items that have been adopted.
|
||||
public List<Item> AdoptOrphanedItems(string rootId, List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Populate a Map object of items for quick lookup using their ID.
|
||||
//
|
||||
// An array of Items that should be added to a Map.
|
||||
// Returns A Map where the keys are the item IDs and the values are the corresponding Item objects.
|
||||
public Dictionary<string, Item> GenerateItemsMap(List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Add a blank upd object to passed in item if it does not exist already
|
||||
// item to add upd to
|
||||
// text to write to log when upd object was not found
|
||||
// Returns True when upd object was added
|
||||
public bool AddUpdObjectToItem(Item item, string warningMessageWhenMissing = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Return all tpls from Money enum
|
||||
// Returns string tpls
|
||||
public List<string> GetMoneyTpls()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Get a randomised stack size for the passed in ammo
|
||||
// Ammo to get stack size for
|
||||
// Default: Limit to 60 to prevent crazy values when players use stack increase mods
|
||||
// Returns number
|
||||
public int GetRandomisedAmmoStackSize(TemplateItem ammoItemTemplate, int maxLimit = 60)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void GetItemBaseType(string tpl, bool rootOnly = true)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Remove FiR status from passed in items
|
||||
// Items to update FiR status of
|
||||
public void RemoveSpawnedInSessionPropertyFromItems(List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class ItemSize
|
||||
{
|
||||
[JsonPropertyName("width")]
|
||||
public double Width { get; set; }
|
||||
|
||||
[JsonPropertyName("height")]
|
||||
public double Height { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,46 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Profile;
|
||||
using Core.Models.Eft.Ws;
|
||||
using Core.Models.Enums;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class NotificationSendHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Send notification message to the appropriate channel
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="notificationMessage"></param>
|
||||
public void SendMessage(string sessionID, WsNotificationEvent notificationMessage)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send a message directly to the player
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="senderDetails">Who is sending the message to player</param>
|
||||
/// <param name="messageText">Text to send player</param>
|
||||
/// <param name="messageType">Underlying type of message being sent</param>
|
||||
public void SendMessageToPlayer(
|
||||
string sessionId,
|
||||
UserDialogInfo senderDetails,
|
||||
string messageText,
|
||||
MessageType messageType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper function for SendMessageToPlayer(), get new dialog for storage in profile or find existing by sender id
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="messageType">Type of message to generate</param>
|
||||
/// <param name="senderDetails">Who is sending the message</param>
|
||||
/// <returns>Dialogue</returns>
|
||||
protected Models.Eft.Profile.Dialogue GetDialog(string sessionId, MessageType messageType, UserDialogInfo senderDetails)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,40 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Profile;
|
||||
using Core.Models.Eft.Ws;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class NotifierHelper
|
||||
{
|
||||
|
||||
public WsNotificationEvent GetDefaultNotification()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside
|
||||
* @param dialogueMessage Message from dialog that was sent
|
||||
* @param ragfairData Ragfair data to attach to notification
|
||||
* @returns
|
||||
*/
|
||||
public WsRagfairOfferSold CreateRagfairOfferSoldNotification(
|
||||
Message dialogueMessage,
|
||||
MessageContentRagfair ragfairData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new notification with the specified dialogueMessage object
|
||||
* @param dialogueMessage
|
||||
* @returns
|
||||
*/
|
||||
public WsChatMessageReceived CreateNewMessageNotification(Message dialogueMessage)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetWebSocketServer(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,23 @@
|
||||
|
||||
public class PaymentHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Is the passed in tpl money (also checks custom currencies in inventoryConfig.customMoneyTpls)
|
||||
/// </summary>
|
||||
/// <param name="tpl"></param>
|
||||
/// <returns></returns>
|
||||
public bool IsMoneyTpl(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets currency TPL from TAG
|
||||
/// </summary>
|
||||
/// <param name="currency"></param>
|
||||
/// <returns></returns>
|
||||
public string GetCurrency(string currency)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,100 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common;
|
||||
using Core.Models.Enums;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class PresetHelper
|
||||
{
|
||||
|
||||
public void HydratePresetStore(Dictionary<string, List<string>> input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default weapon and equipment presets
|
||||
* @returns Dictionary
|
||||
*/
|
||||
public Dictionary<string, Preset> GetDefaultPresets()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default weapon presets
|
||||
* @returns Dictionary
|
||||
*/
|
||||
public Dictionary<string, Preset> GetDefaultWeaponPresets()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default equipment presets
|
||||
* @returns Dictionary
|
||||
*/
|
||||
public Dictionary<string, Preset> GetDefaultEquipmentPresets()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsPreset(string id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if the preset is of the given base class.
|
||||
* @param id The id of the preset
|
||||
* @param baseClass The BaseClasses enum to check against
|
||||
* @returns True if the preset is of the given base class, false otherwise
|
||||
*/
|
||||
public bool IsPresetBaseClass(string id, BaseClasses baseClass)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HasPreset(string templateId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Preset GetPreset(string id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<Preset> GetAllPresets()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<Preset> GetPresets(string templateId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a cloned default preset for passed in item tpl
|
||||
* @param templateId Item tpl to get preset for
|
||||
* @returns null if no default preset, otherwise Preset
|
||||
*/
|
||||
public Preset GetDefaultPreset(string templateId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetBaseItemTpl(string presetId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the price of the preset for the given item tpl, or for the tpl itself if no preset exists
|
||||
* @param tpl The item template to get the price of
|
||||
* @returns The price of the given item preset, or base item if no preset exists
|
||||
*/
|
||||
public decimal GetDefaultPresetOrItemPrice(string tpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,14 @@
|
||||
|
||||
public class ProbabilityHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Chance to roll a number out of 100
|
||||
/// </summary>
|
||||
/// <param name="chance">Percentage chance roll should success</param>
|
||||
/// <param name="scale">scale of chance to allow support of numbers > 1-100</param>
|
||||
/// <returns>true if success</returns>
|
||||
public bool RollChance(double chance, double scale = 1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,364 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Core.Models.Eft.Profile;
|
||||
using Core.Models.Enums;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class ProfileHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Remove/reset a completed quest condtion from players profile quest data
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Session id</param>
|
||||
/// <param name="questConditionId">Quest with condition to remove</param>
|
||||
public void RemoveQuestConditionFromProfile(PmcData pmcData, Dictionary<string, string> questConditionId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all profiles from server
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of profiles</returns>
|
||||
public Dictionary<string, SptProfile> GetProfiles()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the pmc and scav profiles as an array by profile id
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <returns>Array of PmcData objects</returns>
|
||||
public List<PmcData> GetCompleteProfile(string sessionId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sanitize any information from the profile that the client does not expect to receive
|
||||
/// </summary>
|
||||
/// <param name="clonedProfile">A clone of the full player profile</param>
|
||||
protected void SanitizeProfileForClient(SptProfile clonedProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if a nickname is used by another profile loaded by the server
|
||||
/// </summary>
|
||||
/// <param name="nicknameRequest">nickname request object</param>
|
||||
/// <param name="sessionID">Session id</param>
|
||||
/// <returns>True if already in use</returns>
|
||||
public bool IsNicknameTaken(ValidateNicknameRequestData nicknameRequest, string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected bool ProfileHasInfoProperty(SptProfile profile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected bool StringsMatch(string stringA, string stringB)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add experience to a PMC inside the players profile
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Session id</param>
|
||||
/// <param name="experienceToAdd">Experience to add to PMC character</param>
|
||||
public void AddExperienceToPmc(string sessionID, int experienceToAdd)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Iterate all profiles and find matching pmc profile by provided id
|
||||
/// </summary>
|
||||
/// <param name="pmcId">Profile id to find</param>
|
||||
/// <returns>PmcData</returns>
|
||||
public PmcData? GetProfileByPmcId(string pmcId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get experience value for given level
|
||||
/// </summary>
|
||||
/// <param name="level">Level to get xp for</param>
|
||||
/// <returns>Number of xp points for level</returns>
|
||||
public int GetExperience(int level)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the max level a player can be
|
||||
/// </summary>
|
||||
/// <returns>Max level</returns>
|
||||
public int GetMaxLevel()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get default Spt data object
|
||||
/// </summary>
|
||||
/// <returns>Spt</returns>
|
||||
public Spt GetDefaultSptDataObject()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get full representation of a players profile json
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Profile id to get</param>
|
||||
/// <returns>SptProfile object</returns>
|
||||
public SptProfile? GetFullProfile(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get full representation of a players profile JSON by the account ID, or undefined if not found
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account ID to find</param>
|
||||
/// <returns></returns>
|
||||
public SptProfile? GetFullProfileByAccountId(string accountID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a ChatRoomMember formatted profile for the given session ID
|
||||
/// </summary>
|
||||
/// <param name="sessionID">The session ID to return the profile for</param>
|
||||
/// <returns></returns>
|
||||
public SearchFriendResponse? GetChatRoomMemberFromSessionId(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a ChatRoomMember formatted profile for the given PMC profile data
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">The PMC profile data to format into a ChatRoomMember structure</param>
|
||||
/// <returns></returns>
|
||||
public SearchFriendResponse GetChatRoomMemberFromPmcProfile(PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a PMC profile by its session id
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Profile id to return</param>
|
||||
/// <returns>PmcData object</returns>
|
||||
public PmcData? GetPmcProfile(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is given user id a player
|
||||
/// </summary>
|
||||
/// <param name="userId">Id to validate</param>
|
||||
/// <returns>True is a player</returns>
|
||||
public bool IsPlayer(string userId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a full profiles scav-specific sub-profile
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Profiles id</param>
|
||||
/// <returns>IPmcData object</returns>
|
||||
public PmcData GetScavProfile(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get baseline counter values for a fresh profile
|
||||
/// </summary>
|
||||
/// <returns>Default profile Stats object</returns>
|
||||
public Stats GetDefaultCounters()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// is this profile flagged for data removal
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Profile id</param>
|
||||
/// <returns>True if profile is to be wiped of data/progress</returns>
|
||||
protected bool IsWiped(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Iterate over player profile inventory items and find the secure container and remove it
|
||||
/// </summary>
|
||||
/// <param name="profile">Profile to remove secure container from</param>
|
||||
/// <returns>profile without secure container</returns>
|
||||
public PmcData RemoveSecureContainer(PmcData profile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flag a profile as having received a gift
|
||||
/// Store giftid in profile spt object
|
||||
/// </summary>
|
||||
/// <param name="playerId">Player to add gift flag to</param>
|
||||
/// <param name="giftId">Gift player received</param>
|
||||
/// <param name="maxCount">Limit of how many of this gift a player can have</param>
|
||||
public void FlagGiftReceivedInProfile(string playerId, string giftId, int maxCount)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if profile has recieved a gift by id
|
||||
/// </summary>
|
||||
/// <param name="playerId">Player profile to check for gift</param>
|
||||
/// <param name="giftId">Gift to check for</param>
|
||||
/// <param name="maxGiftCount">Max times gift can be given to player</param>
|
||||
/// <returns>True if player has recieved gift previously</returns>
|
||||
public bool PlayerHasRecievedMaxNumberOfGift(string playerId, string giftId, int maxGiftCount)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find Stat in profile counters and increment by one
|
||||
/// </summary>
|
||||
/// <param name="counters">Counters to search for key</param>
|
||||
/// <param name="keyToIncrement">Key</param>
|
||||
public void IncrementStatCounter(CounterKeyValue[] counters, string keyToIncrement)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if player has a skill at elite level
|
||||
/// </summary>
|
||||
/// <param name="skillType">Skill to check</param>
|
||||
/// <param name="pmcProfile">Profile to find skill in</param>
|
||||
/// <returns>True if player has skill at elite level</returns>
|
||||
public bool HasEliteSkillLevel(SkillTypes skillType, PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add points to a specific skill in player profile
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Player profile with skill</param>
|
||||
/// <param name="skill">Skill to add points to</param>
|
||||
/// <param name="pointsToAdd">Points to add</param>
|
||||
/// <param name="useSkillProgressRateMultipler">Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code</param>
|
||||
public void AddSkillPointsToPlayer(PmcData pmcProfile, SkillTypes skill, int pointsToAdd, bool useSkillProgressRateMultipler = false)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a specific common skill from supplied profile
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="skill">Skill to look up and return value from</param>
|
||||
/// <returns>Common skill object from desired profile</returns>
|
||||
public Common GetSkillFromProfile(PmcData pmcData, SkillTypes skill)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the provided session id for a developer account
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Profile id to check</param>
|
||||
/// <returns>True if account is developer</returns>
|
||||
public bool IsDeveloperAccount(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add stash row bonus to profile or increments rows given count if it already exists
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Profile id to give rows to</param>
|
||||
/// <param name="rowsToAdd">How many rows to give profile</param>
|
||||
public void AddStashRowsBonusToProfile(string sessionId, int rowsToAdd)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Iterate over all bonuses and sum up all bonuses of desired type in provided profile
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Player profile</param>
|
||||
/// <param name="desiredBonus">Bonus to sum up</param>
|
||||
/// <returns>Summed bonus value or 0 if no bonus found</returns>
|
||||
public int GetBonusValueFromProfile(PmcData pmcProfile, BonusType desiredBonus)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool PlayerIsFleaBanned(PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an achievement to player profile
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Profile to add achievement to</param>
|
||||
/// <param name="achievementId">Id of achievement to add</param>
|
||||
public void AddAchievementToProfile(PmcData pmcProfile, string achievementId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool HasAccessToRepeatableFreeRefreshSystem(PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find a profiles "Pockets" item and replace its tpl with passed in value
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Player profile</param>
|
||||
/// <param name="newPocketTpl">New tpl to set profiles Pockets to</param>
|
||||
public void ReplaceProfilePocketTpl(PmcData pmcProfile, string newPocketTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return all quest items current in the supplied profile
|
||||
/// </summary>
|
||||
/// <param name="profile">Profile to get quest items from</param>
|
||||
/// <returns>List of item objects</returns>
|
||||
public List<Item> GetQuestItemsInProfile(PmcData profile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a favorites list in the format expected by the GetOtherProfile call
|
||||
/// </summary>
|
||||
/// <param name="profile"></param>
|
||||
/// <returns>A list of Item objects representing the favorited data</returns>
|
||||
public List<Item> GetOtherProfileFavorites(PmcData profile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,42 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class QuestConditionHelper
|
||||
{
|
||||
|
||||
public List<QuestCondition> GetQuestConditions(
|
||||
List<QuestCondition> questConditions,
|
||||
Func<QuestCondition, List<QuestCondition>> furtherFilter = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<QuestCondition> GetLevelConditions(
|
||||
List<QuestCondition> questConditions,
|
||||
Func<QuestCondition, List<QuestCondition>> furtherFilter = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<QuestCondition> GetLoyaltyConditions(
|
||||
List<QuestCondition> questConditions,
|
||||
Func<QuestCondition, List<QuestCondition>> furtherFilter = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<QuestCondition> GetStandingConditions(
|
||||
List<QuestCondition> questConditions,
|
||||
Func<QuestCondition, List<QuestCondition>> furtherFilter = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected List<QuestCondition> FilterConditions(
|
||||
List<QuestCondition> questConditions,
|
||||
string questType,
|
||||
Func<QuestCondition, List<QuestCondition>> furtherFilter = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
+579
-2
@@ -1,6 +1,583 @@
|
||||
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.Eft.Quests;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class QuestHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get status of a quest in player profile by its id
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Profile to search</param>
|
||||
/// <param name="questId">Quest id to look up</param>
|
||||
/// <returns>QuestStatus enum</returns>
|
||||
public QuestStatus GetQuestStatus(PmcData pmcData, string questId)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the level condition is satisfied
|
||||
/// </summary>
|
||||
/// <param name="playerLevel">Players level</param>
|
||||
/// <param name="condition">Quest condition</param>
|
||||
/// <returns>true if player level is greater than or equal to quest</returns>
|
||||
public bool DoesPlayerLevelFulfilCondition(int playerLevel, QuestCondition condition)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the quests found in both lists (inner join)
|
||||
/// </summary>
|
||||
/// <param name="before">List of quests #1</param>
|
||||
/// <param name="after">List of quests #2</param>
|
||||
/// <returns>Reduction of cartesian product between two quest lists</returns>
|
||||
public List<Quest> GetDeltaQuests(List<Quest> before, List<Quest> after)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adjust skill experience for low skill levels, mimicking the official client
|
||||
/// </summary>
|
||||
/// <param name="profileSkill">the skill experience is being added to</param>
|
||||
/// <param name="progressAmount">the amount of experience being added to the skill</param>
|
||||
/// <returns>the adjusted skill progress gain</returns>
|
||||
public int AdjustSkillExpForLowLevels(Common profileSkill, int progressAmount)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get quest name by quest id
|
||||
/// </summary>
|
||||
/// <param name="questId">id to get</param>
|
||||
/// <returns></returns>
|
||||
public string GetQuestNameFromLocale(string questId)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if trader has sufficient loyalty to fulfill quest requirement
|
||||
/// </summary>
|
||||
/// <param name="questProperties">Quest props</param>
|
||||
/// <param name="profile">Player profile</param>
|
||||
/// <returns>true if loyalty is high enough to fulfill quest requirement</returns>
|
||||
public bool TraderLoyaltyLevelRequirementCheck(QuestCondition questProperties, PmcData profile)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if trader has sufficient standing to fulfill quest requirement
|
||||
/// </summary>
|
||||
/// <param name="questProperties">Quest props</param>
|
||||
/// <param name="profile">Player profile</param>
|
||||
/// <returns>true if standing is high enough to fulfill quest requirement</returns>
|
||||
public bool TraderStandingRequirementCheck(QuestCondition questProperties, PmcData profile)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
protected bool CompareAvailableForValues(int current, int required, string compareMethod)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Take reward item from quest and set FiR status + fix stack sizes + fix mod Ids
|
||||
* @param questReward Reward item to fix
|
||||
* @returns Fixed rewards
|
||||
*/
|
||||
protected List<Item> ProcessReward(QuestReward questReward)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add missing mod items to a quest armor reward
|
||||
* @param originalRewardRootItem Original armor reward item from QuestReward.items object
|
||||
* @param questReward Armor reward from quest
|
||||
*/
|
||||
protected void GenerateArmorRewardChildSlots(Item originalRewardRootItem, QuestReward questReward)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a flat list of reward items for the given quest at a specific state for the specified game version (e.g. Fail/Success)
|
||||
* @param quest quest to get rewards for
|
||||
* @param status Quest status that holds the items (Started, Success, Fail)
|
||||
* @returns List of items with the correct maxStack
|
||||
*/
|
||||
public List<Item> GetQuestRewardItems(Quest quest, QuestStatus status, string gameVersion)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile
|
||||
* @param pmcData Player profile
|
||||
* @param newState State the new quest should be in when returned
|
||||
* @param acceptedQuest Details of accepted quest from client
|
||||
*/
|
||||
public QuestStatus GetQuestReadyForProfile(
|
||||
PmcData pmcData,
|
||||
QuestStatus newState,
|
||||
AcceptQuestRequestData acceptedQuest
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get quests that can be shown to player after starting a quest
|
||||
* @param startedQuestId Quest started by player
|
||||
* @param sessionID Session id
|
||||
* @returns Quests accessible to player including newly unlocked quests now quest (startedQuestId) was started
|
||||
*/
|
||||
public List<Quest> GetNewlyAccessibleQuestsWhenStartingQuest(string startedQuestId, string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Should a seasonal/event quest be shown to the player
|
||||
* @param questId Quest to check
|
||||
* @returns true = show to player
|
||||
*/
|
||||
public bool ShowEventQuestToPlayer(string questId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the quest for the opposite side the player is on
|
||||
* @param playerSide Player side (usec/bear)
|
||||
* @param questId QuestId to check
|
||||
*/
|
||||
public bool QuestIsForOtherSide(string playerSide, string questId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the provided quest prevented from being viewed by the provided game version
|
||||
* (Inclusive filter)
|
||||
* @param gameVersion Game version to check against
|
||||
* @param questId Quest id to check
|
||||
* @returns True Quest should not be visible to game version
|
||||
*/
|
||||
protected bool QuestIsProfileBlacklisted(string gameVersion, string questId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the provided quest able to be seen by the provided game version
|
||||
* (Exclusive filter)
|
||||
* @param gameVersion Game version to check against
|
||||
* @param questId Quest id to check
|
||||
* @returns True Quest should be visible to game version
|
||||
*/
|
||||
protected bool QuestIsProfileWhitelisted(string gameVersion, string questId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get quests that can be shown to player after failing a quest
|
||||
* @param failedQuestId Id of the quest failed by player
|
||||
* @param sessionId Session id
|
||||
* @returns List of Quest
|
||||
*/
|
||||
public List<Quest> FailedUnlocked(string failedQuestId, string sessionId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust quest money rewards by passed in multiplier
|
||||
* @param quest Quest to multiple money rewards
|
||||
* @param bonusPercent Percent to adjust money rewards by
|
||||
* @param questStatus Status of quest to apply money boost to rewards of
|
||||
* @returns Updated quest
|
||||
*/
|
||||
public Quest ApplyMoneyBoost(Quest quest, double bonusPercent, QuestStatus questStatus)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the item stack to new value, or delete the item if value <= 0
|
||||
* // TODO maybe merge this function and the one from customization
|
||||
* @param pmcData Profile
|
||||
* @param itemId id of item to adjust stack size of
|
||||
* @param newStackSize Stack size to adjust to
|
||||
* @param sessionID Session id
|
||||
* @param output ItemEvent router response
|
||||
*/
|
||||
public void ChangeItemStack(
|
||||
PmcData pmcData,
|
||||
string itemId,
|
||||
double newStackSize,
|
||||
string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add item stack change object into output route event response
|
||||
* @param output Response to add item change event into
|
||||
* @param sessionId Session id
|
||||
* @param item Item that was adjusted
|
||||
*/
|
||||
protected void AddItemStackSizeChangeIntoEventResponse(
|
||||
ItemEventRouterResponse output,
|
||||
string sessionId,
|
||||
Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get quests, strip all requirement conditions except level
|
||||
* @param quests quests to process
|
||||
* @returns quest list without conditions
|
||||
*/
|
||||
protected List<Quest> GetQuestsWithOnlyLevelRequirementStartCondition(List<Quest> quests)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all quest conditions except for level requirement
|
||||
* @param quest quest to clean
|
||||
* @returns reset Quest object
|
||||
*/
|
||||
public Quest GetQuestWithOnlyLevelRequirementStartCondition(Quest quest)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fail a quest in a player profile
|
||||
* @param pmcData Player profile
|
||||
* @param failRequest Fail quest request data
|
||||
* @param sessionID Session id
|
||||
* @param output Client output
|
||||
*/
|
||||
public void FailQuest(
|
||||
PmcData pmcData,
|
||||
FailQuestRequestData failRequest,
|
||||
string sessionID,
|
||||
ItemEventRouterResponse output = null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get List of All Quests from db
|
||||
* NOT CLONED
|
||||
* @returns List of Quest objects
|
||||
*/
|
||||
public List<Quest> GetQuestsFromDb()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get quest by id from database (repeatables are stored in profile, check there if questId not found)
|
||||
* @param questId Id of quest to find
|
||||
* @param pmcData Player profile
|
||||
* @returns Quest object
|
||||
*/
|
||||
public Quest GetQuestFromDb(string questId, PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a quests startedMessageText key from db, if no startedMessageText key found, use description key instead
|
||||
/// </summary>
|
||||
/// <param name="startedMessageTextId">startedMessageText property from Quest</param>
|
||||
/// <param name="questDescriptionId">description property from Quest</param>
|
||||
/// <returns>message id</returns>
|
||||
public string GetMessageIdForQuestStart(string startedMessageTextId, string questDescriptionId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the locale Id from locale db for a quest message
|
||||
/// </summary>
|
||||
/// <param name="questMessageId">Quest message id to look up</param>
|
||||
/// <returns>Locale Id from locale db</returns>
|
||||
public string GetQuestLocaleIdFromDb(string questMessageId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Alter a quests state + Add a record to its status timers object
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Profile to update</param>
|
||||
/// <param name="newQuestState">New state the quest should be in</param>
|
||||
/// <param name="questId">Id of the quest to alter the status of</param>
|
||||
public void UpdateQuestState(PmcData pmcData, QuestStatus newQuestState, string questId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets a quests values back to its chosen state
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Profile to update</param>
|
||||
/// <param name="newQuestState">New state the quest should be in</param>
|
||||
/// <param name="questId">Id of the quest to alter the status of</param>
|
||||
public void ResetQuestState(PmcData pmcData, QuestStatus newQuestState, string questId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Give player quest rewards - Skills/exp/trader standing/items/assort unlocks - Returns reward items player earned
|
||||
/// </summary>
|
||||
/// <param name="profileData">Player profile (scav or pmc)</param>
|
||||
/// <param name="questId">questId of quest to get rewards for</param>
|
||||
/// <param name="state">State of the quest to get rewards for</param>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="questResponse">Response to send back to client</param>
|
||||
/// <returns>Array of reward objects</returns>
|
||||
public Item[] ApplyQuestReward(PmcData profileData, string questId, QuestStatus state, string sessionId, ItemEventRouterResponse questResponse)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does the provided quest reward have a game version requirement to be given and does it match
|
||||
/// </summary>
|
||||
/// <param name="reward">Reward to check</param>
|
||||
/// <param name="gameVersion">Version of game to check reward against</param>
|
||||
/// <returns>True if it has requirement, false if it doesnt pass check</returns>
|
||||
protected bool QuestRewardIsForGameEdition(QuestReward reward, string gameVersion)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
|
||||
/// also update client response recipeUnlocked array with craft id
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="craftUnlockReward">Reward item from quest with craft unlock details</param>
|
||||
/// <param name="questDetails">Quest with craft unlock reward</param>
|
||||
/// <param name="sessionID">Session id</param>
|
||||
/// <param name="response">Response to send back to client</param>
|
||||
protected void FindAndAddHideoutProductionIdToProfile(PmcData pmcData, QuestReward craftUnlockReward, Quest questDetails, string sessionID,
|
||||
ItemEventRouterResponse response)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find hideout craft for the specified quest reward
|
||||
/// </summary>
|
||||
/// <param name="craftUnlockReward">Reward item from quest with craft unlock details</param>
|
||||
/// <param name="questDetails">Quest with craft unlock reward</param>
|
||||
/// <returns>Hideout craft</returns>
|
||||
public List<HideoutProduction> GetRewardProductionMatch(QuestReward craftUnlockReward, Quest questDetails)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get players money reward bonus from profile
|
||||
/// </summary>
|
||||
/// <param name="pmcData">player profile</param>
|
||||
/// <returns>bonus as a percent</returns>
|
||||
protected double GetQuestMoneyRewardBonusMultiplier(PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find quest with 'findItem' condition that needs the item tpl be handed in
|
||||
* @param itemTpl item tpl to look for
|
||||
* @param questIds Quests to search through for the findItem condition
|
||||
* @returns quest id with 'FindItem' condition id
|
||||
*/
|
||||
public Dictionary<string, string> GetFindItemConditionByQuestItem(
|
||||
string itemTpl,
|
||||
string[] questIds,
|
||||
List<Quest> allQuests
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all quests to a profile with the provided statuses
|
||||
* @param pmcProfile profile to update
|
||||
* @param statuses statuses quests should have
|
||||
*/
|
||||
public void AddAllQuestsToProfile(PmcData pmcProfile, List<QuestStatus> statuses)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void FindAndRemoveQuestFromArrayIfExists(string questId, List<QuestStatus> quests)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of quests that would fail when supplied quest is completed
|
||||
* @param completedQuestId quest completed id
|
||||
* @returns array of Quest objects
|
||||
*/
|
||||
public List<Quest> GetQuestsFailedByCompletingQuest(string completedQuestId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the hours a mails items can be collected for by profile type
|
||||
* @param pmcData Profile to get hours for
|
||||
* @returns Hours item will be available for
|
||||
*/
|
||||
public int GetMailItemRedeemTimeHoursForProfile(PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ItemEventRouterResponse CompleteQuest(
|
||||
PmcData pmcData,
|
||||
CompleteQuestRequestData body,
|
||||
string sessionID
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/quest/list
|
||||
* Get all quests visible to player
|
||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||
* @param sessionID session id
|
||||
* @returns array of Quest
|
||||
*/
|
||||
public List<Quest> GetClientQuests(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a clone of the given quest array with the rewards updated to reflect the
|
||||
* given game version
|
||||
* @param quests List of quests to check
|
||||
* @param gameVersion Game version of the profile
|
||||
* @returns Array of Quest objects with the rewards filtered correctly for the game version
|
||||
*/
|
||||
protected List<Quest> UpdateQuestsForGameEdition(List<Quest> quests, string gameVersion)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of quests that would fail when supplied quest is completed
|
||||
* @param completedQuestId Quest completed id
|
||||
* @returns Array of Quest objects
|
||||
*/
|
||||
protected List<Quest> GetQuestsFromProfileFailedByCompletingQuest(string completedQuestId, PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fail the provided quests
|
||||
* Update quest in profile, otherwise add fresh quest object with failed status
|
||||
* @param sessionID session id
|
||||
* @param pmcData player profile
|
||||
* @param questsToFail quests to fail
|
||||
* @param output Client output
|
||||
*/
|
||||
protected void FailQuests(
|
||||
string sessionID,
|
||||
PmcData pmcData,
|
||||
List<Quest> questsToFail,
|
||||
ItemEventRouterResponse output
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a popup to player on successful completion of a quest
|
||||
* @param sessionID session id
|
||||
* @param pmcData Player profile
|
||||
* @param completedQuestId Completed quest id
|
||||
* @param questRewards Rewards given to player
|
||||
*/
|
||||
protected void SendSuccessDialogMessageOnQuestComplete(
|
||||
string sessionID,
|
||||
PmcData pmcData,
|
||||
string completedQuestId,
|
||||
List<Item> questRewards
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile
|
||||
* @param pmcData Player profile to update
|
||||
* @param quests Quests to look for wait conditions in
|
||||
* @param completedQuestId Quest just completed
|
||||
*/
|
||||
protected void AddTimeLockedQuestsToProfile(PmcData pmcData, List<Quest> quests, string completedQuestId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a quest entirely from a profile
|
||||
* @param sessionId Player id
|
||||
* @param questIdToRemove Qid of quest to remove
|
||||
*/
|
||||
protected void RemoveQuestFromScavProfile(string sessionId, string questIdToRemove)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return quests that have different statuses
|
||||
* @param preQuestStatusus Quests before
|
||||
* @param postQuestStatuses Quests after
|
||||
* @returns QuestStatusChange array
|
||||
*/
|
||||
protected List<QuestStatus> GetQuestsWithDifferentStatuses(
|
||||
List<QuestStatus> preQuestStatusus,
|
||||
List<QuestStatus> postQuestStatuses
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Does a provided quest have a level requirement equal to or below defined level
|
||||
* @param quest Quest to check
|
||||
* @param playerLevel level of player to test against quest
|
||||
* @returns true if quest can be seen/accepted by player of defined level
|
||||
*/
|
||||
protected bool PlayerLevelFulfillsQuestRequirement(Quest quest, int playerLevel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,52 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Core.Models.Eft.Ragfair;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RagfairHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets currency TAG from TPL
|
||||
/// </summary>
|
||||
/// <param name="currency">currency</param>
|
||||
/// <returns>string</returns>
|
||||
public string GetCurrencyTag(string currency)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<string> FilterCategories(string sessionID, SearchRequestData request)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<string, TraderAssort> GetDisplayableAssorts(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected List<string> GetCategoryList(string handbookId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Iterate over array of identical items and merge stack count
|
||||
/// Ragfair allows abnormally large stacks.
|
||||
/// </summary>
|
||||
public List<Item> MergeStackable(List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the symbol for a currency
|
||||
/// e.g. 5449016a4bdc2d6f028b456f return ₽
|
||||
/// </summary>
|
||||
/// <param name="currencyTpl">currency to get symbol for</param>
|
||||
/// <returns>symbol of currency</returns>
|
||||
public string GetCurrencySymbol(string currencyTpl)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,284 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Core.Models.Eft.ItemEvent;
|
||||
using Core.Models.Eft.Profile;
|
||||
using Core.Models.Eft.Ragfair;
|
||||
using Core.Models.Spt.Config;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RagfairOfferHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
||||
/// </summary>
|
||||
/// <param name="searchRequest">Data from client</param>
|
||||
/// <param name="itemsToAdd">ragfairHelper.filterCategories()</param>
|
||||
/// <param name="traderAssorts">Trader assorts</param>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <returns>Offers the player should see</returns>
|
||||
public List<RagfairOffer> GetValidOffers(
|
||||
SearchRequestData searchRequest,
|
||||
string[] itemsToAdd,
|
||||
Dictionary<string, TraderAssort> traderAssorts,
|
||||
PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disable offer if item is flagged by tiered flea config
|
||||
/// </summary>
|
||||
/// <param name="tieredFlea">Tiered flea settings from ragfair config</param>
|
||||
/// <param name="offer">Ragfair offer to check</param>
|
||||
/// <param name="tieredFleaLimitTypes">Dict of item types with player level to be viewable</param>
|
||||
/// <param name="playerLevel">Level of player viewing offer</param>
|
||||
protected void CheckAndLockOfferFromPlayerTieredFlea(
|
||||
TieredFlea tieredFlea,
|
||||
RagfairOffer offer,
|
||||
string[] tieredFleaLimitTypes,
|
||||
int playerLevel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level
|
||||
/// </summary>
|
||||
/// <param name="searchRequest">Search request from client</param>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <returns>Matching RagfairOffer objects</returns>
|
||||
public List<RagfairOffer> GetOffersThatRequireItem(SearchRequestData searchRequest, PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get offers from flea/traders specifically when building weapon preset
|
||||
/// </summary>
|
||||
/// <param name="searchRequest">Search request data</param>
|
||||
/// <param name="itemsToAdd">string array of item tpls to search for</param>
|
||||
/// <param name="traderAssorts">All trader assorts player can access/buy</param>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <returns>RagfairOffer array</returns>
|
||||
public List<RagfairOffer> GetOffersForBuild(
|
||||
SearchRequestData searchRequest,
|
||||
string[] itemsToAdd,
|
||||
Dictionary<string, TraderAssort> traderAssorts,
|
||||
PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get offers that have not exceeded buy limits
|
||||
/// </summary>
|
||||
/// <param name="possibleOffers">offers to process</param>
|
||||
/// <returns>Offers</returns>
|
||||
protected List<RagfairOffer> GetOffersInsideBuyRestrictionLimits(List<RagfairOffer> possibleOffers)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if offer is from trader standing the player does not have
|
||||
/// </summary>
|
||||
/// <param name="offer">Offer to check</param>
|
||||
/// <param name="pmcProfile">Player profile</param>
|
||||
/// <returns>True if item is locked, false if item is purchaseable</returns>
|
||||
protected bool TraderOfferLockedBehindLoyaltyLevel(RagfairOffer offer, PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if offer item is quest locked for current player by looking at sptQuestLocked property in traders barter_scheme
|
||||
/// </summary>
|
||||
/// <param name="offer">Offer to check is quest locked</param>
|
||||
/// <param name="traderAssorts">all trader assorts for player</param>
|
||||
/// <returns>true if quest locked</returns>
|
||||
public bool TraderOfferItemQuestLocked(RagfairOffer offer, Dictionary<string, TraderAssort> traderAssorts)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Has trader offer ran out of stock to sell to player
|
||||
/// </summary>
|
||||
/// <param name="offer">Offer to check stock of</param>
|
||||
/// <returns>true if out of stock</returns>
|
||||
protected bool TraderOutOfStock(RagfairOffer offer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if trader offers' BuyRestrictionMax value has been reached
|
||||
/// </summary>
|
||||
/// <param name="offer">Offer to check restriction properties of</param>
|
||||
/// <returns>true if restriction reached, false if no restrictions/not reached</returns>
|
||||
protected bool TraderBuyRestrictionReached(RagfairOffer offer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected List<string> GetLoyaltyLockedOffers(List<RagfairOffer> offers, PmcData pmcProfile)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process all player-listed flea offers for a desired profile
|
||||
* @param sessionID Session id to process offers for
|
||||
* @returns true = complete
|
||||
*/
|
||||
public bool ProcessOffersOnProfile(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Count up all rootitem StackObjectsCount properties of an array of items
|
||||
* @param itemsInInventoryToList items to sum up
|
||||
* @returns Total stack count
|
||||
*/
|
||||
public int GetTotalStackCountSize(List<List<Item>> itemsInInventoryToList)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add amount to players ragfair rating
|
||||
* @param sessionId Profile to update
|
||||
* @param amountToIncrementBy Raw amount to add to players ragfair rating (excluding the reputation gain multiplier)
|
||||
*/
|
||||
public void IncreaseProfileRagfairRating(SptProfile profile, int amountToIncrementBy)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all offers a player has listed on a desired profile
|
||||
* @param sessionID Session id
|
||||
* @returns List of ragfair offers
|
||||
*/
|
||||
protected List<RagfairOffer> GetProfileOffers(string sessionID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an offer from a desired profile and from ragfair offers
|
||||
* @param sessionID Session id of profile to delete offer from
|
||||
* @param offerId Id of offer to delete
|
||||
*/
|
||||
protected void DeleteOfferById(string sessionID, string offerId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Complete the selling of players' offer
|
||||
* @param sessionID Session id
|
||||
* @param offer Sold offer details
|
||||
* @param boughtAmount Amount item was purchased for
|
||||
* @returns ItemEventRouterResponse
|
||||
*/
|
||||
public ItemEventRouterResponse CompleteOffer(string sessionID, RagfairOffer offer, int boughtAmount)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a localised message for when players offer has sold on flea
|
||||
* @param itemTpl Item sold
|
||||
* @param boughtAmount How many were purchased
|
||||
* @returns Localised message text
|
||||
*/
|
||||
protected string GetLocalisedOfferSoldMessage(string itemTpl, int boughtAmount)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check an offer passes the various search criteria the player requested
|
||||
* @param searchRequest Client search request
|
||||
* @param offer Offer to check
|
||||
* @param pmcData Player profile
|
||||
* @returns True if offer passes criteria
|
||||
*/
|
||||
protected bool PassesSearchFilterCriteria(SearchRequestData searchRequest, RagfairOffer offer, PmcData pmcData)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the passed in offer item is functional
|
||||
* @param offerRootItem The root item of the offer
|
||||
* @param offer Flea offer to check
|
||||
* @returns True if the given item is functional
|
||||
*/
|
||||
public bool IsItemFunctional(Item offerRootItem, RagfairOffer offer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should a ragfair offer be visible to the player
|
||||
/// </summary>
|
||||
/// <param name="searchRequest">Search request</param>
|
||||
/// <param name="itemsToAdd">?</param>
|
||||
/// <param name="traderAssorts">Trader assort items - used for filtering out locked trader items</param>
|
||||
/// <param name="offer">The flea offer</param>
|
||||
/// <param name="pmcProfile">Player profile</param>
|
||||
/// <param name="playerIsFleaBanned">Optional parameter</param>
|
||||
/// <returns>True = should be shown to player</returns>
|
||||
public bool DisplayableOffer(
|
||||
SearchRequestData searchRequest,
|
||||
List<string> itemsToAdd,
|
||||
Dictionary<string, TraderAssort> traderAssorts,
|
||||
RagfairOffer offer,
|
||||
PmcData pmcProfile,
|
||||
bool? playerIsFleaBanned = null
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DisplayableOfferThatNeedsItem(SearchRequestData searchRequest, RagfairOffer offer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does the passed in item have a condition property
|
||||
/// </summary>
|
||||
/// <param name="item">Item to check</param>
|
||||
/// <returns>True if has condition</returns>
|
||||
protected bool ConditionItem(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is items quality value within desired range
|
||||
/// </summary>
|
||||
/// <param name="item">Item to check quality of</param>
|
||||
/// <param name="min">Desired minimum quality</param>
|
||||
/// <param name="max">Desired maximum quality</param>
|
||||
/// <returns>True if in range</returns>
|
||||
protected bool ItemQualityInRange(Item item, int min, int max)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this offer come from a trader
|
||||
/// </summary>
|
||||
/// <param name="offer">Offer to check</param>
|
||||
/// <returns>True = from trader</returns>
|
||||
public bool OfferFromTrader(RagfairOffer offer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,33 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Ragfair;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RagfairSellHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
||||
/// </summary>
|
||||
/// <param name="averageOfferPriceRub">Price of average offer in roubles</param>
|
||||
/// <param name="playerListedPriceRub">Price player listed item for in roubles</param>
|
||||
/// <param name="qualityMultiplier">Quality multipler of item being sold</param>
|
||||
/// <returns>percent value</returns>
|
||||
public double CalculateSellChance(
|
||||
double averageOfferPriceRub,
|
||||
double playerListedPriceRub,
|
||||
double qualityMultiplier)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list of item count and sell time (empty list = no sell)
|
||||
/// </summary>
|
||||
/// <param name="sellChancePercent">chance item will sell</param>
|
||||
/// <param name="itemSellCount">count of items to sell</param>
|
||||
/// <param name="sellInOneGo">All items listed get sold at once</param>
|
||||
/// <returns>List of purchases of item(s) listed</returns>
|
||||
public List<SellResult> RollForSale(double sellChancePercent, int itemSellCount, bool sellInOneGo = false)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,90 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RagfairServerHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Is item valid / on blacklist / quest item
|
||||
/// </summary>
|
||||
/// <param name="itemDetails"></param>
|
||||
/// <returns>boolean</returns>
|
||||
public bool IsItemValidRagfairItem(bool[] itemDetails)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is supplied item tpl on the ragfair custom blacklist from configs/ragfair.json/dynamic
|
||||
/// </summary>
|
||||
/// <param name="itemTemplateId">Item tpl to check is blacklisted</param>
|
||||
/// <returns>True if its blacklsited</returns>
|
||||
protected bool IsItemOnCustomFleaBlacklist(string itemTemplateId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is supplied parent id on the ragfair custom item category blacklist
|
||||
/// </summary>
|
||||
/// <param name="parentId">Parent Id to check is blacklisted</param>
|
||||
/// <returns>true if blacklisted</returns>
|
||||
protected bool IsItemCategoryOnCustomFleaBlacklist(string itemParentId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// is supplied id a trader
|
||||
/// </summary>
|
||||
/// <param name="traderId"></param>
|
||||
/// <returns>True if id was a trader</returns>
|
||||
public bool IsTrader(string traderId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send items back to player
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Player to send items to</param>
|
||||
/// <param name="returnedItems">Items to send to player</param>
|
||||
public void ReturnItems(string sessionID, List<Item> returnedItems)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public int CalculateDynamicStackCount(string tplId, bool isWeaponPreset)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Choose a currency at random with bias
|
||||
/// </summary>
|
||||
/// <returns>currency tpl</returns>
|
||||
public string GetDynamicOfferCurrency()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a preset id from globals.json, return a list of items with unique ids
|
||||
/// </summary>
|
||||
/// <param name="item">Preset item</param>
|
||||
/// <returns>List of weapon and its children</returns>
|
||||
public List<Item> GetPresetItems(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Possible bug, returns all items associated with an items tpl, could be multiple presets from globals.json
|
||||
/// </summary>
|
||||
/// <param name="item">Preset item</param>
|
||||
/// <returns></returns>
|
||||
public List<Item> GetPresetItemsByTpl(Item item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,55 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Ragfair;
|
||||
using Core.Models.Enums;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RagfairSortHelper
|
||||
{
|
||||
|
||||
/**
|
||||
* Sort a list of ragfair offers by something (id/rating/offer name/price/expiry time)
|
||||
* @param offers Offers to sort
|
||||
* @param type How to sort it
|
||||
* @param direction Ascending/descending
|
||||
* @returns Sorted offers
|
||||
*/
|
||||
public List<RagfairOffer> SortOffers(List<RagfairOffer> offers, RagfairSort type, int direction = 0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected int SortOffersByID(RagfairOffer a, RagfairOffer b)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected int SortOffersByBarter(RagfairOffer a, RagfairOffer b)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected int SortOffersByRating(RagfairOffer a, RagfairOffer b)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected int SortOffersByName(RagfairOffer a, RagfairOffer b)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Order two offers by rouble price value
|
||||
* @param a Offer a
|
||||
* @param b Offer b
|
||||
* @returns
|
||||
*/
|
||||
protected int SortOffersByPrice(RagfairOffer a, RagfairOffer b)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected int SortOffersByExpiry(RagfairOffer a, RagfairOffer b)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,66 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
using Props = Core.Models.Eft.Common.Props;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RepairHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Alter an items durability after a repair by trader/repair kit
|
||||
/// </summary>
|
||||
/// <param name="itemToRepair">item to update durability details</param>
|
||||
/// <param name="itemToRepairDetails">db details of item to repair</param>
|
||||
/// <param name="isArmor">Is item being repaired a piece of armor</param>
|
||||
/// <param name="amountToRepair">how many unit of durability to repair</param>
|
||||
/// <param name="useRepairKit">Is item being repaired with a repair kit</param>
|
||||
/// <param name="traderQualityMultipler">Trader quality value from traders base json</param>
|
||||
/// <param name="applyMaxDurabilityDegradation">should item have max durability reduced</param>
|
||||
public void UpdateItemDurability(
|
||||
Item itemToRepair,
|
||||
TemplateItem itemToRepairDetails,
|
||||
bool isArmor,
|
||||
int amountToRepair,
|
||||
bool useRepairKit,
|
||||
double traderQualityMultipler,
|
||||
bool applyMaxDurabilityDegradation = true
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Repairing armor reduces the total durability value slightly, get a randomised (to 2dp) amount based on armor material
|
||||
/// </summary>
|
||||
/// <param name="armorMaterial">What material is the armor being repaired made of</param>
|
||||
/// <param name="isRepairKit">Was a repair kit used</param>
|
||||
/// <param name="armorMax">Max amount of durability item can have</param>
|
||||
/// <param name="traderQualityMultipler">Different traders produce different loss values</param>
|
||||
/// <returns>Amount to reduce max durability by</returns>
|
||||
protected double GetRandomisedArmorRepairDegradationValue(
|
||||
string armorMaterial,
|
||||
bool isRepairKit,
|
||||
int armorMax,
|
||||
double traderQualityMultipler
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Repairing weapons reduces the total durability value slightly, get a randomised (to 2dp) amount
|
||||
/// </summary>
|
||||
/// <param name="itemProps">Weapon properties</param>
|
||||
/// <param name="isRepairKit">Was a repair kit used</param>
|
||||
/// <param name="weaponMax">Max amount of durability item can have</param>
|
||||
/// <param name="traderQualityMultipler">Different traders produce different loss values</param>
|
||||
/// <returns>Amount to reduce max durability by</returns>
|
||||
protected double GetRandomisedWeaponRepairDegradationValue(
|
||||
Props itemProps,
|
||||
bool isRepairKit,
|
||||
int weaponMax,
|
||||
double traderQualityMultipler
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Spt.Config;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class RepeatableQuestHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get the relevant elimination config based on the current players PMC level
|
||||
/// </summary>
|
||||
/// <param name="pmcLevel">Level of PMC character</param>
|
||||
/// <param name="repeatableConfig">Main repeatable config</param>
|
||||
/// <returns>EliminationConfig</returns>
|
||||
public EliminationConfig GetEliminationConfigByPmcLevel(
|
||||
int pmcLevel,
|
||||
RepeatableQuestConfig repeatableConfig)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object ProbabilityObjectArray<K, V>(object configArrayInput) // TODO: ProbabilityObjectArray<K, V> for return type , param type was List<ProbabilityObject<K, V>>
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
namespace Core.Helpers;
|
||||
using Core.Models.Eft.Common.Tables;
|
||||
|
||||
namespace Core.Helpers;
|
||||
|
||||
public class SecureContainerHelper
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of the item IDs (NOT tpls) inside a secure container
|
||||
/// </summary>
|
||||
/// <param name="items">Inventory items to look for secure container in</param>
|
||||
/// <returns>List of ids</returns>
|
||||
public List<string> GetSecureContainerItems(List<Item> items)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,6 +172,23 @@ public class QuestConditionTypes
|
||||
public List<QuestCondition>? Fail { get; set; }
|
||||
}
|
||||
|
||||
public class AchievementQuestConditionTypes
|
||||
{
|
||||
[JsonPropertyName("started")]
|
||||
public List<QuestCondition>? Started { get; set; }
|
||||
|
||||
[JsonPropertyName("availableForFinish")]
|
||||
public List<QuestCondition>? AvailableForFinish { get; set; }
|
||||
|
||||
[JsonPropertyName("availableForStart")]
|
||||
public List<QuestCondition>? AvailableForStart { get; set; }
|
||||
|
||||
[JsonPropertyName("success")]
|
||||
public List<QuestCondition>? Success { get; set; }
|
||||
|
||||
[JsonPropertyName("fail")]
|
||||
public List<QuestCondition>? Fail { get; set; }
|
||||
}
|
||||
public class QuestCondition
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
namespace Core.Models.Enums;
|
||||
|
||||
public class BaseClasses
|
||||
{
|
||||
public static string WEAPON = "5422acb9af1c889c16000029";
|
||||
public static string UBGL = "55818b014bdc2ddc698b456b";
|
||||
public static string ARMOR = "5448e54d4bdc2dcc718b4568";
|
||||
public static string ARMORED_EQUIPMENT = "57bef4c42459772e8d35a53b";
|
||||
public static string REPAIR_KITS = "616eb7aea207f41933308f46";
|
||||
public static string HEADWEAR = "5a341c4086f77401f2541505";
|
||||
public static string FACECOVER = "5a341c4686f77469e155819e";
|
||||
public static string VEST = "5448e5284bdc2dcb718b4567";
|
||||
public static string BACKPACK = "5448e53e4bdc2d60728b4567";
|
||||
public static string COMPOUND = "566162e44bdc2d3f298b4573";
|
||||
public static string VISORS = "5448e5724bdc2ddf718b4568";
|
||||
public static string FOOD = "5448e8d04bdc2ddf718b4569";
|
||||
public static string GAS_BLOCK = "56ea9461d2720b67698b456f";
|
||||
public static string RAIL_COVER = "55818b1d4bdc2d5b648b4572";
|
||||
public static string DRINK = "5448e8d64bdc2dce718b4568";
|
||||
public static string BARTER_ITEM = "5448eb774bdc2d0a728b4567";
|
||||
public static string INFO = "5448ecbe4bdc2d60728b4568";
|
||||
public static string MEDKIT = "5448f39d4bdc2d0a728b4568";
|
||||
public static string DRUGS = "5448f3a14bdc2d27728b4569";
|
||||
public static string STIMULATOR = "5448f3a64bdc2d60728b456a";
|
||||
public static string MEDICAL = "5448f3ac4bdc2dce718b4569";
|
||||
public static string MEDICAL_SUPPLIES = "57864c8c245977548867e7f1";
|
||||
public static string MOD = "5448fe124bdc2da5018b4567";
|
||||
public static string FUNCTIONAL_MOD = "550aa4154bdc2dd8348b456b";
|
||||
public static string FUEL = "5d650c3e815116009f6201d2";
|
||||
public static string GEAR_MOD = "55802f3e4bdc2de7118b4584";
|
||||
public static string STOCK = "55818a594bdc2db9688b456a";
|
||||
public static string FOREGRIP = "55818af64bdc2d5b648b4570";
|
||||
public static string MASTER_MOD = "55802f4a4bdc2ddb688b4569";
|
||||
public static string MOUNT = "55818b224bdc2dde698b456f";
|
||||
public static string MUZZLE = "5448fe394bdc2d0d028b456c";
|
||||
public static string SIGHTS = "5448fe7a4bdc2d6f028b456b";
|
||||
public static string MEDS = "543be5664bdc2dd4348b4569";
|
||||
public static string MAP = "567849dd4bdc2d150f8b456e";
|
||||
public static string MONEY = "543be5dd4bdc2deb348b4569";
|
||||
public static string NIGHTVISION = "5a2c3a9486f774688b05e574";
|
||||
public static string THERMAL_VISION = "5d21f59b6dbe99052b54ef83";
|
||||
public static string KEY = "543be5e94bdc2df1348b4568";
|
||||
public static string KEY_MECHANICAL = "5c99f98d86f7745c314214b3";
|
||||
public static string KEYCARD = "5c164d2286f774194c5e69fa";
|
||||
public static string EQUIPMENT = "543be5f84bdc2dd4348b456a";
|
||||
public static string THROW_WEAPON = "543be6564bdc2df4348b4568";
|
||||
public static string FOOD_DRINK = "543be6674bdc2df1348b4569";
|
||||
public static string PISTOL = "5447b5cf4bdc2d65278b4567";
|
||||
public static string REVOLVER = "617f1ef5e8b54b0998387733";
|
||||
public static string SMG = "5447b5e04bdc2d62278b4567";
|
||||
public static string ASSAULT_RIFLE = "5447b5f14bdc2d61278b4567";
|
||||
public static string ASSAULT_CARBINE = "5447b5fc4bdc2d87278b4567";
|
||||
public static string SHOTGUN = "5447b6094bdc2dc3278b4567";
|
||||
public static string MARKSMAN_RIFLE = "5447b6194bdc2d67278b4567";
|
||||
public static string SNIPER_RIFLE = "5447b6254bdc2dc3278b4568";
|
||||
public static string MACHINE_GUN = "5447bed64bdc2d97278b4568";
|
||||
public static string GRENADE_LAUNCHER = "5447bedf4bdc2d87278b4568";
|
||||
public static string SPECIAL_WEAPON = "5447bee84bdc2dc3278b4569";
|
||||
public static string SPEC_ITEM = "5447e0e74bdc2d3c308b4567";
|
||||
public static string SPRING_DRIVEN_CYLINDER = "627a137bf21bc425b06ab944";
|
||||
public static string KNIFE = "5447e1d04bdc2dff2f8b4567";
|
||||
public static string AMMO = "5485a8684bdc2da71d8b4567";
|
||||
public static string AMMO_BOX = "543be5cb4bdc2deb348b4568";
|
||||
public static string LOOT_CONTAINER = "566965d44bdc2d814c8b4571";
|
||||
public static string MOB_CONTAINER = "5448bf274bdc2dfc2f8b456a";
|
||||
public static string SEARCHABLE_ITEM = "566168634bdc2d144c8b456c";
|
||||
public static string STASH = "566abbb64bdc2d144c8b457d";
|
||||
public static string SORTING_TABLE = "6050cac987d3f925bf016837";
|
||||
public static string LOCKABLE_CONTAINER = "5671435f4bdc2d96058b4569";
|
||||
public static string SIMPLE_CONTAINER = "5795f317245977243854e041";
|
||||
public static string INVENTORY = "55d720f24bdc2d88028b456d";
|
||||
public static string STATIONARY_CONTAINER = "567583764bdc2d98058b456e";
|
||||
public static string POCKETS = "557596e64bdc2dc2118b4571";
|
||||
public static string ARMBAND = "5b3f15d486f77432d0509248";
|
||||
public static string JEWELRY = "57864a3d24597754843f8721";
|
||||
public static string ELECTRONICS = "57864a66245977548f04a81f";
|
||||
public static string BUILDING_MATERIAL = "57864ada245977548638de91";
|
||||
public static string TOOL = "57864bb7245977548b3b66c2";
|
||||
public static string HOUSEHOLD_GOODS = "57864c322459775490116fbf";
|
||||
public static string LUBRICANT = "57864e4c24597754843f8723";
|
||||
public static string BATTERY = "57864ee62459775490116fc1";
|
||||
public static string ASSAULT_SCOPE = "55818add4bdc2d5b648b456f";
|
||||
public static string TACTICAL_COMBO = "55818b164bdc2ddc698b456c";
|
||||
public static string FLASHLIGHT = "55818b084bdc2d5b648b4571";
|
||||
public static string MAGAZINE = "5448bc234bdc2d3c308b4569";
|
||||
public static string LIGHT_LASER_DESIGNATOR = "55818b0e4bdc2dde698b456e";
|
||||
public static string FLASH_HIDER = "550aa4bf4bdc2dd6348b456b";
|
||||
public static string COLLIMATOR = "55818ad54bdc2ddc698b4569";
|
||||
public static string IRON_SIGHT = "55818ac54bdc2d5b648b456e";
|
||||
public static string COMPACT_COLLIMATOR = "55818acf4bdc2dde698b456b";
|
||||
public static string COMPENSATOR = "550aa4af4bdc2dd4348b456e";
|
||||
public static string OPTIC_SCOPE = "55818ae44bdc2dde698b456c";
|
||||
public static string SPECIAL_SCOPE = "55818aeb4bdc2ddc698b456a";
|
||||
public static string OTHER = "590c745b86f7743cc433c5f2";
|
||||
public static string SILENCER = "550aa4cd4bdc2dd8348b456c";
|
||||
public static string PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc";
|
||||
public static string ITEM = "54009119af1c881c07000029";
|
||||
public static string CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25";
|
||||
public static string AUXILIARY_MOD = "5a74651486f7744e73386dd1";
|
||||
public static string BIPOD = "55818afb4bdc2dde698b456d";
|
||||
public static string HEADPHONES = "5645bcb74bdc2ded0b8b4578";
|
||||
public static string RANDOM_LOOT_CONTAINER = "62f109593b54472778797866";
|
||||
public static string STACKABLE_ITEM = "5661632d4bdc2d903d8b456b";
|
||||
public static string BUILT_IN_INSERTS = "65649eb40bf0ed77b8044453";
|
||||
public static string ARMOR_PLATE = "644120aa86ffbe10ee032b6f";
|
||||
public static string CULTIST_AMULET = "64b69b0c8f3be32ed22682f8";
|
||||
public static string RADIO_TRANSMITTER = "62e9103049c018f425059f38";
|
||||
public static string HANDGUARD = "55818a104bdc2db9688b4569";
|
||||
public static string PISTOL_GRIP = "55818a684bdc2ddd698b456d";
|
||||
public static string RECEIVER = "55818a304bdc2db5418b457d";
|
||||
public static string BARREL = "555ef6e44bdc2de9068b457e";
|
||||
public static string CHARGING_HANDLE = "55818a6f4bdc2db9688b456b";
|
||||
public static string COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ";
|
||||
public static string HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user