Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.42 KB | None | 0 0
  1. +enum WeaknessToLightning
  2. +{
  3. +    SPELL_WEAKNESS_TO_LIGHTNING_CAST_ON_MASTER_SCRIPT_EFFECT          = 46444,
  4. +    SPELL_WEAKNESS_TO_LIGHTNING_KILL_CREDIT_FROM_PET                  = 46445
  5. +};
  6. +
  7. +class spell_q11896_weakness_to_lightning_46444 : public SpellScript
  8. +{
  9. +    PrepareSpellScript(spell_q11896_weakness_to_lightning_46444);
  10. +
  11. +    void HandleScript(SpellEffIndex /*effIndex*/)
  12. +    {
  13. +        if (Unit* target = GetHitUnit())
  14. +        {
  15. +            if (Unit* owner = target->GetOwner())
  16. +            {
  17. +                owner->CastSpell(owner, SPELL_WEAKNESS_TO_LIGHTNING_KILL_CREDIT_FROM_PET, true);
  18. +            }
  19. +        }
  20. +    }
  21. +
  22. +    void Register() override
  23. +    {
  24. +        OnEffectHitTarget += SpellEffectFn(spell_q11896_weakness_to_lightning_46444::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
  25. +    }
  26. +};
  27. +
  28.  void AddSC_quest_spell_scripts()
  29.  {
  30.      new spell_q55_sacred_cleansing();
  31. @@ -2949,6 +2976,7 @@ void AddSC_quest_spell_scripts()
  32.      RegisterSpellScript(spell_q13264_q13276_q13288_q13289_area_restrict_abom);
  33.      RegisterSpellScript(spell_q13264_q13276_q13288_q13289_assign_credit_to_master);
  34.      RegisterSpellScript(spell_q12690_burst_at_the_seams_52510);
  35. +   RegisterSpellScript(spell_q11896_weakness_to_lightning_46444);
  36.      new spell_q12308_escape_from_silverbrook_summon_worgen();
  37.      new spell_q12308_escape_from_silverbrook();
  38.      new spell_q12641_death_comes_from_on_high();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement