diff options
| author | Discover- <amort11@hotmail.com> | 2013-12-14 19:41:54 +0100 |
|---|---|---|
| committer | Discover- <amort11@hotmail.com> | 2013-12-14 19:42:31 +0100 |
| commit | e17af3f20336ea399bd2d4badfc8501a043f0a85 (patch) | |
| tree | c7fcc4c5e80f15e3c34e785c60131aae036b54a5 /src/server/game/AI/SmartScripts | |
| parent | ec8e94c6ac9079981378e6ca0cd1380f02a092dd (diff) | |
Core/Quests: Fix an issue where auto-completed quests would not be automatically completed if the quest was added through either the SmartAI action_type SMART_ACTION_ADD_QUEST, the spell effect SPELL_EFFECT_QUEST_START or the opcode CMSG_QUEST_CONFIRM_ACCEPT. Also fixes auto-complete quests in the SAI and opcode case not calling the AI hook.
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 2b56d427efb..a272cb79f51 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -369,7 +369,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (IsPlayer(*itr)) if (Quest const* q = sObjectMgr->GetQuestTemplate(e.action.quest.quest)) { - (*itr)->ToPlayer()->AddQuest(q, NULL); + (*itr)->ToPlayer()->AddQuestAndCheckCompletion(q, NULL); TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_ADD_QUEST: Player guidLow %u add quest %u", (*itr)->GetGUIDLow(), e.action.quest.quest); } |
