diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-02-11 18:33:00 +0100 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2016-02-11 18:36:01 +0100 |
commit | 8e6fb3b1c50f62d95284cf0cc6c25819622e62f3 (patch) | |
tree | aa2c324e4ebb8416a35c16dfe5ab06d96f58f1a5 /src/server/game/AI/CreatureAI.cpp | |
parent | 47493fde3de387be012184c49ab5c07e0bd85bca (diff) |
Core/AI: Fully move react state check from CreatureUnitRelocationWorker to CreatureAI::MoveInLineOfSight. This means that AI for passive/defensive creatures can now once again use MoveInLineOfSight (and fixes that weird thing where triggers decided it would be funny to attack players).
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 44098586e5f..352ae635878 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -133,7 +133,7 @@ void CreatureAI::MoveInLineOfSight(Unit* who) if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) // non-combat pets should just stand there and look good;) return; - if (me->CanStartAttack(who, false)) + if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who, false)) AttackStart(who); //else if (who->GetVictim() && me->IsFriendlyTo(who) // && me->IsWithinDistInMap(who, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)) |