Jump to content

[patch][8892] Innervate and Glyph of Innervate


Guest bobaz

Recommended Posts

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

Patch will correct amount of mana energized by Innervate and implement effect of Glyph of Innervate

For which repository revision was the patch created?

8587+

Patch was written for 3.1.3 client, but all variables are dbc related, so it should work on 3.2.2a revisions.

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

Me - Dr Bobaz

Patch:

file:src/game/SpellAuras.cpp

@@ -4399,16 +4399,30 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real)
{
    if (!Real)
        return;

    m_isPeriodic = apply;
-
-    // Replenishment (0.25% from max)
-    // Infinite Replenishment
-    if (GetId() == 57669 ||
-        GetId() == 61782)
-        m_modifier.m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000;
+	switch (m_spellProto->Id)
+	{
+		case 57669: // Replenishment (0.25% from max)
+		case 61782: // Infinite Replenishment
+			{
+				m_modifier.m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000;
+				return;
+			}
+		case 29166: //Innervate (value% of base mana)
+		case 54833: //Glyph of Innervate (+value% of casters base mana for caster)
+			{
+				Unit* caster = GetCaster();
+				m_modifier.m_amount = (caster->GetCreateMana()  * (GetSpellProto()->EffectBasePoints[0]+1) / 100) / (m_maxduration/1000);
+				if (m_spellProto->Id == 29166 && caster->HasAura(54832) && m_target->HasAura(29166))
+					caster->CastSpell(caster,54833,true,0,0,caster->GetGUID());
+				return;
+			}
+		default:
+			break;
+	}
}

void Aura::HandleAuraPowerBurn(bool apply, bool /*Real*/)
{
    m_isPeriodic = apply;

Link to comment
Share on other sites

BUMP

nice patch

In its patch, I used the correct adjustment of your thank you:);)

          Unit* caster = GetCaster();
+               m_modifier.m_amount = (caster->GetCreateMana()  * (GetSpellProto()->EffectBasePoints[0]+1) / 100) / (m_maxduration/1000);
+               if (m_spellProto->Id == 29166 && caster->HasAura(54832) && m_target->HasAura(29166))
+                   caster->CastSpell(caster,54833,true,0,0,caster->GetGUID());
+               return;
+           }
+       default:
+           break;
+   }
}

void Aura::HandleAuraPowerBurn(bool apply, bool /*Real*/)
{
    m_isPeriodic = apply;

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • 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