Fix registerevent not working on gameobjects that did not have updateai event registered

This commit is contained in:
Rochet2
2017-07-02 20:05:14 +03:00
parent 6c49c5e71b
commit 9aa048d78c

View File

@@ -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);