Reverting: Game/Scripting: Add OnGameEvent hook for game objects.

This commit is contained in:
Kittnz
2017-02-17 20:30:52 +01:00
parent a5ccbe9906
commit 9d74252e8d
3 changed files with 0 additions and 15 deletions

View File

@@ -28,7 +28,6 @@
#include "BattlegroundMgr.h"
#include "UnitAI.h"
#include "GameObjectAI.h"
#include "ScriptMgr.h"
GameEventMgr* GameEventMgr::instance()
{
@@ -1642,13 +1641,8 @@ public:
void Visit(std::unordered_map<ObjectGuid, GameObject*>& gameObjectMap)
{
for (auto const& p : gameObjectMap)
{
if (p.second->IsInWorld())
{
p.second->AI()->OnGameEvent(_activate, _eventId);
sScriptMgr->OnGameEvent(_activate, _eventId);
}
}
}
template<class T>

View File

@@ -1776,11 +1776,6 @@ void ScriptMgr::OnGameObjectUpdate(GameObject* go, uint32 diff)
tmpscript->OnUpdate(go, diff);
}
void ScriptMgr::OnGameEvent(bool start, uint16 eventId)
{
FOREACH_SCRIPT(GameObjectScript)->OnGameEvent(start, eventId);
}
bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, GameObject* target)
{
ASSERT(caster);

View File

@@ -485,9 +485,6 @@ class TC_GAME_API GameObjectScript : public ScriptObject, public UpdatableScript
// Called when a GameObjectAI object is needed for the gameobject.
virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return NULL; }
// Called when specific game event starts.
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) { }
};
class TC_GAME_API AreaTriggerScript : public ScriptObject
@@ -988,7 +985,6 @@ class TC_GAME_API ScriptMgr
void OnGameObjectStateChanged(GameObject* go, uint32 state);
void OnGameObjectUpdate(GameObject* go, uint32 diff);
GameObjectAI* GetGameObjectAI(GameObject* go);
void OnGameEvent(bool start, uint16 eventId);
public: /* AreaTriggerScript */