Jump to content

[patch]Glyph of Shadow Word: Pain


Recommended Posts

Posted

Description of the bug?

this glyph wasn't working at all before

For which repository revision was the patch created?

8111

Is there a thread in the bug report section or at lighthouse?

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

Who has been writing this patch?

me

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index a2e6dbb..c01fd54 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7891,6 +7892,15 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
      DoneTotalMod *= 3.0f;
  }

+  // Glyph of Shadow Word: Pain
+  if (spellProto->Id == 58381 && this->HasAura(55687))
+  {
+    Aura *aur = this->GetAura(55687, 0);
+    //search for shadow word: pain on target
+    if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x0000000000008000)))
+      DoneTotalMod += aur->GetModifier()->m_amount * DoneTotalMod / 100;
+  }
+
  // ..taken
  AuraList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
  for(AuraList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i)

  • 40 years later...
  • 4 months later...
Posted

This is much more complicated then it could be.

Much smarter solution is to add the code below to EffectEnergize in SpellEffects.cpp

case 71132:                                         //Glyph of Shadow Word : Pain
    damage = m_caster->GetCreateMana() / 100;
    break;

Posted

Well, I don't think so... With the newest revision of Mangos, I still don't recieve any mana for this glyph's ticks without the patch I've posted. The trigger appears in the combat log, but you gain no mana.

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