Eluna: Fix issues with SD2 compatibility

This commit is contained in:
Rochet2
2014-09-13 20:11:54 +03:00
parent 44f80525c8
commit e956e00a03
2 changed files with 4 additions and 4 deletions

View File

@@ -1835,7 +1835,7 @@ bool Eluna::OnQuestComplete(Player* pPlayer, GameObject* pGameObject, Quest cons
void Eluna::UpdateAI(GameObject* pGameObject, uint32 diff)
{
pGameObject->elunaEvents.Update(diff);
pGameObject->elunaEvents->Update(diff);
ENTRY_BEGIN(GameObjectEventBindings, pGameObject->GetEntry(), GAMEOBJECT_EVENT_ON_AIUPDATE, return);
Push(L, pGameObject);
Push(L, diff);

View File

@@ -655,7 +655,7 @@ namespace LuaWorldObject
int functionRef = luaL_ref(L, LUA_REGISTRYINDEX);
if (functionRef != LUA_REFNIL && functionRef != LUA_NOREF)
{
obj->elunaEvents.AddEvent(functionRef, delay, repeats);
obj->elunaEvents->AddEvent(functionRef, delay, repeats);
Eluna::Push(L, functionRef);
}
return 1;
@@ -669,7 +669,7 @@ namespace LuaWorldObject
int RemoveEventById(lua_State* L, WorldObject* obj)
{
int eventId = Eluna::CHECKVAL<int>(L, 2);
obj->elunaEvents.RemoveEvent(eventId);
obj->elunaEvents->RemoveEvent(eventId);
return 0;
}
@@ -679,7 +679,7 @@ namespace LuaWorldObject
*/
int RemoveEvents(lua_State* /*L*/, WorldObject* obj)
{
obj->elunaEvents.RemoveEvents();
obj->elunaEvents->RemoveEvents();
return 0;
}
};