fix: buying flawed mods on iron wake doesn't consume credits
All checks were successful
Build / build (20) (push) Successful in 43s
Build / build (18) (push) Successful in 1m9s
Build / build (22) (push) Successful in 1m9s
Build / build (18) (pull_request) Successful in 43s
Build / build (20) (pull_request) Successful in 1m7s
Build / build (22) (pull_request) Successful in 1m6s

This commit is contained in:
Sainan 2025-03-18 09:35:00 +01:00
parent b4da457501
commit c2009e1422

View File

@ -175,7 +175,14 @@ export const handlePurchase = async (
if (purchaseRequest.PurchaseParams.SourceId! in ExportVendors) {
const vendor = ExportVendors[purchaseRequest.PurchaseParams.SourceId!];
const offer = vendor.items.find(x => x.storeItem == purchaseRequest.PurchaseParams.StoreItem);
if (offer && offer.itemPrices) {
if (offer) {
if (offer.credits) {
combineInventoryChanges(
purchaseResponse.InventoryChanges,
updateCurrency(inventory, offer.credits, false)
);
}
if (offer.itemPrices) {
handleItemPrices(
inventory,
offer.itemPrices,
@ -184,6 +191,7 @@ export const handlePurchase = async (
);
}
}
}
break;
case 18: {
if (purchaseRequest.PurchaseParams.SourceId! != worldState.PrimeVaultTraders[0]._id.$oid) {