diff options
author | click <none@none> | 2010-05-10 02:59:41 +0200 |
---|---|---|
committer | click <none@none> | 2010-05-10 02:59:41 +0200 |
commit | c214b4afb0555b003216a707d29642d34a31f8fa (patch) | |
tree | eeeba360d1aae56fdc13d0f3f0c20f3033b531b2 /src/game/QuestHandler.cpp | |
parent | 3b3f0caa69c9df629b6ab0793b50d20bd2f03ac6 (diff) |
Correctly complete quests with QUEST_FLAGS_AUTO_ACCEPT which should be completed the moment you accept it.
This fixes the quests which weren't completable in starting areas. Fixes issue #2042. Patch by liberate.
--HG--
branch : trunk
Diffstat (limited to 'src/game/QuestHandler.cpp')
-rw-r--r-- | src/game/QuestHandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp index 9b03f68efa8..43213801ebb 100644 --- a/src/game/QuestHandler.cpp +++ b/src/game/QuestHandler.cpp @@ -247,7 +247,11 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data) if (pQuest) { if (pQuest->HasFlag(QUEST_FLAGS_AUTO_ACCEPT) && _player->CanAddQuest(pQuest, true)) + { _player->AddQuest(pQuest, pObject); + if (_player->CanCompleteQuest(quest)) + _player->CompleteQuest(quest); + } if (pQuest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE)) _player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, pObject->GetGUID(), _player->CanCompleteQuest(pQuest->GetQuestId()), true); |