Jump to content

[patch]Improved Leader of the Pack


Auntie Mangos

Recommended Posts

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

- fixes healing and self-energize parts of the spell

For which repository revision was the patch created?

- 8746

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

http://getmangos.eu/community/viewtopic.php?id=10653

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

me (I know that there was some kind of patch for this spell on mangos ru forums, but because it's down for a long time I can't check)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index f31c738..b70a15d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5509,6 +5509,42 @@ 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:
                {

-- (24932) Leader of the Pack ()
DELETE FROM `spell_proc_event` WHERE `entry` IN (24932);
INSERT INTO `spell_proc_event` VALUES
(24932, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00054044, 0x00000002, 0.000000, 0.000000, 6);

Link to comment
Share on other sites

  • 39 years later...

I think it should be removed (it's addition for the patch)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index a7d6a56..e145769 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6758,14 +6758,6 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
                }
                //else if (auraSpellInfo->Id==40363)// Entangling Roots ()
                //    trigger_spell_id = ????;
-                // Leader of the Pack
-                else if (auraSpellInfo->Id == 24932)
-                {
-                    if (triggerAmount == 0)
-                        return false;
-                    basepoints[0] = triggerAmount * GetMaxHealth() / 100;
-                    trigger_spell_id = 34299;
-                }
                break;
            }
            case SPELLFAMILY_HUNTER:

you also forgot to add a 6 seconds cooldown for spell...

I've try to add it in database

INSERT INTO `spell_proc_event` VALUES
(24932, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00054044, 0x00000002, 0.000000, 0.000000, 6);

but it doesn't works (still ignoring a cooldown), doesn't know why :/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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