From 9aa048d78c3369437cd21690422c5fdb63fda735 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sun, 2 Jul 2017 20:05:14 +0300 Subject: [PATCH] Fix registerevent not working on gameobjects that did not have updateai event registered --- GameObjectHooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameObjectHooks.cpp b/GameObjectHooks.cpp index 6da9300..29b1da3 100644 --- a/GameObjectHooks.cpp +++ b/GameObjectHooks.cpp @@ -42,8 +42,8 @@ bool Eluna::OnDummyEffect(Unit* pCaster, uint32 spellId, SpellEffIndex effIndex, void Eluna::UpdateAI(GameObject* pGameObject, uint32 diff) { - START_HOOK(GAMEOBJECT_EVENT_ON_AIUPDATE, pGameObject->GetEntry()); pGameObject->elunaEvents->Update(diff); + START_HOOK(GAMEOBJECT_EVENT_ON_AIUPDATE, pGameObject->GetEntry()); Push(pGameObject); Push(diff); CallAllFunctions(GameObjectEventBindings, key);