Improved pushing so that a single userdata is used per object pushed.
Made everything use the singleton less, allowing more free code and easier to implement multithreading later.
Made macros for hookmgr and fixed the issue with hooks called inside hooks.
This commit is contained in:
Rochet2
2014-06-01 23:58:28 +03:00
committed by Foereaper
parent e131f36d39
commit b1f85bfc21
25 changed files with 3169 additions and 3666 deletions

View File

@@ -13,9 +13,9 @@ namespace LuaCorpse
int GetOwnerGUID(lua_State* L, Corpse* corpse)
{
#ifdef MANGOS
sEluna->Push(L, corpse->GetOwnerGuid());
Eluna::Push(L, corpse->GetOwnerGuid());
#else
sEluna->Push(L, corpse->GetOwnerGUID());
Eluna::Push(L, corpse->GetOwnerGUID());
#endif
return 1;
}
@@ -23,14 +23,14 @@ namespace LuaCorpse
// GetGhostTime()
int GetGhostTime(lua_State* L, Corpse* corpse)
{
sEluna->Push(L, uint32(corpse->GetGhostTime()));
Eluna::Push(L, uint32(corpse->GetGhostTime()));
return 1;
}
// GetType()
int GetType(lua_State* L, Corpse* corpse)
{
sEluna->Push(L, corpse->GetType());
Eluna::Push(L, corpse->GetType());
return 1;
}