Jump to content

|PATCH|[8924-8925] Improved Leader of the Pack


Recommended Posts

Posted

For Revision 8914

Author: None Idea

Modified by: Insider42

Test: 100% Working

Me, Only extract, test, and port for latest Mangos Rev.

diff --git a/addition/8914_mangos_spell_proc_event.sql b/addition/8914_mangos_spell_proc_event.sql
new file mode 100644
index 0000000..9d119ec
--- /dev/null
+++ b/addition/8914_mangos_spell_proc_event.sql
@@ -0,0 +1,2 @@
+DELETE FROM `spell_proc_event` WHERE `entry` = 24932;
+INSERT INTO `spell_proc_event` VALUES
(24932,0x00,0,0x00000000,0x00000000,0x00000000,0x00054044,0x00000002,0.000000,0.000000,6);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index c8f30b1..3adb07d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5600,6 +5600,47 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
        {
            switch(dummySpell->Id)
            {
+                // Improved Leader of the Pack
+                case 24932:
+                {
+                    if(cooldown && ((Player*)this)->HasSpellCooldown(dummySpell->Id))
+                        return false;
+
+                    Unit *caster = triggeredByAura->GetCaster();
+                    if(!caster)
+                        return false;
+
+                    int32 amount = 0;
+
+                    if(Player* modOwner = caster->GetSpellModOwner())
+                        modOwner->ApplySpellMod(dummySpell->Id, SPELLMOD_EFFECT2, amount);
+
+                    amount = GetMaxHealth() * amount / 100;
+
+                    if(amount)
+                        CastCustomSpell(this, 34299, &amount, NULL, NULL, true, NULL, triggeredByAura);
+
+                    if(caster == this)
+                    {
+                        AuraList const& packAuras = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
+                        for(AuraList::const_iterator itr = packAuras.begin(); itr != packAuras.end(); ++itr)
+                        {
+                            SpellEntry const *spellProto = (*itr)->GetSpellProto();
+                            if (spellProto->Id == 34297 || spellProto->Id == 34300)
+                            {
+                                int32 manaAmount = GetMaxPower(POWER_MANA) * spellProto->EffectBasePoints[1] / 100;
+
+                                if(manaAmount)
+                                    CastCustomSpell(this, 68285, &manaAmount, NULL, NULL, true, NULL, triggeredByAura);
+
+                                break;
+                            }
+                        }
+                    }
+                    if(cooldown)
+                        ((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
+                    return true;
+                }
                // Healing Touch (Dreamwalker Raiment set)
                case 28719:
                {
@@ -6919,16 +6960,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
            }
            case SPELLFAMILY_DRUID:
            {
-                // Leader of the Pack
-                if (auraSpellInfo->Id == 24932)
-                {
-                    if (triggerAmount == 0)
-                        return false;
-                    basepoints[0] = triggerAmount * GetMaxHealth() / 100;
-                    trigger_spell_id = 34299;
-                }
                // Druid Forms Trinket
-                else if (auraSpellInfo->Id==37336)
+                if (auraSpellInfo->Id==37336)
                {
                    switch(m_form)
                    {
-- 
1.5.5.6

×
×
  • 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