diff options
author | megamage <none@none> | 2009-04-17 16:07:54 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-17 16:07:54 -0500 |
commit | ad41b0c9e1d9d3a176d22cb42a33dfc1fb1aa55a (patch) | |
tree | 6500753f206d3843b9619f9210be1fb0d2a0ff2f /src/game/CreatureEventAIMgr.cpp | |
parent | b9d8bdeddde70359c4a3b115ccb646abb59357cc (diff) |
*Fix build.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureEventAIMgr.cpp')
-rw-r--r-- | src/game/CreatureEventAIMgr.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp index ab6ca3e4d63..ca483209e87 100644 --- a/src/game/CreatureEventAIMgr.cpp +++ b/src/game/CreatureEventAIMgr.cpp @@ -652,20 +652,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() m_CreatureEventAI_Event_Map[creature_id].push_back(temp); ++Count; - if(!cInfo->AIName || !cInfo->AIName[0]) + if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(temp.creature_id)) { - //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but its AIName is empty. Set to EventAI as default.", cInfo->Entry); - size_t len = strlen("EventAI")+1; - const_cast<CreatureInfo*>(cInfo)->AIName = new char[len]; - strncpy(const_cast<char*>(cInfo->AIName), "EventAI", len); - } - if(strcmp(cInfo->AIName, "EventAI")) - { - //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it has AIName %s. EventAI script will be overriden.", cInfo->Entry, cInfo->AIName); - } - if(cInfo->ScriptID) - { - //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it also has C++ script. EventAI script will be overriden.", cInfo->Entry); + if(!cInfo->AIName || !cInfo->AIName[0]) + { + //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but its AIName is empty. Set to EventAI as default.", cInfo->Entry); + size_t len = strlen("EventAI")+1; + const_cast<CreatureInfo*>(cInfo)->AIName = new char[len]; + strncpy(const_cast<char*>(cInfo->AIName), "EventAI", len); + } + if(strcmp(cInfo->AIName, "EventAI")) + { + //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it has AIName %s. EventAI script will be overriden.", cInfo->Entry, cInfo->AIName); + } + if(cInfo->ScriptID) + { + //sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it also has C++ script. EventAI script will be overriden.", cInfo->Entry); + } } } while (result->NextRow()); |