forked from OpenWF/SpaceNinjaServer
fix: buying flawed mods on iron wake doesn't consume credits (#1228)
Reviewed-on: OpenWF/SpaceNinjaServer#1228
This commit is contained in:
parent
0e1973e246
commit
3986dac8ef
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user