fix(Core/Spells): Script Lord Valthalak's Amulet (#17431)
* fix(Core/Spells): Script Lord Valthalak's Amulet * cs
This commit is contained in:
parent
4d285d21b0
commit
91c6bdd540
3 changed files with 40 additions and 0 deletions
|
|
@ -4997,6 +4997,32 @@ class spell_gen_spirit_of_competition_winner : public SpellScript
|
|||
}
|
||||
};
|
||||
|
||||
// 27360 - Lord Valthalak's Amulet
|
||||
enum Valthalak
|
||||
{
|
||||
SPELL_INSTILL_LORD_VALTHALAK_SPIRIT = 27360,
|
||||
NPC_LORD_VALTHALAK = 16042
|
||||
};
|
||||
|
||||
class spell_gen_valthalak_amulet : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_valthalak_amulet)
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
if (target->GetEntry() == NPC_LORD_VALTHALAK && target->isDead())
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_gen_valthalak_amulet::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
|
|
@ -5145,4 +5171,5 @@ void AddSC_generic_spell_scripts()
|
|||
RegisterSpellScript(spell_gen_curse_of_pain);
|
||||
RegisterSpellScript(spell_gen_spirit_of_competition_participant);
|
||||
RegisterSpellScript(spell_gen_spirit_of_competition_winner);
|
||||
RegisterSpellScript(spell_gen_valthalak_amulet);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue