Show error when item not found in player inventory when handing over items for quest
This commit is contained in:
parent
0de6f201fe
commit
f451920fb7
@ -797,8 +797,8 @@ export class QuestController
|
||||
let totalItemCountToRemove = 0;
|
||||
for (const itemHandover of handoverQuestRequest.items)
|
||||
{
|
||||
const matchingItemInProfile = pmcData.Inventory.items.find((x) => x._id === itemHandover.id);
|
||||
if (!handoverRequirements._props.target.includes(matchingItemInProfile._tpl))
|
||||
const matchingItemInProfile = pmcData.Inventory.items.find((item) => item._id === itemHandover.id);
|
||||
if (!matchingItemInProfile || !handoverRequirements._props.target.includes(matchingItemInProfile._tpl))
|
||||
{
|
||||
// Item handed in by player doesnt match what was requested
|
||||
return this.showQuestItemHandoverMatchError(
|
||||
|
Loading…
Reference in New Issue
Block a user