Core/Quests: Add missing GO_DYNFLAG_LO_ACTIVATE to lootable chests related to quests but not having quest loot

Closes #24474

(cherry picked from commit a26304478d)
This commit is contained in:
Shauren
2020-05-19 21:21:39 +02:00
parent b1a1e552d2
commit 0e586bb476

View File

@@ -1509,7 +1509,7 @@ bool GameObject::ActivateToQuest(Player const* target) const
return false;
// scan GO chest with loot including quest items
if (LootTemplates_Gameobject.HaveQuestLootForPlayer(GetGOInfo()->GetLootId(), target))
if (target->GetQuestStatus(GetGOInfo()->chest.questID) == QUEST_STATUS_INCOMPLETE || LootTemplates_Gameobject.HaveQuestLootForPlayer(GetGOInfo()->GetLootId(), target))
{
if (Battleground const* bg = target->GetBattleground())
return bg->CanActivateGO(GetEntry(), target->GetTeam());