summaryrefslogtreecommitdiff
path: root/src/game/Entities/Unit/StatSystem.cpp
diff options
context:
space:
mode:
authorMatteo Emili <matteo.emili14@gmail.com>2017-01-23 17:55:15 +0100
committerYehonal <yehonal.azeroth@gmail.com>2017-03-26 01:09:35 +0100
commit5eb789d4dc9397fb34fd50ca0f0f8d581ccf2283 (patch)
tree8ec815f1b3d2119f1382c1479d676eec3a2472db /src/game/Entities/Unit/StatSystem.cpp
parent15b1a99b55bf01cd6975cc4da3994778d36edb35 (diff)
OnBeforeUpdateAttackPowerAndDamage -> OnAfterUpdateAttackPowerAndDamage
Diffstat (limited to 'src/game/Entities/Unit/StatSystem.cpp')
-rw-r--r--src/game/Entities/Unit/StatSystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Entities/Unit/StatSystem.cpp b/src/game/Entities/Unit/StatSystem.cpp
index d1fb06a87a..e43cab614a 100644
--- a/src/game/Entities/Unit/StatSystem.cpp
+++ b/src/game/Entities/Unit/StatSystem.cpp
@@ -312,7 +312,6 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
{
float val2 = 0.0f;
float level = float(getLevel());
- sScriptMgr->OnBeforeUpdateAttackPowerAndDamage(this, level, ranged);
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;
@@ -496,6 +495,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
+ sScriptMgr->OnAfterUpdateAttackPowerAndDamage(this, level, base_attPower, attPowerMod, attPowerMultiplier, ranged);
SetInt32Value(index, (uint32)base_attPower); //UNIT_FIELD_(RANGED)_ATTACK_POWER field
SetInt32Value(index_mod, (uint32)attPowerMod); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field
SetFloatValue(index_mult, attPowerMultiplier); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field