Update for 3.4.1

This commit is contained in:
Chomp 2022-12-27 12:33:42 +00:00
parent b0ce3a5081
commit 7d3dbf6cd1
89 changed files with 449 additions and 164 deletions

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Shirito", "author": "Shirito",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Alex", "author": "Alex",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.4.0", "akiVersion": "3.4.1",
"scripts": { "scripts": {
"setup": "npm i", "setup": "npm i",
"build": "node ./packageBuild.ts" "build": "node ./packageBuild.ts"

View File

@ -27,7 +27,7 @@ export declare class HealthController {
* @param sessionID * @param sessionID
* @param addEffects Should effects found be added or removed from profile * @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 * When healing in menu
* @param pmcData * @param pmcData
@ -40,9 +40,16 @@ export declare class HealthController {
/** /**
* Occurs on post-raid healing page * Occurs on post-raid healing page
* @param pmcData player profile * @param pmcData player profile
* @param info Request data from client * @param healthTreatmentRequest Request data from client
* @param sessionID Session id * @param sessionID Session id
* @returns * @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;
} }

View File

@ -95,13 +95,13 @@ export declare class QuestController {
*/ */
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; 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 sessionID session id
* @param pmcData player profile * @param pmcData Player profile
* @param completedQuestId completed quest id * @param completedQuestId Completed quest id
* @param questRewards rewards given to player * @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 * Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id * @param completedQuestId quest completed id

View File

@ -29,7 +29,7 @@ export declare class HealthHelper {
* @param sessionID Session id * @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add) * @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; protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/** /**
* Save effects to profile * Save effects to profile
@ -40,7 +40,7 @@ export declare class HealthHelper {
* @param addEffects Should effects be added back to profile * @param addEffects Should effects be added back to profile
* @returns * @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 * Add effect to body part in profile
* @param pmcData Player profile * @param pmcData Player profile

View File

@ -44,6 +44,7 @@ export declare class InRaidHelper {
* @returns Reset profile object * @returns Reset profile object
*/ */
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; 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 * 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 * Remove the relevant key from an inventory based on the post-raid request data passed in

View File

@ -43,6 +43,17 @@ export declare class InventoryHelper {
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected inventoryConfig: IInventoryConfig; 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); 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; 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; removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse; removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;