返回提交历史
Modified
src/services/purchaseService.ts
+12
-2
XFEstudio/XFESpaceNinjaServer
fix: multiply currency by quantity for server-side vendor purchase (#3259)
Closes #3257 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3259 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
55d0e458
代码差异
1 个文件
+12
-2
@@ -129,12 +129,22 @@ export const handlePurchase = async (
129
129
}
130
130
if (!inventory.dontSubtractPurchaseCreditCost) {
131
131
if (offer.RegularPrice) {
132
updateCurrency(inventory, offer.RegularPrice[0], false, prePurchaseInventoryChanges);
132
updateCurrency(
133
inventory,
134
offer.RegularPrice[0] * purchaseRequest.PurchaseParams.Quantity,
135
false,
136
prePurchaseInventoryChanges
137
);
133
138
}
134
139
}
135
140
if (!inventory.dontSubtractPurchasePlatinumCost) {
136
141
if (offer.PremiumPrice) {
137
updateCurrency(inventory, offer.PremiumPrice[0], true, prePurchaseInventoryChanges);
142
updateCurrency(
143
inventory,
144
offer.PremiumPrice[0] * purchaseRequest.PurchaseParams.Quantity,
145
true,
146
prePurchaseInventoryChanges
147
);
138
148
}
139
149
}
140
150
if (