[11237] Implement conditional check in EffectQuestComplete

A few spells has basepoint value, conditional for successful effect.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-03-10 17:13:14 +01:00
parent 792b5ba343
commit fcb4eca715
2 changed files with 17 additions and 1 deletions

View file

@ -8043,6 +8043,22 @@ void Spell::EffectQuestComplete(SpellEffectIndex eff_idx)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
// A few spells has additional value from basepoints, check condition here.
switch(m_spellInfo->Id)
{
case 43458: // Secrets of Nifflevar
case 72155: // Harvest Blight Specimen
case 72162: // Harvest Blight Specimen
{
if (!unitTarget->HasAura(m_spellInfo->CalculateSimpleValue(eff_idx)))
return;
break;
}
default:
break;
}
uint32 quest_id = m_spellInfo->EffectMiscValue[eff_idx];
((Player*)unitTarget)->AreaExploredOrEventHappens(quest_id);
}