Core/Scripts: Added support for creating custom GameObjectAI classes, similar to how creature scripts work.

This commit is contained in:
Shauren
2012-04-14 17:49:51 +02:00
parent ab8e69873c
commit a3bdaf7e6d
4 changed files with 16 additions and 1 deletions
@@ -133,6 +133,9 @@ namespace FactorySelector
const GameObjectAICreator* ai_factory = NULL;
GameObjectAIRegistry& ai_registry(*GameObjectAIRepository::instance());
if (GameObjectAI* scriptedAI = sScriptMgr->GetGameObjectAI(go))
return scriptedAI;
ai_factory = ai_registry.GetRegistryItem(go->GetAIName());
//future goAI types go here