mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
fix(Core/AI): Fixed mobs attacking in defensive state. (#14947)
This commit is contained in:
@@ -141,7 +141,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* who)
|
|||||||
if (HasEscortState(STATE_ESCORT_ESCORTING) && AssistPlayerInCombatAgainst(who))
|
if (HasEscortState(STATE_ESCORT_ESCORTING) && AssistPlayerInCombatAgainst(who))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (me->CanStartAttack(who))
|
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
|
||||||
{
|
{
|
||||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void FollowerAI::MoveInLineOfSight(Unit* who)
|
|||||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombatAgainst(who))
|
if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombatAgainst(who))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (me->CanStartAttack(who))
|
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
|
||||||
{
|
{
|
||||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
|
|||||||
if (me->HasReactState(REACT_PASSIVE) || AssistPlayerInCombatAgainst(who))
|
if (me->HasReactState(REACT_PASSIVE) || AssistPlayerInCombatAgainst(who))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (me->CanStartAttack(who))
|
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
|
||||||
{
|
{
|
||||||
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
if (me->HasUnitState(UNIT_STATE_DISTRACTED))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user