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())
|
if (!pVictim->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ((attType == BASE_ATTACK || attType == OFF_ATTACK) && !this->IsWithinLOSInMap(pVictim))
|
||||||
|
return;
|
||||||
|
|
||||||
CombatStart(pVictim);
|
CombatStart(pVictim);
|
||||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
|
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MELEE_ATTACK);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user