Core/Battlefield: Add missing stuff for wintergrasp
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user