Fixed circle craft not registering correctly

This commit is contained in:
Dev 2024-08-22 12:43:30 +01:00
parent c6877f998b
commit 38d2f88e0c

View File

@ -1257,18 +1257,16 @@ export class HideoutController {
pmcData: IPmcData, pmcData: IPmcData,
request: IHideoutCircleOfCultistProductionStartRequestData, request: IHideoutCircleOfCultistProductionStartRequestData,
): IItemEventRouterResponse | PromiseLike<IItemEventRouterResponse> { ): IItemEventRouterResponse | PromiseLike<IItemEventRouterResponse> {
// Sparse, just has id, can get it via ItemTpl enum too // Sparse, just has id
const cultistCraftData = this.databaseService.getHideout().production.cultistRecipes[0]; const cultistCraftData = this.databaseService.getHideout().production.cultistRecipes[0];
const sacrificedItems: Item[] = this.getSacrificedItems(pmcData); const sacrificedItems: Item[] = this.getSacrificedItems(pmcData);
const circleCraftId = ItemTpl.HIDEOUTAREACONTAINER_CIRCLEOFCULTISTS_STASH_1; // Create production in pmc profile
this.hideoutHelper.registerCircleOfCultistProduction(sessionId, pmcData, cultistCraftData._id, sacrificedItems);
this.hideoutHelper.registerCircleOfCultistProduction(sessionId, pmcData, circleCraftId, sacrificedItems);
// What items can be rewarded by completion of craft // What items can be rewarded by completion of craft
// TODO - how do we use this? maybe this is done in a later event? // TODO - how do we use this? maybe this is done in a later event?
const cultistStashDbItem = this.itemHelper.getItem(circleCraftId); const cultistStashDbItem = this.itemHelper.getItem(ItemTpl.HIDEOUTAREACONTAINER_CIRCLEOFCULTISTS_STASH_1);
const rewardItemPool = cultistStashDbItem[1]._props.Grids[0]._props.filters[0].Filter; const rewardItemPool = cultistStashDbItem[1]._props.Grids[0]._props.filters[0].Filter;
const output = this.eventOutputHolder.getOutput(sessionId); const output = this.eventOutputHolder.getOutput(sessionId);