mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-01 14:46:54 +01:00
Core/Quests: Fixed an issue with self-completing quests.
This commit is contained in:
@@ -224,16 +224,13 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket& recvData)
|
||||
|
||||
if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId))
|
||||
{
|
||||
// not sure here what should happen to quests with QUEST_FLAGS_AUTOCOMPLETE
|
||||
// if this breaks them, add && object->GetTypeId() == TYPEID_ITEM to this check
|
||||
// item-started quests never have that flag
|
||||
if (!_player->CanTakeQuest(quest, true))
|
||||
return;
|
||||
|
||||
if (quest->IsAutoAccept() && _player->CanAddQuest(quest, true))
|
||||
_player->AddQuestAndCheckCompletion(quest, object);
|
||||
|
||||
if (quest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE))
|
||||
if (quest->IsAutoComplete())
|
||||
_player->PlayerTalkClass->SendQuestGiverRequestItems(quest, object->GetGUID(), _player->CanCompleteQuest(quest->GetQuestId()), true);
|
||||
else
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(quest, object->GetGUID(), true);
|
||||
|
||||
Reference in New Issue
Block a user