Handle quest failures

This commit is contained in:
Dev 2024-01-05 21:14:20 +00:00
parent 9dbd3d1acf
commit 861987406e
2 changed files with 6 additions and 0 deletions

View File

@ -179,6 +179,10 @@ export class InventoryCallbacks
return this.inventoryController.setFavoriteItem(pmcData, body, sessionId);
}
/**
* TODO - MOVE INTO QUEST CODE
* Handle game/profile/items/moving - QuestFail
*/
public failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse
{
return this.questController.failQuest(pmcData, request, sessionID);

View File

@ -97,6 +97,8 @@ export class InventoryItemEventRouter extends ItemEventRouterDefinition
return this.inventoryCallbacks.redeemProfileReward(pmcData, body, sessionID);
case ItemEventActions.SET_FAVORITE_ITEMS:
return this.inventoryCallbacks.setFavoriteItem(pmcData, body, sessionID);
case ItemEventActions.QUEST_FAIL:
return this.inventoryCallbacks.failQuest(pmcData, body, sessionID);
default:
throw new Error(`Unhandled event ${url} request: ${JSON.stringify(body)}`);
}