diff options
| author | XTZGZoReX <none@none> | 2010-01-13 18:24:23 +0100 |
|---|---|---|
| committer | XTZGZoReX <none@none> | 2010-01-13 18:24:23 +0100 |
| commit | f5998611c33670b9f77b4ca5382203c48f4ca63e (patch) | |
| tree | 205edb66103fab54740ff9bfa57e2c60f68e4b10 /src/game/Unit.cpp | |
| parent | f7ad3aefc8e63e87c29d5e9c169210f4e7e80ac8 (diff) | |
Backed out changeset: 52e769d95f14
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 95360052238..b09e414e4ff 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10018,7 +10018,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask) DoneAdvertisedBenefit += int32(GetTotalAttackPowerValue(BASE_ATTACK) * (*i)->GetAmount() / 100.0f); } - return DoneAdvertisedBenefit; + return DoneAdvertisedBenefit > 0 ? DoneAdvertisedBenefit : 0; } int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim) @@ -10038,7 +10038,7 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic if (((*i)->GetMiscValue() & schoolMask) != 0) TakenAdvertisedBenefit += (*i)->GetAmount(); - return TakenAdvertisedBenefit; + return TakenAdvertisedBenefit > 0 ? TakenAdvertisedBenefit : 0; } bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const |
