aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-06-03 16:39:10 -0500
committerSubv <s.v.h21@hotmail.com>2012-06-03 16:39:10 -0500
commita757187d7d74a612f29ea2808302faf8ab12565d (patch)
treeea1b7b26901c069c85c59c4fc9827205eb6c242b
parent1dc6bd69aa58b77b4ff79e72181d214f1eb7192b (diff)
Fixed build
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAIMgr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index 448e43db316..a863f2f89cf 100755
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
@@ -204,15 +204,16 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
temp.raw.param3 = fields[8].GetInt32();
temp.raw.param4 = fields[9].GetInt32();
- CreatureTemplate* cInfo = sObjectMgr->GetCreatureTemplate(temp.creature_id);
+ CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature_id);
//Creature does not exist in database
if (!cInfo)
{
- sLog->outErrorDb("CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, temp.creature_id);
+ sLog->outErrorDb("CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id);
continue;
}
- if (cInfo->AIName != "EventAI")
+ // Only on the first script
+ if (cInfo->AIName != "EventAI" && m_CreatureEventAI_Event_Map[creature_id].empty())
sLog->outErrorDb("Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id);
//No chance of this event occuring