Skip to content

Commit

Permalink
Updated client/trading/customization/storage to better match live
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomp committed Jan 13, 2025
1 parent 34b5608 commit 4340d98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions project/src/callbacks/CustomizationCallbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import type { ICustomisationStorage } from "@spt/models/eft/common/tables/ICusto
import type { ISuit } from "@spt/models/eft/common/tables/ITrader";
import type { IBuyClothingRequestData } from "@spt/models/eft/customization/IBuyClothingRequestData";
import type { ICustomizationSetRequest } from "@spt/models/eft/customization/ICustomizationSetRequest";
import type { IGetSuitsResponse } from "@spt/models/eft/customization/IGetSuitsResponse";
import type { IWearClothingRequestData } from "@spt/models/eft/customization/IWearClothingRequestData";
import type { IHideoutCustomisation } from "@spt/models/eft/hideout/IHideoutCustomisation";
import type { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import type { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
Expand All @@ -26,9 +24,12 @@ export class CustomizationCallbacks {
* Handle client/trading/customization/storage
* @returns IGetSuitsResponse
*/
public getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse> {
const result: IGetSuitsResponse = { _id: sessionID, suites: this.saveServer.getProfile(sessionID).suits };
return this.httpResponse.getBody(result);
public getCustomisationUnlocks(
url: string,
info: IEmptyRequestData,
sessionID: string,
): IGetBodyResponseData<ICustomisationStorage[]> {
return this.httpResponse.getBody(this.saveServer.getProfile(sessionID).customisationUnlocks);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions project/src/routers/static/CustomizationStaticRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export class CustomizationStaticRouter extends StaticRouter {
info: any,
sessionID: string,
output: string,
): Promise<IGetBodyResponseData<IGetSuitsResponse>> => {
return this.customizationCallbacks.getSuits(url, info, sessionID);
): Promise<IGetBodyResponseData<ICustomisationStorage[]>> => {
return this.customizationCallbacks.getCustomisationUnlocks(url, info, sessionID);
},
),
new RouteAction(
Expand Down

0 comments on commit 4340d98

Please sign in to comment.