All pastes #910703 Raw Edit

ScriptMgr.cpp

public text v1 · immutable
·published 2008-02-20 03:26 UTC
rendered paste body
Index: ScriptMgr.cpp

===================================================================

--- ScriptMgr.cpp	(revision 5260)

+++ ScriptMgr.cpp	(working copy)

@@ -290,6 +290,16 @@

 }
 
 MANGOS_DLL_EXPORT
+GameObjectAI* GetGameObjectAI(GameObject *_GameObject)
+{
+    Script *tmpscript = GetScriptByName(_GameObject->GetGOInfo()->ScriptName);
+
+    if(!tmpscript || !tmpscript->GetGameObjectAI) return NULL;
+
+    return tmpscript->GetGameObjectAI(_GameObject);
+}
+
+MANGOS_DLL_EXPORT
 InstanceData* CreateInstanceData(Map *map)
 {
     std::string name = map->GetScript();