mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Core/Spells): Script Lord Valthalak's Amulet (#17431)
* fix(Core/Spells): Script Lord Valthalak's Amulet * cs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user