aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2011-10-01 16:57:10 +0100
committerNay <dnpd.dd@gmail.com>2011-10-01 16:57:10 +0100
commit8373e6c32e5fa2c565567fb394f9e4671252226d (patch)
tree9c83e2ba50b745b8ff87f2b6f8957e62e3b1a00d /src/server/game/AI/SmartScripts
parent5cf96935422a912f9f9aa413deab0d4a4dd8b003 (diff)
Core/Creature: Do not attack non-combat pets.
Fixes an issue where non-combat pets were aggroing other creatures
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 253ac6c9155..0b77dd03e87 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -462,8 +462,11 @@ void SmartAI::EnterEvadeMode()
void SmartAI::MoveInLineOfSight(Unit* who)
{
- if (!who) return;
+ if (!who)
+ return;
+
GetScript()->OnMoveInLineOfSight(who);
+
if (me->HasReactState(REACT_PASSIVE) || AssistPlayerInCombat(who))
return;