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

(cherry picked from commit 65ef114879)
This commit is contained in:
Meji
2024-05-26 18:12:05 +02:00
committed by Ovahlord
parent 236ed21e8d
commit 1334844ad8

View File

@@ -16042,6 +16042,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;