mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Add LoS check for melee autoattacks, fixes issue 3535
--HG-- branch : trunk
This commit is contained in:
@@ -2293,6 +2293,9 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex
|
||||
if (!pVictim->isAlive())
|
||||
return;
|
||||
|
||||
if ((attType == BASE_ATTACK || attType == OFF_ATTACK) && !this->IsWithinLOSInMap(pVictim))
|
||||
return;
|
||||
|
||||
CombatStart(pVictim);
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user