Jump to content

[patch]negative spell base damage bonus


Guest AuntieMangos

Recommended Posts

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

fixes Necrosis mln dmg and other similar spells

For which repository revision was the patch created?

9045

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=11492

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 c336ea0..03976a5 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9057,7 +9057,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask)
    }

  }
-  return DoneAdvertisedBenefit;
+  return DoneAdvertisedBenefit > 0 ? DoneAdvertisedBenefit : 0;
}

int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim)
@@ -9081,7 +9081,7 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
      TakenAdvertisedBenefit += (*i)->GetModifier()->m_amount;
  }

-  return TakenAdvertisedBenefit;
+  return TakenAdvertisedBenefit > 0 ? TakenAdvertisedBenefit : 0;
}

bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType)

the bug is happening when there are only SPELL_AURA_MOD_DAMAGE_DONE auras with negative m_amount on player , resulting in having negative DoneAdvertisedBenefit which later causes wrong calculations

Link to comment
Share on other sites

  • 39 years later...
  • 4 months later...
i was reverted this in my core, but the bug is appears again :/ i think it's not fixed

For example one of DK from my server was killed paladin with http://www.wowhead.com/spell=45477 for 2870781277 damage :D

patch is wrong anyway, I'm trying to track down from where the issue comes but idk if people test it on clean or their own modified sources.. currently i can't reproduce mln dmg on any spells that were reported =\\

Link to comment
Share on other sites

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