Core/Quests: Fixed an issue with self-completing quests.

This commit is contained in:
Subv
2014-09-13 17:57:42 -05:00
parent 60eafebbcb
commit af877867bf

View File

@@ -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);