mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +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)
|
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
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];
|
uint32 quest_id = m_spellInfo->EffectMiscValue[eff_idx];
|
||||||
((Player*)unitTarget)->AreaExploredOrEventHappens(quest_id);
|
((Player*)unitTarget)->AreaExploredOrEventHappens(quest_id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11236"
|
#define REVISION_NR "11237"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue