feat: track vendor purchases #1153

Merged
Sainan merged 5 commits from recent-vendor-purchases into main 2025-03-13 02:14:54 -07:00
Showing only changes of commit 8e0ff9d7f6 - Show all commits

View File

@ -69,7 +69,6 @@ export const handlePurchase = async (
inventoryChanges
);
}
purchaseRequest.PurchaseParams.Quantity *= offer.QuantityMultiplier;
if (!config.noVendorPurchaseLimits) {
inventory.RecentVendorPurchases ??= [];
let vendorPurchases = inventory.RecentVendorPurchases.find(
@ -110,6 +109,7 @@ export const handlePurchase = async (
}
];
}
purchaseRequest.PurchaseParams.Quantity *= offer.QuantityMultiplier;
} else if (!ExportVendors[purchaseRequest.PurchaseParams.SourceId!]) {
throw new Error(`unknown vendor: ${purchaseRequest.PurchaseParams.SourceId!}`);
}