From fac52bfda18f6af9d16167d211684bfb77447260 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sun, 6 Apr 2025 23:19:00 +0200 Subject: [PATCH] fix: scale credits subtracted from clan vault when auto-contributing --- src/controllers/api/placeDecoInComponentController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/api/placeDecoInComponentController.ts b/src/controllers/api/placeDecoInComponentController.ts index deaefc06..ea40dae3 100644 --- a/src/controllers/api/placeDecoInComponentController.ts +++ b/src/controllers/api/placeDecoInComponentController.ts @@ -77,8 +77,8 @@ export const placeDecoInComponentController: RequestHandler = async (req, res) = } } if (enoughMiscItems) { - guild.VaultRegularCredits -= meta.price; - deco.RegularCredits = meta.price; + guild.VaultRegularCredits -= scaleRequiredCount(guild.Tier, meta.price); + deco.RegularCredits = scaleRequiredCount(guild.Tier, meta.price); deco.MiscItems = []; for (const ingredient of meta.ingredients) {