Jump to content

[Mangos-0.12] Fix TakenTotal calculating !


Guest mns

Recommended Posts

TakenTotal < 0 in some cases

For Example :

http://www.wowhead.com/search?q=dampen+magic

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e647863..13ae7b2 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7202,8 +7202,8 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
    // Taken/Done total percent damage auras
    float DoneTotalMod = 1.0f;
    float TakenTotalMod = 1.0f;
-    uint32 DoneTotal = 0;
-    uint32 TakenTotal = 0;
+    int32 DoneTotal = 0;
+    int32 TakenTotal = 0;

    // ..done
    // Pet damage
@@ -7870,8 +7870,8 @@ uint32 Unit::SpellHealingBonus(SpellEntry const *spellProto, uint32 healamount,

    // Taken/Done total percent damage auras
    float  DoneTotalMod = 1.0f;
-    uint32 DoneTotal = 0;
-    uint32 TakenTotal = 0;
+    int32 DoneTotal = 0;
+    int32 TakenTotal = 0;

    // Healing done percent
    AuraList const& mHealingDonePct = GetAurasByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT);

Link to comment
Share on other sites

  • 1 month 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