Jump to content

Recommended Posts

Posted

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

Fixes infinity loop that cause a crash with proc Reflective Shield damage return vs Molten Armor or Retribution aura (or some other with same mechanic spells). Also cleanup code

For which repository revision was the patch created?

8063

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

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

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

SeT

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 74905c8..729ddd8 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1637,6 +1637,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
    // Reflect damage spells (not cast any damage spell in aura lookup)
    uint32 reflectSpell = 0;
    int32  reflectDamage = 0;
+    Aura* triggeredby = NULL;  
    // Death Prevention Aura
    SpellEntry const*  preventDeathSpell = NULL;
    int32  preventDeathAmount = 0;
@@ -1700,6 +1701,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
                    else
                        reflectDamage = currentAbsorb / 2;
                    reflectSpell = 33619;
+                    triggeredby = *i;
                    break;
                }
                if (spellProto->Id == 39228 || // Argussian Compass
@@ -1764,13 +1766,13 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
                        {
                            case 5065:                          // Rank 1
                            case 5064:                          // Rank 2
-                            case 5063:                          // Rank 3
                            {
                                if(RemainingDamage >= currentAbsorb)
                                    reflectDamage = (*k)->GetModifier()->m_amount * currentAbsorb/100;
                                else
                                    reflectDamage = (*k)->GetModifier()->m_amount * RemainingDamage/100;
                                reflectSpell = 33619;
+                                triggeredby = *i;
                            } break;
                            default: break;
                        }
@@ -1871,7 +1873,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe

    // Cast back reflect damage spell
    if (reflectSpell)
-        pVictim->CastCustomSpell(this,  reflectSpell, &reflectDamage, NULL, NULL, true);
+        pVictim->CastCustomSpell(this,  reflectSpell, &reflectDamage, NULL, NULL, true, NULL, triggeredby);

    // absorb by mana cost
    AuraList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD);

Cherry picked from http://github.com/narma/mangos/commit/e52f1f4e530a435edb156de5083e39b2ef23bbb5 :)

  • 39 years later...
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