mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[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:
parent
792b5ba343
commit
fcb4eca715
2 changed files with 17 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue