aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2012-05-13 21:07:59 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2012-05-13 21:07:59 +0200
commitede623b473199426e736fc12829c283a9f181587 (patch)
tree4c4b972b4b1a2225ff11c0bcb3856d1676a97e62
parentfa7e9d3c0d492cbf5e4563d8292674145dfef5a0 (diff)
Core/Spell:
* Fix SPELL_DAMAGE_CLASS_NONE calculation for SpellHealingBonusTaken * Fix some codestyles
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f79adb2b232..5b0a3820b0e 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10814,11 +10814,11 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
int32 TakenTotal = 0;
float TakenTotalMod = 1.0f;
- //from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
- //multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085)
+ // from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
+ // multiplicative bonus, for example Dispersion + Shadowform (0.10*0.85=0.085)
TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, spellProto->GetSchoolMask());
- //.. taken pct: dummy auras
+ //.. taken pct: dummy auras
AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
{
@@ -11411,7 +11411,10 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
{
// No bonus healing for SPELL_DAMAGE_CLASS_NONE class spells by default
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
+ {
+ healamount = int32(healamount * TakenTotalMod);
return healamount < 0 ? 0 : healamount;
+ }
}
// Default calculation
@@ -11820,7 +11823,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 pdamage, WeaponAttackType
return uint32(std::max(tmpDamage, 0.0f));
}
-uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const *spellProto)
+uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const* spellProto)
{
if (pdamage == 0)
return 0;