diff options
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 03997159001..832d4d46076 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -348,6 +348,52 @@ class go_acherus_soul_prison : public GameObjectScript } }; +class spell_death_knight_initiate_visual : public SpellScript +{ + PrepareSpellScript(spell_death_knight_initiate_visual); + + void HandleScriptEffect(SpellEffIndex /* effIndex */) + { + Creature* target = GetHitCreature(); + if (!target) + return; + + uint32 spellId; + switch (target->GetDisplayId()) + { + case 25369: spellId = 51552; break; // bloodelf female + case 25373: spellId = 51551; break; // bloodelf male + case 25363: spellId = 51542; break; // draenei female + case 25357: spellId = 51541; break; // draenei male + case 25361: spellId = 51537; break; // dwarf female + case 25356: spellId = 51538; break; // dwarf male + case 25372: spellId = 51550; break; // forsaken female + case 25367: spellId = 51549; break; // forsaken male + case 25362: spellId = 51540; break; // gnome female + case 25359: spellId = 51539; break; // gnome male + case 25355: spellId = 51534; break; // human female + case 25354: spellId = 51520; break; // human male + case 25360: spellId = 51536; break; // nightelf female + case 25358: spellId = 51535; break; // nightelf male + case 25368: spellId = 51544; break; // orc female + case 25364: spellId = 51543; break; // orc male + case 25371: spellId = 51548; break; // tauren female + case 25366: spellId = 51547; break; // tauren male + case 25370: spellId = 51545; break; // troll female + case 25365: spellId = 51546; break; // troll male + default: return; + } + + target->CastSpell(target, spellId, true); + target->LoadEquipment(); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_death_knight_initiate_visual::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + /*###### ## npc_eye_of_acherus ######*/ @@ -1243,6 +1289,7 @@ void AddSC_the_scarlet_enclave_c1() new npc_unworthy_initiate(); new npc_unworthy_initiate_anchor(); new go_acherus_soul_prison(); + RegisterSpellScript(spell_death_knight_initiate_visual); new npc_eye_of_acherus(); new npc_death_knight_initiate(); RegisterCreatureAI(npc_dark_rider_of_acherus); |
