Core/Battlefield: Add missing stuff for wintergrasp

This commit is contained in:
Vincent-Michael
2012-08-21 23:03:30 +02:00
parent 984493108b
commit 6891fe6248
20 changed files with 139 additions and 106 deletions
+5
View File
@@ -39,6 +39,11 @@ class GameObjectAI
virtual void Reset() {};
// Pass parameters between AI
virtual void DoAction(const int32 /*param = 0 */) {}
virtual void SetGUID(const uint64& /*guid*/, int32 /*id = 0 */) {}
virtual uint64 GetGUID(int32 /*id = 0 */) { return 0; }
static int Permissible(GameObject const* go);
virtual bool GossipHello(Player* /*player*/) { return false; }
@@ -137,6 +137,11 @@ namespace FactorySelector
ai_factory = ai_registry.GetRegistryItem(go->GetAIName());
// scriptname in db
if (!ai_factory)
if (GameObjectAI* scriptedAI = sScriptMgr->GetGameObjectAI(go))
return scriptedAI;
//future goAI types go here
std::string ainame = (ai_factory == NULL || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();