mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
fix(Core/PlayerScript) Align player script function names (#21020)
Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
@@ -302,7 +302,7 @@ void Player::UpdateMaxHealth()
|
||||
value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina();
|
||||
value *= GetModifierValue(unitMod, TOTAL_PCT);
|
||||
|
||||
sScriptMgr->OnAfterUpdateMaxHealth(this, value);
|
||||
sScriptMgr->OnPlayerAfterUpdateMaxHealth(this, value);
|
||||
SetMaxHealth((uint32)value);
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ void Player::UpdateMaxPower(Powers power)
|
||||
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
|
||||
value *= GetModifierValue(unitMod, TOTAL_PCT);
|
||||
|
||||
sScriptMgr->OnAfterUpdateMaxPower(this, power, value);
|
||||
sScriptMgr->OnPlayerAfterUpdateMaxPower(this, power, value);
|
||||
SetMaxPower(power, uint32(value));
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
||||
float val2 = 0.0f;
|
||||
float level = float(GetLevel());
|
||||
|
||||
sScriptMgr->OnBeforeUpdateAttackPowerAndDamage(this, level, val2, ranged);
|
||||
sScriptMgr->OnPlayerBeforeUpdateAttackPowerAndDamage(this, level, val2, ranged);
|
||||
|
||||
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;
|
||||
|
||||
@@ -499,7 +499,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
||||
|
||||
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
|
||||
|
||||
sScriptMgr->OnAfterUpdateAttackPowerAndDamage(this, level, base_attPower, attPowerMod, attPowerMultiplier, ranged);
|
||||
sScriptMgr->OnPlayerAfterUpdateAttackPowerAndDamage(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
|
||||
|
||||
Reference in New Issue
Block a user