Add LoS check for melee autoattacks, fixes issue 3535

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-09-01 01:16:43 +03:00
parent 3a765da2fa
commit 4e067dd313

View File

@@ -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);