mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +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
|
||||
|
||||
@@ -17880,7 +17880,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
||||
if (Unit* owner = killer->GetOwner())
|
||||
{
|
||||
Unit::ProcDamageAndSpell(owner, victim, PROC_FLAG_KILL, PROC_FLAG_NONE, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);
|
||||
sScriptMgr->OnCreatureKilledByPet( killer->GetCharmerOrOwnerPlayerOrPlayerItself(), victim->ToCreature());
|
||||
sScriptMgr->OnPlayerCreatureKilledByPet( killer->GetCharmerOrOwnerPlayerOrPlayerItself(), victim->ToCreature());
|
||||
}
|
||||
|
||||
if (killer != victim)
|
||||
@@ -18080,9 +18080,9 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
||||
if (Player* killerPlr = killer->ToPlayer())
|
||||
{
|
||||
if (Player* killedPlr = victim->ToPlayer())
|
||||
sScriptMgr->OnPVPKill(killerPlr, killedPlr);
|
||||
sScriptMgr->OnPlayerPVPKill(killerPlr, killedPlr);
|
||||
else if (Creature* killedCre = victim->ToCreature())
|
||||
sScriptMgr->OnCreatureKill(killerPlr, killedCre);
|
||||
sScriptMgr->OnPlayerCreatureKill(killerPlr, killedCre);
|
||||
}
|
||||
else if (Creature* killerCre = killer->ToCreature())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user