aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-03 16:58:44 -0500
committermegamage <none@none>2009-05-03 16:58:44 -0500
commit037015e4e48aaa38287e2111776a071caa53e0f0 (patch)
tree61ebc7fe92f6587ae7096b84f6f585a53ea8bfdc /src
parent84fc76439c2f7b59c9e0995a1e4b991e27997c73 (diff)
*Fix the bug that eventAI creatures change target every update.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/CreatureEventAI.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 5ce6e4855a7..a1ee2a388b3 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -1175,11 +1175,11 @@ void CreatureEventAI::AttackStart(Unit *who)
void CreatureEventAI::MoveInLineOfSight(Unit *who)
{
- if (!who)
+ if(me->getVictim())
return;
//Check for OOC LOS Event
- if (!bEmptyList && !m_creature->getVictim())
+ if (!bEmptyList)
{
for (std::list<CreatureEventAIHolder>::iterator itr = CreatureEventAIList.begin(); itr != CreatureEventAIList.end(); ++itr)
{