Jump to content

[9926] Typos in Unit::DealDamageMods


Recommended Posts

Posted

For rev. 9851

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 98a55c2..ba72091 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -495,7 +495,7 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
    if (!pVictim->isAlive() || pVictim->isInFlight() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
    {
        if(absorb)
-            absorb += damage;
+            *absorb += damage;
        damage = 0;
        return;
    }
@@ -508,7 +508,7 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
        if(area && area->flags & AREA_FLAG_SANCTUARY)       //sanctuary
        {
            if(absorb)
-                absorb += damage;
+                *absorb += damage;
            damage = 0;
        }
    }
@@ -523,7 +523,7 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
        ((Creature *)pVictim)->AI()->DamageTaken(this, damage);

    if(absorb && originalDamage > damage)
-        absorb += (originalDamage - damage);
+        *absorb += (originalDamage - damage);
}

uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss)

http://paste2.org/p/818174

  • 2 weeks later...
×
×
  • 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