Jump to content

[patch] Leeching Swarm


Guest KAPATEJIb

Recommended Posts

What bug does the patch fix? What features does the patch add?

Impemented effect of spell 66118 and difficulty variations. This ability used by Anub'arak in TOC instance

For which repository revision was the patch created?

9797

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

can't find any

Who has been writing this patch? Please include either forum user names or email addresses.

original author is MaS0n, rewritten by me

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index d31b27f..f6d48fd 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -8131,6 +8131,30 @@ void Aura::PeriodicDummyTick()
                        case 2: m_target->CastSpell(m_target, 55739, true); break;
                    }
                    return;
+                case 66118:                                 // Leeching Swarm 10 man
+                case 68646:
+                {
+                    int32 damage = (m_modifier.m_amount * m_target->GetHealth()) / 100;
+                    if (damage < 250)
+                        damage = 250;
+                    int32 heal = damage * 68 / 100;
+                    m_target->CastCustomSpell(m_target, 66240, &damage, NULL, NULL, true, NULL, this);
+                    if (Unit* caster = GetCaster())
+                        m_target->CastCustomSpell(caster, 66125, &heal, NULL, NULL, true, NULL, this);
+                    return;
+                }
+                case 67630:                                 // Leeching Swarm 25 man
+                case 68647:
+                {
+                    int32 damage = (m_modifier.m_amount * m_target->GetHealth()) / 100;
+                    if (damage < 250)
+                        damage = 250;
+                    int32 heal = damage * 155 / 100;
+                    m_target->CastCustomSpell(m_target, 66240, &damage, NULL, NULL, true, NULL, this);
+                    if (Unit* caster = GetCaster())
+                        m_target->CastCustomSpell(caster, 66125, &heal, NULL, NULL, true, NULL, this);
+                    return;
+                }
// Exist more after, need add later
                default:
                    break;

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use