Added check quest conditions in effect EffectQuestComplete(16)

This commit is contained in:
Imprtat
2011-06-15 20:24:47 +03:00
parent 53e45b57f8
commit beac21226c

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);