feat(Core/Scripting): Add hook for applying weapon damage (#20350)

Add hook for applying weapon damage
This commit is contained in:
silviu20092
2024-11-14 10:35:26 +02:00
committed by GitHub
parent 7746287ee1
commit 87fbdb7967
4 changed files with 11 additions and 0 deletions

View File

@@ -6936,6 +6936,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
if (apply)
{
sScriptMgr->OnApplyWeaponDamage(this, slot, proto, minDamage, maxDamage, i);
if (minDamage > 0.f)
{
SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, minDamage, i);