3d77ed8595
This changes the `RagfairPriceService.getDynamicOfferPriceForOffer()` method to handle the logic surrounding collecting prices for items in offers, while offloading the individual price generation to a new method. The new method, `RagfairPriceService.getDynamicItemPrice()`, is responsible for generating a price for either an item template, or optionally an offerItems collection. This change also allows `getDynamicItemPrice()` to be used elsewhere in the code-base to gather more "realistic" pricing for specific item templates. Fixes an edge-case where unreasonable prices would only be adjusted on the first item within an offer. Includes some tests. Related to #618. This will allow the insurance system to use this method to get better pricing for items. |
||
---|---|---|
.. | ||
ItemBaseClassService.test.ts | ||
PaymentService.test.ts | ||
PlayerService.test.ts | ||
RagfairPriceService.test.ts |