fix purchase: swap coins and gems

This commit is contained in:
Spirtix 2024-07-25 22:06:56 +02:00
parent d4294130d9
commit 18584fdc2b

View File

@ -2271,8 +2271,8 @@ public class ContentController : Controller {
} }
// deduct the cost of the purchase // deduct the cost of the purchase
achievementService.AddAchievementPoints(viking, AchievementPointTypes.GameCurrency, -totalCoinCost + gemsToAdd); achievementService.AddAchievementPoints(viking, AchievementPointTypes.GameCurrency, -totalCoinCost + coinsToAdd);
achievementService.AddAchievementPoints(viking, AchievementPointTypes.CashCurrency, -totalGemCost + coinsToAdd); achievementService.AddAchievementPoints(viking, AchievementPointTypes.CashCurrency, -totalGemCost + gemsToAdd);
// add items to the inventory (database) // add items to the inventory (database)
var addedItems = inventoryService.AddItemsToInventoryBulk(viking, inventoryItemsToAdd); var addedItems = inventoryService.AddItemsToInventoryBulk(viking, inventoryItemsToAdd);