aboutsummaryrefslogtreecommitdiff
path: root/src/game/StatSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r--src/game/StatSystem.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index bb7b1273ac0..36d88e065a6 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -881,10 +881,9 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType)
float weapon_mindamage = GetWeaponDamageRange(attType, MINDAMAGE);
float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE);
- //float base_value = GetModifierValue(unitMod, BASE_VALUE)
- // + (weapon_mindamage + weapon_maxdamage)
- // * GetTotalAttackPowerValue(attType) / (getLevel() * 30);
- float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType);
+ /* difference in AP between current attack power and base value from DB */
+ float att_pwr_change = GetTotalAttackPowerValue(attType) - GetCreatureInfo()->attackpower;
+ float base_value = GetModifierValue(unitMod, BASE_VALUE) + (att_pwr_change * GetAPMultiplier(attType, false) / 14.0f);
float base_pct = GetModifierValue(unitMod, BASE_PCT);
float total_value = GetModifierValue(unitMod, TOTAL_VALUE);
float total_pct = GetModifierValue(unitMod, TOTAL_PCT);