Guest User

Untitled

a guest
Jun 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.78 KB | None | 0 0
  1.  src/server/scripts/Spells/spell_item.cpp |   17 +++++++----------
  2.  1 files changed, 7 insertions(+), 10 deletions(-)
  3.  
  4. diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
  5. index 844162a..46da4ab 100644
  6. --- a/src/server/scripts/Spells/spell_item.cpp
  7. +++ b/src/server/scripts/Spells/spell_item.cpp
  8. @@ -1504,7 +1504,8 @@ class spell_item_complete_raptor_capture : public SpellScriptLoader
  9.  
  10.  enum ImpaleLeviroth
  11.  {
  12. -    NPC_LEVIROTH    = 26452,
  13. +    NPC_LEVIROTH                = 26452,
  14. +    SPELL_LEViROTH_SELF_IMPALE  = 49882
  15.  };
  16.  
  17.  class spell_item_impale_leviroth : public SpellScriptLoader
  18. @@ -1516,11 +1517,6 @@ class spell_item_impale_leviroth : public SpellScriptLoader
  19.          {
  20.              PrepareSpellScript(spell_item_impale_leviroth_SpellScript);
  21.  
  22. -            bool Load()
  23. -            {
  24. -                return GetHitCreature()->GetEntry() == NPC_LEVIROTH;
  25. -            }
  26. -
  27.              bool Validate(SpellInfo const* /*spell*/)
  28.              {
  29.                  if (!sObjectMgr->GetCreatureTemplate(NPC_LEVIROTH))
  30. @@ -1530,10 +1526,11 @@ class spell_item_impale_leviroth : public SpellScriptLoader
  31.  
  32.              void HandleDummy(SpellEffIndex /* effIndex */)
  33.              {
  34. -                Unit* caster = GetCaster();
  35. -                if (Unit* target = GetHitCreature())
  36. -                    if (target->HealthBelowPct(95))
  37. -                        caster->DealDamage(target, target->CountPctFromMaxHealth(93));
  38. +                Unit* target = GetHitCreature();
  39. +                if (!target || !target->GetEntry() == NPC_LEVIROTH || !target->HealthBelowPct(95))
  40. +                    return;
  41. +
  42. +                target->CastSpell(target, SPELL_LEViROTH_SELF_IMPALE, true);
  43.              }
  44.  
  45.              void Register()
Add Comment
Please, Sign In to add comment