mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-16 23:19:14 +01:00
Merge pull request #14974 from pete318/stealth_work
Stealth changes (Player stealthed vs NPCs) - 3.3.5
(cherry picked from commit 90fcfb3f2d)
Conflicts:
src/server/game/Entities/Object/Object.h
src/server/game/Entities/Unit/Unit.cpp
This commit is contained in:
@@ -120,7 +120,13 @@ void npc_escortAI::MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->GetVictim())
|
||||
{
|
||||
who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
// Clear distracted state on combat
|
||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||
{
|
||||
me->ClearUnitState(UNIT_STATE_DISTRACTED);
|
||||
me->GetMotionMaster()->Clear();
|
||||
}
|
||||
|
||||
AttackStart(who);
|
||||
}
|
||||
else if (me->GetMap()->IsDungeon())
|
||||
|
||||
@@ -117,7 +117,13 @@ void FollowerAI::MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!me->GetVictim())
|
||||
{
|
||||
who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
// Clear distracted state on combat
|
||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||
{
|
||||
me->ClearUnitState(UNIT_STATE_DISTRACTED);
|
||||
me->GetMotionMaster()->Clear();
|
||||
}
|
||||
|
||||
AttackStart(who);
|
||||
}
|
||||
else if (me->GetMap()->IsDungeon())
|
||||
|
||||
Reference in New Issue
Block a user