Jump to content

[FIX] Twisted Faith


Guest Most_Mangos

Recommended Posts

Twisted Faith http://www.wowhead.com/spell=51167

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

your damage done by your Mind Flay is increased by 10% if your target is afflicted by your Shadow Word: Pain.

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

Me

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index fcbfd05..af7433b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9567,8 +9567,16 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u
                    if (Aura *aur = GetAura(55692, EFFECT_INDEX_0))
                        DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;
            }
-            break;
-        }
+            if (spellProto->SpellFamilyFlags & UI64LIT(0x800000))
+            {
+                    // Twisted Faith - Mind Flay part
+                if (Aura * aur = GetAura(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS, SPELLFAMILY_PRIEST, 2848, 1))
+                    // Increase Mind Flay damage if Shadow Word: Pain present on target
+                    if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x8000), 0, GetGUID()))
+                        DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;;
+            }
+        break;
+               }
        case SPELLFAMILY_DRUID:
        {
            // Improved Insect Swarm (Wrath part)

Link to comment
Share on other sites

Try this:

            if (spellProto->SpellFamilyFlags & UI64LIT(0x800000))
           {
               // Mind Flay buffs - each depends on Shadow Word: Pain present on the target
               if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x8000), 0, GetGUID()))
               {
                   // Twisted Faith
                   if (Aura * aur = GetAura(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS, SPELLFAMILY_PRIEST, 2848, 1))
                       DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;
                   // Glyph of Mind Flay
                   if (Aura *aur = GetAura(55687, EFFECT_INDEX_0))
                       DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;
               }
           }

Link to comment
Share on other sites

Glyph work 100%

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index ae03a34..7091566 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9169,6 +9169,14 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u
                    if (Aura *aur = GetAura(55692, EFFECT_INDEX_0))
                        DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;
            }
+            // Glyph of Mind Flay
+            if (spellProto->SpellFamilyFlags & UI64LIT(0x800000))
+            {
+                // Mind Flay
+               if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x8000), 0, GetGUID()))
+                      if (Aura *aur = GetAura(55687, EFFECT_INDEX_0))
+                         DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;
+            }
            break;
        }
        case SPELLFAMILY_DRUID:

but

       
 // Twisted Faith
                   if (Aura *aur = GetAura(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS, SPELLFAMILY_PRIEST, 2848, 1))
                       DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f;

dont work. I can not find an error

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