Core/Quests: Fix case where source item provided isn't added to the bag (#29959)

This commit is contained in:
Meji
2024-05-26 18:12:05 +02:00
committed by GitHub
parent b2d735114b
commit 65ef114879

View File

@@ -16493,6 +16493,11 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count, Optional<bool> boun
if (updatedObjectives.size() == 1 && updatedObjectives[0]->Flags2 & QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM)
{
// Quest source items should ignore QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM
if (Quest const* quest = sObjectMgr->GetQuestTemplate(updatedObjectives[0]->QuestID))
if (quest->GetSrcItemId() == entry)
return;
if (hadBoundItemObjective)
*hadBoundItemObjective = updatedObjectives.size() == 1 && updatedObjectives[0]->Flags2 & QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM;