Eluna fix crash in timed events and prepare some for future changes. Ditched EventProcessor

This commit is contained in:
Rochet2
2014-09-13 16:05:16 +03:00
parent 7be917335a
commit 06be9650bb
12 changed files with 388 additions and 346 deletions

View File

@@ -341,13 +341,14 @@ void Eluna::OnShutdownCancel()
void Eluna::OnWorldUpdate(uint32 diff)
{
eventMgr->globalProcessor->Update(diff);
if (reload)
{
ReloadEluna();
return;
}
m_EventMgr->Update(diff);
EVENT_BEGIN(ServerEventBindings, WORLD_EVENT_ON_UPDATE, return);
Push(L, diff);
EVENT_EXECUTE(0);
@@ -1834,6 +1835,7 @@ bool Eluna::OnQuestComplete(Player* pPlayer, GameObject* pGameObject, Quest cons
void Eluna::UpdateAI(GameObject* pGameObject, uint32 diff)
{
pGameObject->elunaEvents.Update(diff);
ENTRY_BEGIN(GameObjectEventBindings, pGameObject->GetEntry(), GAMEOBJECT_EVENT_ON_AIUPDATE, return);
Push(L, pGameObject);
Push(L, diff);