XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

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
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +12 -2
Modified src/services/purchaseService.ts +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 (