Jump to content

[10706][patch]Mana Feed[30326]


Guest virusav

Recommended Posts

Description: "When you gain mana from Drain Mana or Life Tap spells, your summoned demon gains 100% of the mana you gain.".

Life Tap works, and Drain Mana - no.

Patch (2 versions):

1.

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 3975e1e..42ba154 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6879,6 +6879,10 @@ void Aura::PeriodicTick()
            if(gain_amount)
            {
                int32 gain = pCaster->ModifyPower(power, gain_amount);
+                if (pCaster->GetTypeId() == TYPEID_PLAYER && spellProto->Id == 5138 && pCaster->HasSpell(30326))
+                    if (Unit* pPet = pCaster->GetPet())
+                        int32 temp = pPet->ModifyPower(power, gain_amount);
+                
                target->AddThreat(pCaster, float(gain) * 0.5f, pInfo.critical, GetSpellSchoolMask(spellProto), spellProto);
            }
            break; 

2.

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 320fef2..f6fa41c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6881,6 +6881,9 @@ void Aura::PeriodicTick()
            if(gain_amount)
            {
                int32 gain = pCaster->ModifyPower(power, gain_amount);
+                if (pCaster->GetTypeId() == TYPEID_PLAYER && spellProto->Id == 5138 && pCaster->HasSpell(30326))
+                    pCaster->CastCustomSpell(pCaster, 32554, &gain_amount, NULL, NULL, true, NULL);
+
                target->AddThreat(pCaster, float(gain) * 0.5f, pInfo.critical, GetSpellSchoolMask(spellProto), spellProto);
            }
            break; 

Link to comment
Share on other sites

Second better but still hack partly.

Spell 30326 is spell mod 12 (SPELLMOD_EFFECT2) affecting by classmask of 5138 (Drain Mana) effect1 (dummy aura) applied to same target. So it set basepoints of dummy aura to 100 (100% mana send to pet)

Spell 32554 expected to casted have target mode 5 (PET) so expected targeting at cast pet master (dummy aura caster). In this part you right.

With this change in [10706]. Thank you.

Instead direct test diff auras at caster need get same holder auras effect_1 and get from it percent and cast spell with this precent amount * gain.

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