Jump to content

[patch][8892] Innervate and Glyph of Innervate


Recommended Posts

Posted

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;

Posted

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;

  • 3 weeks later...
Posted

working diff for: master @ b9d2db3a3737ec795b34fb755851c0c65afd5999

[Download]

For some reason the Glyph-Spell has retained its BasePoints through the Duration/Cooldown-halving by 'BigB'

I guessed it's a bug, sooo, additional halving for this spell^^

Posted

In [8894] checks added. But it's all in apply part and apply called in cases when for normal player caster (base at early code checks) near to impossible not find caster. But agree that in some special cases this can maybe happens and then better avoid crash in like cases.

Posted

In [8894] checks added. But it's all in apply part and apply called in cases when for normal player caster (base at early code checks) near to impossible not find caster. But agree that in some special cases this can maybe happens and then better avoid crash in like cases.

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