*Fix a crash caused by eventai.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-15 14:23:05 -05:00
parent c64c834c50
commit 03cfacb361
+2 -2
View File
@@ -1283,11 +1283,11 @@ void CreatureEventAI::UpdateAI(const uint32 diff)
case EVENT_T_TARGET_HP: case EVENT_T_TARGET_HP:
case EVENT_T_TARGET_CASTING: case EVENT_T_TARGET_CASTING:
case EVENT_T_FRIENDLY_HP: case EVENT_T_FRIENDLY_HP:
if (Combat) if (me->getVictim())
ProcessEvent(*i); ProcessEvent(*i);
break; break;
case EVENT_T_RANGE: case EVENT_T_RANGE:
if (Combat) if (me->getVictim())
if (m_creature->IsInMap(m_creature->getVictim())) if (m_creature->IsInMap(m_creature->getVictim()))
if (m_creature->IsInRange(m_creature->getVictim(), if (m_creature->IsInRange(m_creature->getVictim(),
(float)(*i).Event.event_param1,(float)(*i).Event.event_param2)) (float)(*i).Event.event_param1,(float)(*i).Event.event_param2))