From 11e64eacab1526b3925b388094f16f508fd6b5f5 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 29 Dec 2023 23:06:57 +0000 Subject: [PATCH] Add achievement storage to profile on creation --- project/src/controllers/ProfileController.ts | 1 + project/src/models/eft/common/tables/IBotBase.ts | 2 ++ project/src/models/eft/inventory/ISetFavoriteItems.ts | 8 ++++++++ 3 files changed, 11 insertions(+) create mode 100644 project/src/models/eft/inventory/ISetFavoriteItems.ts diff --git a/project/src/controllers/ProfileController.ts b/project/src/controllers/ProfileController.ts index acb52638..d55af6ea 100644 --- a/project/src/controllers/ProfileController.ts +++ b/project/src/controllers/ProfileController.ts @@ -152,6 +152,7 @@ export class ProfileController pmcData.RepeatableQuests = []; pmcData.CarExtractCounts = {}; pmcData.CoopExtractCounts = {}; + pmcData.Achievements = {}; if (!pmcData.UnlockedInfo) { diff --git a/project/src/models/eft/common/tables/IBotBase.ts b/project/src/models/eft/common/tables/IBotBase.ts index 59456cfe..2834e5ee 100644 --- a/project/src/models/eft/common/tables/IBotBase.ts +++ b/project/src/models/eft/common/tables/IBotBase.ts @@ -28,6 +28,8 @@ export interface IBotBase TradersInfo: Record; UnlockedInfo: IUnlockedInfo; RagfairInfo: RagfairInfo; + /** Achievement id and timestamp */ + Achievements: Record RepeatableQuests: IPmcDataRepeatableQuest[]; Bonuses: Bonus[]; Notes: Notes; diff --git a/project/src/models/eft/inventory/ISetFavoriteItems.ts b/project/src/models/eft/inventory/ISetFavoriteItems.ts new file mode 100644 index 00000000..1b77e6bb --- /dev/null +++ b/project/src/models/eft/inventory/ISetFavoriteItems.ts @@ -0,0 +1,8 @@ +import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData"; + +export interface ISetFavoriteItems extends IInventoryBaseActionRequestData +{ + Action: "SetFavoriteItems"; + items: any[]; + timestamp: number +} \ No newline at end of file