Merge pull request #2007 from Imprtat/master

Сheck quest conditions in effect QuestComplete
This commit is contained in:
click
2011-06-15 11:16:40 -07:00
+4
View File
@@ -5907,6 +5907,10 @@ void Spell::EffectQuestComplete(SpellEffIndex effIndex)
uint32 quest_id = m_spellInfo->EffectMiscValue[effIndex];
if (quest_id)
{
Quest* pQuest = sObjectMgr->GetQuestTemplate(quest_id);
if (!pQuest || !pPlayer->CanTakeQuest(pQuest, false))
return;
uint16 log_slot = pPlayer->FindQuestSlot(quest_id);
if (log_slot < MAX_QUEST_LOG_SIZE)
pPlayer->AreaExploredOrEventHappens(quest_id);