fix(Core/Combat): Prevent burst melee attacks from attack timer debt (#24858)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-08 12:30:48 -05:00
committed by GitHub
parent a8084f0ea3
commit 7fe5800745
2 changed files with 227 additions and 2 deletions

View File

@@ -751,8 +751,7 @@ void Unit::DisableSpline()
void Unit::resetAttackTimer(WeaponAttackType type)
{
int32 time = int32(GetAttackTime(type) * m_modAttackSpeedPct[type]);
m_attackTimer[type] = std::min(m_attackTimer[type] + time, time);
m_attackTimer[type] = int32(GetAttackTime(type) * m_modAttackSpeedPct[type]);
}
bool Unit::IsWithinCombatRange(Unit const* obj, float dist2compare) const