OnBeforeUpdateAttackPowerAndDamage -> OnAfterUpdateAttackPowerAndDamage

This commit is contained in:
Matteo Emili
2017-01-23 17:55:15 +01:00
committed by Yehonal
parent 15b1a99b55
commit 5eb789d4dc
3 changed files with 5 additions and 5 deletions

View File

@@ -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