mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-26 13:35:54 +00:00
fix(Core/Player): allow attacking target within boundary radius when… (#22500)
Co-authored-by: Kito <kito@vortexirc.com>
This commit is contained in:
@@ -181,8 +181,8 @@ void Player::Update(uint32 p_time)
|
||||
m_swingErrorMsg = 1;
|
||||
}
|
||||
}
|
||||
// 120 degrees of radiant range
|
||||
else if (!HasInArc(2 * M_PI / 3, victim))
|
||||
// 120 degrees of radiant range, if player is not in boundary radius
|
||||
else if (!IsWithinBoundaryRadius(victim) && !HasInArc(2 * float(M_PI) / 3, victim))
|
||||
{
|
||||
setAttackTimer(BASE_ATTACK, 100);
|
||||
if (m_swingErrorMsg != 2) // send single time (client auto repeat)
|
||||
@@ -211,8 +211,8 @@ void Player::Update(uint32 p_time)
|
||||
{
|
||||
if (!IsWithinMeleeRange(victim))
|
||||
setAttackTimer(OFF_ATTACK, 100);
|
||||
else if (!HasInArc(2 * M_PI / 3, victim))
|
||||
setAttackTimer(OFF_ATTACK, 100);
|
||||
else if (!IsWithinBoundaryRadius(victim) && !HasInArc(2 * float(M_PI) / 3, victim))
|
||||
setAttackTimer(BASE_ATTACK, 100);
|
||||
else
|
||||
{
|
||||
// prevent base and off attack in same time, delay attack at
|
||||
|
||||
Reference in New Issue
Block a user