mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +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:
@@ -128,8 +128,17 @@ inline void CreatureUnitRelocationWorker(Creature* c, Unit* u)
|
||||
return;
|
||||
|
||||
if (c->HasReactState(REACT_AGGRESSIVE) && !c->HasUnitState(UNIT_STATE_SIGHTLESS))
|
||||
{
|
||||
if (c->IsAIEnabled && c->CanSeeOrDetect(u, false, true))
|
||||
{
|
||||
c->AI()->MoveInLineOfSight_Safe(u);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (u->GetTypeId() == TYPEID_PLAYER && u->HasStealthAura() && c->IsAIEnabled && c->CanSeeOrDetect(u, false, true, true))
|
||||
c->AI()->TriggerAlert(u);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerRelocationNotifier::Visit(PlayerMapType &m)
|
||||
|
||||
Reference in New Issue
Block a user