diff options
| author | Chaplain <aionthefirst@gmail.com> | 2011-08-20 13:38:20 +0300 |
|---|---|---|
| committer | Chaplain <aionthefirst@gmail.com> | 2011-08-20 13:38:20 +0300 |
| commit | 4b562266190778dae779b5e6f3486648dfef5552 (patch) | |
| tree | 032fe5b2ce916977d8c44f076852af7fcadd67bc | |
| parent | 511db662978dbd267f964e987a08737e57750e5d (diff) | |
Core/Spell: case TOTAL_PCT\BASE_PCT should be processed by multiplicative function not additive.
Also get ride of hack in Player::HandleBaseModValue now it's unnecessary.
Fixes: #855, multiplicative % count for normal school for aura 79 and may be others.
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 4 | ||||
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index dcfcf826ddb..ec493c4b23f 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5677,8 +5677,6 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa m_auraBaseMod[modGroup][modType] += apply ? amount : -amount; break; case PCT_MOD: - if (amount <= -100.0f) - amount = -200.0f; ApplyPercentModFloatVar(m_auraBaseMod[modGroup][modType], amount, apply); break; } @@ -8094,7 +8092,7 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType att if (unitModType == TOTAL_VALUE) ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply); else - ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, aura->GetAmount() / 100.0f, apply); + ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, aura->GetAmount(), apply); } } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 55e11d26411..21f5d9f6d51 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13348,7 +13348,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f break; case BASE_PCT: case TOTAL_PCT: - m_auraModifiersGroup[unitMod][modifierType] += (apply ? amount : -amount) / 100.0f; + ApplyPercentModFloatVar(m_auraModifiersGroup[unitMod][modifierType], amount, apply); break; default: break; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index fae4d83e312..a5b6fa64795 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -4518,7 +4518,7 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8 target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float (GetAmount()), apply); if (target->GetTypeId() == TYPEID_PLAYER) - target->ToPlayer()->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, GetAmount() / 100.0f, apply); + target->ToPlayer()->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, GetAmount(), apply); } else { |
