mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
fix(Core/Unit): Add melee leeway for auto attacks (#22566)
This commit is contained in:
@@ -7109,7 +7109,7 @@ SpellCastResult Spell::CheckRange(bool strict)
|
||||
if (range_type == SPELL_RANGE_MELEE)
|
||||
{
|
||||
float real_max_range = max_range;
|
||||
if (!m_caster->IsCreature() && m_caster->isMoving() && target->isMoving() && !m_caster->IsWalking() && !target->IsWalking())
|
||||
if (!m_caster->IsCreature() && m_caster->HasLeewayMovement() && target->HasLeewayMovement())
|
||||
real_max_range -= MIN_MELEE_REACH; // Because of lag, we can not check too strictly here (is only used if both caster and target are moving)
|
||||
else
|
||||
real_max_range -= 2 * MIN_MELEE_REACH;
|
||||
|
||||
Reference in New Issue
Block a user