From 5864f81b1e464204da6fdabe9faa4d804083bbe4 Mon Sep 17 00:00:00 2001 From: CWX Date: Fri, 27 Dec 2024 00:54:48 +0000 Subject: [PATCH] Merge branch 'bun' of https://github.com/sp-tarkov/server into bun --- project/assets/configs/item.json | 3 ++- project/src/callbacks/CustomizationCallbacks.ts | 7 ++++++- project/src/controllers/CustomizationController.ts | 4 ++++ .../routers/item_events/CustomizationItemEventRouter.ts | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/project/assets/configs/item.json b/project/assets/configs/item.json index 7eb37d62..5f52cfc6 100644 --- a/project/assets/configs/item.json +++ b/project/assets/configs/item.json @@ -51,7 +51,8 @@ "66da1b49099cf6adcc07a36b", "66da1b546916142b3b022777", "670ad7f1ad195290cd00da7a", - "66ec2aa6daf127599c0c31f1" + "66ec2aa6daf127599c0c31f1", + "67654a6759116d347b0bfb86" ], "rewardItemTypeBlacklist": ["65649eb40bf0ed77b8044453"], "lootableItemBlacklist": ["660bbc47c38b837877075e47", "660bc341c38b837877075e4c"], diff --git a/project/src/callbacks/CustomizationCallbacks.ts b/project/src/callbacks/CustomizationCallbacks.ts index cd771ffa..0d6c6862 100644 --- a/project/src/callbacks/CustomizationCallbacks.ts +++ b/project/src/callbacks/CustomizationCallbacks.ts @@ -62,7 +62,12 @@ export class CustomizationCallbacks { return this.httpResponse.getBody(this.customizationController.getHideoutCustomisation(sessionID, info)); } - getStorage(url: string, info: any, sessionID: string): IGetBodyResponseData { + public getStorage(url: string, info: any, sessionID: string): IGetBodyResponseData { return this.httpResponse.getBody(this.customizationController.getCustomisationStoage(sessionID, info)); } + + /** Handle CustomizationSet */ + public setClothing(pmcData: IPmcData, info: any, sessionID: string): IItemEventRouterResponse { + return this.httpResponse.getBody(this.customizationController.setClothing(sessionID, info)); + } } diff --git a/project/src/controllers/CustomizationController.ts b/project/src/controllers/CustomizationController.ts index 029fd13a..070b67da 100644 --- a/project/src/controllers/CustomizationController.ts +++ b/project/src/controllers/CustomizationController.ts @@ -248,4 +248,8 @@ export class CustomizationController { public getCustomisationStoage(sessionID: string, info: any): ICustomisationStorage[] { return this.databaseService.getTemplates().customisationStoage; } + + public setClothing(sessionId: string, info: any): any { + throw new Error("Method not implemented."); + } } diff --git a/project/src/routers/item_events/CustomizationItemEventRouter.ts b/project/src/routers/item_events/CustomizationItemEventRouter.ts index aabb8217..0412ccdd 100644 --- a/project/src/routers/item_events/CustomizationItemEventRouter.ts +++ b/project/src/routers/item_events/CustomizationItemEventRouter.ts @@ -27,6 +27,8 @@ export class CustomizationItemEventRouter extends ItemEventRouterDefinition { return this.customizationCallbacks.wearClothing(pmcData, body, sessionID); case "CustomizationBuy": return this.customizationCallbacks.buyClothing(pmcData, body, sessionID); + case "CustomizationSet": + return this.customizationCallbacks.setClothing(pmcData, body, sessionID); } } }