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
This commit is contained in:
click
2010-04-25 23:52:33 +02:00
parent edbbec75b1
commit 4f209556c3
2 changed files with 20 additions and 4 deletions
+4 -1
View File
@@ -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);