Further cleanup after removal of persistPurchaseDataInProfile
This commit is contained in:
parent
f365f979c4
commit
467927afeb
@ -168,9 +168,6 @@ export class TradeHelper
|
||||
traderId: buyRequestData.tid,
|
||||
};
|
||||
this.traderHelper.addTraderPurchasesToPlayerProfile(sessionID, itemPurchaseDat, itemPurchased);
|
||||
|
||||
// Increment non-fence trader item buy count
|
||||
this.incrementAssortBuyCount(itemPurchased, buyCount);
|
||||
}
|
||||
};
|
||||
|
||||
@ -277,22 +274,6 @@ export class TradeHelper
|
||||
this.paymentService.giveProfileMoney(profileToReceiveMoney, sellRequest.price, sellRequest, output, sessionID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment the assorts buy count by number of items purchased
|
||||
* Show error on screen if player attempts to buy more than what the buy max allows
|
||||
* @param assortBeingPurchased assort being bought
|
||||
* @param itemsPurchasedCount number of items being bought
|
||||
*/
|
||||
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void
|
||||
{
|
||||
assortBeingPurchased.upd.BuyRestrictionCurrent += itemsPurchasedCount;
|
||||
|
||||
if (assortBeingPurchased.upd.BuyRestrictionCurrent > assortBeingPurchased.upd.BuyRestrictionMax)
|
||||
{
|
||||
throw new Error("Unable to purchase item, Purchase limit reached");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||
* @param sessionId Session id
|
||||
|
Loading…
x
Reference in New Issue
Block a user