From 7d3dbf6cd13e8276acae88b804aaa30fd14a13c4 Mon Sep 17 00:00:00 2001 From: Chomp Date: Tue, 27 Dec 2022 12:33:42 +0000 Subject: [PATCH] Update for 3.4.1 --- TypeScript/10ScopesAndTypes/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/12ClassExtensionOverride/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/13AddTrader/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../13AddTrader/types/helpers/HealthHelper.d.ts | 4 ++-- .../13AddTrader/types/helpers/InRaidHelper.d.ts | 1 + .../13AddTrader/types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/14AfterDBLoadHook/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/15HttpListenerExample/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/1LogToConsole/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../1LogToConsole/types/helpers/HealthHelper.d.ts | 4 ++-- .../1LogToConsole/types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/2EditDatabase/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../2EditDatabase/types/helpers/HealthHelper.d.ts | 4 ++-- .../2EditDatabase/types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/3GetSptConfigFile/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/4UseACustomConfigFile/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/5ReplaceMethod/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../5ReplaceMethod/types/helpers/HealthHelper.d.ts | 4 ++-- .../5ReplaceMethod/types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/6ReferenceAnotherClass/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../types/helpers/HealthHelper.d.ts | 4 ++-- .../types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/7OnLoadHook/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../7OnLoadHook/types/helpers/HealthHelper.d.ts | 4 ++-- .../7OnLoadHook/types/helpers/InRaidHelper.d.ts | 1 + .../7OnLoadHook/types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/8OnUpdateHook/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../8OnUpdateHook/types/helpers/HealthHelper.d.ts | 4 ++-- .../8OnUpdateHook/types/helpers/InRaidHelper.d.ts | 1 + .../types/helpers/InventoryHelper.d.ts | 11 +++++++++++ TypeScript/9RouterHooks/package.json | 2 +- .../types/controllers/HealthController.d.ts | 13 ++++++++++--- .../types/controllers/QuestController.d.ts | 10 +++++----- .../9RouterHooks/types/helpers/HealthHelper.d.ts | 4 ++-- .../9RouterHooks/types/helpers/InRaidHelper.d.ts | 1 + .../9RouterHooks/types/helpers/InventoryHelper.d.ts | 11 +++++++++++ 89 files changed, 449 insertions(+), 164 deletions(-) diff --git a/TypeScript/10ScopesAndTypes/package.json b/TypeScript/10ScopesAndTypes/package.json index eee59e2..14b9cb3 100644 --- a/TypeScript/10ScopesAndTypes/package.json +++ b/TypeScript/10ScopesAndTypes/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/12ClassExtensionOverride/package.json b/TypeScript/12ClassExtensionOverride/package.json index 6fb9d2d..dcf1910 100644 --- a/TypeScript/12ClassExtensionOverride/package.json +++ b/TypeScript/12ClassExtensionOverride/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/13AddTrader/package.json b/TypeScript/13AddTrader/package.json index 495c7db..6b4dd47 100644 --- a/TypeScript/13AddTrader/package.json +++ b/TypeScript/13AddTrader/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Shirito", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/13AddTrader/types/controllers/HealthController.d.ts b/TypeScript/13AddTrader/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/13AddTrader/types/controllers/HealthController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/14AfterDBLoadHook/package.json b/TypeScript/14AfterDBLoadHook/package.json index 4967d1f..572fde8 100644 --- a/TypeScript/14AfterDBLoadHook/package.json +++ b/TypeScript/14AfterDBLoadHook/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/15HttpListenerExample/package.json b/TypeScript/15HttpListenerExample/package.json index 27a94de..f46fb7c 100644 --- a/TypeScript/15HttpListenerExample/package.json +++ b/TypeScript/15HttpListenerExample/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Alex", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/1LogToConsole/package.json b/TypeScript/1LogToConsole/package.json index fc0e9ac..9342d21 100644 --- a/TypeScript/1LogToConsole/package.json +++ b/TypeScript/1LogToConsole/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/2EditDatabase/package.json b/TypeScript/2EditDatabase/package.json index f4b4e8f..70e4cd0 100644 --- a/TypeScript/2EditDatabase/package.json +++ b/TypeScript/2EditDatabase/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/3GetSptConfigFile/package.json b/TypeScript/3GetSptConfigFile/package.json index c154270..05f96f7 100644 --- a/TypeScript/3GetSptConfigFile/package.json +++ b/TypeScript/3GetSptConfigFile/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/4UseACustomConfigFile/package.json b/TypeScript/4UseACustomConfigFile/package.json index 0a96348..8ce9132 100644 --- a/TypeScript/4UseACustomConfigFile/package.json +++ b/TypeScript/4UseACustomConfigFile/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/5ReplaceMethod/package.json b/TypeScript/5ReplaceMethod/package.json index a33d897..d736916 100644 --- a/TypeScript/5ReplaceMethod/package.json +++ b/TypeScript/5ReplaceMethod/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/6ReferenceAnotherClass/package.json b/TypeScript/6ReferenceAnotherClass/package.json index 0d75bc6..2de9fe0 100644 --- a/TypeScript/6ReferenceAnotherClass/package.json +++ b/TypeScript/6ReferenceAnotherClass/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/7OnLoadHook/package.json b/TypeScript/7OnLoadHook/package.json index 47b2f37..5edfc92 100644 --- a/TypeScript/7OnLoadHook/package.json +++ b/TypeScript/7OnLoadHook/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/8OnUpdateHook/package.json b/TypeScript/8OnUpdateHook/package.json index 116fa92..45321a2 100644 --- a/TypeScript/8OnUpdateHook/package.json +++ b/TypeScript/8OnUpdateHook/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; diff --git a/TypeScript/9RouterHooks/package.json b/TypeScript/9RouterHooks/package.json index 6051b65..afd6b9d 100644 --- a/TypeScript/9RouterHooks/package.json +++ b/TypeScript/9RouterHooks/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "3.4.0", + "akiVersion": "3.4.1", "scripts": { "setup": "npm i", "build": "node ./packageBuild.ts" diff --git a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts index 97cf7ef..86f72e3 100644 --- a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts @@ -27,7 +27,7 @@ export declare class HealthController { * @param sessionID * @param addEffects Should effects found be added or removed from profile */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; /** * When healing in menu * @param pmcData @@ -40,9 +40,16 @@ export declare class HealthController { /** * Occurs on post-raid healing page * @param pmcData player profile - * @param info Request data from client + * @param healthTreatmentRequest Request data from client * @param sessionID Session id * @returns */ - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse; + /** + * iterate over treatment request diff and find effects to remove from player limbs + * @param sessionId + * @param profile Profile to update + * @param treatmentRequest client request + */ + protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts index b57eb40..3f8f96f 100644 --- a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts @@ -95,13 +95,13 @@ export declare class QuestController { */ completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; /** - * Send a popup to player on completion of a quest + * Send a popup to player on successful completion of a quest * @param sessionID session id - * @param pmcData player profile - * @param completedQuestId completed quest id - * @param questRewards rewards given to player + * @param pmcData Player profile + * @param completedQuestId Completed quest id + * @param questRewards Rewards given to player */ - protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; + protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void; /** * Returns a list of quests that should be failed when a quest is completed * @param completedQuestId quest completed id diff --git a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts index 50b7559..6b5eec2 100644 --- a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts @@ -29,7 +29,7 @@ export declare class HealthHelper { * @param sessionID Session id * @param addEffects Should effects be added or removed (default - add) */ - saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void; + saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void; protected saveHealth(pmcData: IPmcData, sessionID: string): void; /** * Save effects to profile @@ -40,7 +40,7 @@ export declare class HealthHelper { * @param addEffects Should effects be added back to profile * @returns */ - protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index c7b7329..df2c4af 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -44,6 +44,7 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void; /** * Some maps have one-time-use keys (e.g. Labs * Remove the relevant key from an inventory based on the post-raid request data passed in diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index 6419f93..1ce49da 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -43,6 +43,17 @@ export declare class InventoryHelper { protected configServer: ConfigServer; protected inventoryConfig: IInventoryConfig; constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer); + /** + * BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory) + * @param pmcData Profile to add items to + * @param body request data to add items + * @param output response to send back to client + * @param sessionID Session id + * @param callback + * @param foundInRaid Will results added to inventory be set as found in raid + * @param addUpd Additional upd propertys for items being added to inventory + * @returns IItemEventRouterResponse + */ addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;