mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
Core/NPC: Creatures now alert when they detect stealthed players (#1060)
Creatures stop when they detect a stealthed player like in retail. Closes #1020
This commit is contained in:
@@ -674,7 +674,14 @@ void SmartAI::MoveInLineOfSight(Unit* who)
|
||||
return;
|
||||
|
||||
if (me->CanStartAttack(who))
|
||||
{
|
||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||
{
|
||||
me->ClearUnitState(UNIT_STATE_DISTRACTED);
|
||||
me->GetMotionMaster()->Clear();
|
||||
}
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
bool SmartAI::CanAIAttack(const Unit* /*who*/) const
|
||||
|
||||
Reference in New Issue
Block a user