All pastes #965071 Raw Edit

Meins

public diff v1 · immutable
#965071 ·published 2008-03-31 19:25 UTC
rendered paste body
Index: src/game/Unit.cpp===================================================================--- src/game/Unit.cpp	(revision 5515)+++ src/game/Unit.cpp	(working copy)@@ -1895,6 +1895,8 @@     int32 RemainingDamage = damage - *resist;      // absorb without mana cost+    int32 reflectDamage = 0;+    Aura* reflectAura = NULL;     AuraList const& vSchoolAbsorb = pVictim->GetAurasByType(SPELL_AURA_SCHOOL_ABSORB);     for(AuraList::const_iterator i = vSchoolAbsorb.begin(), next; i != vSchoolAbsorb.end() && RemainingDamage > 0; i = next)     {@@ -1924,14 +1926,14 @@         int32 currentAbsorb;          //Reflective Shield-        if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST && (*i)->GetSpellProto()->SpellFamilyFlags == 0x1)+        if ((pVictim != this) && (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST && (*i)->GetSpellProto()->SpellFamilyFlags == 0x1)         {             if(Unit* caster = (*i)->GetCaster())             {                 AuraList const& vOverRideCS = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);                 for(AuraList::const_iterator k = vOverRideCS.begin(); k != vOverRideCS.end(); ++k)                 {-                    int32 reflect_damage = 0;+                                         switch((*k)->GetModifier()->m_miscvalue)                     {                         case 5065:                          // Rank 1@@ -1941,16 +1943,16 @@                         case 5061:                          // Rank 5                         {                             if(RemainingDamage >= (*i)->GetModifier()->m_amount)-                                reflect_damage = (*i)->GetModifier()->m_amount * (*k)->GetModifier()->m_amount/100;+                                reflectDamage = (*i)->GetModifier()->m_amount * (*k)->GetModifier()->m_amount/100;                             else-                                reflect_damage = (*k)->GetModifier()->m_amount * RemainingDamage/100;-                            pVictim->CastCustomSpell(this, 33619, &reflect_damage, NULL, NULL, true, NULL, *i);+                                reflectDamage = (*k)->GetModifier()->m_amount * RemainingDamage/100;+                            reflectAura = *i;                          } break;                         default: break;                     } -                    if(reflect_damage)+                    if(reflectDamage)                         break;                 }             }@@ -1970,6 +1972,8 @@          RemainingDamage -= currentAbsorb;     }+    if (reflectDamage)+        pVictim->CastCustomSpell(this, 33619, &reflectDamage, NULL, NULL, true, NULL, reflectAura);      // absorb by mana cost     AuraList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD);