aboutsummaryrefslogtreecommitdiff
path: root/src/game/QuestHandler.cpp
diff options
context:
space:
mode:
authorclick <none@none>2010-04-25 23:52:33 +0200
committerclick <none@none>2010-04-25 23:52:33 +0200
commit4f209556c3a31949758f5d0f1dc77e7f9a3942ca (patch)
tree0a5b1babd2c326e7395f77817963215aede624a9 /src/game/QuestHandler.cpp
parentedbbec75b13430d817f42e48319c1043c4fcd5d1 (diff)
Implement coreside support for questflag QUEST_FLAGS_AUTO_ACCEPT and its use - patch and research by click and Liberate
(This also fixes the complaints that starter-quests were broken - the flag was actually never used coreside) --HG-- branch : trunk
Diffstat (limited to 'src/game/QuestHandler.cpp')
-rw-r--r--src/game/QuestHandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp
index 5caf5c8a20e..1da286509dd 100644
--- a/src/game/QuestHandler.cpp
+++ b/src/game/QuestHandler.cpp
@@ -246,7 +246,10 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
Quest const* pQuest = objmgr.GetQuestTemplate(quest);
if (pQuest)
{
- if (pQuest->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE)
+ if (pQuest->HasFlag(QUEST_FLAGS_AUTO_ACCEPT) && _player->CanAddQuest(pQuest, true))
+ _player->AddQuest(pQuest, pObject);
+
+ if (pQuest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE))
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, pObject->GetGUID(), _player->CanCompleteQuest(pQuest->GetQuestId()), true);
else
_player->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, pObject->GetGUID(), true);