Reverted majority of changes from 3a3a7b1026818dcb8d16bd259506bbd308647ec8 as they didn't actually fix the issue and instead caused items to sell to traders for incorrect values
This commit is contained in:
parent
ea0c37b179
commit
0c8d829317
@ -168,16 +168,8 @@ export class TraderController {
|
||||
|
||||
/** Handle client/items/prices/TRADERID */
|
||||
public getItemPrices(sessionId: string, traderId: string): IGetItemPricesResponse {
|
||||
const pmcData = this.profileHelper.getPmcProfile(sessionId);
|
||||
const traderDetails = this.traderHelper.getLoyaltyLevel(traderId, pmcData);
|
||||
const traderItemSellMultipler = 1 - traderDetails.buy_price_coef / 100;
|
||||
|
||||
// Clone handbook prices so we can apply the coef multipler to every item
|
||||
const handbookPrices = this.ragfairPriceService.getAllStaticPrices();
|
||||
const handbookPricesClone = this.cloner.clone(handbookPrices);
|
||||
for (const handbookItemKey in handbookPricesClone) {
|
||||
handbookPricesClone[handbookItemKey] = handbookPricesClone[handbookItemKey] * traderItemSellMultipler;
|
||||
}
|
||||
|
||||
return {
|
||||
supplyNextTime: this.traderHelper.getNextUpdateTimestamp(traderId),
|
||||
|
Loading…
x
Reference in New Issue
Block a user