mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Change Eluna to a global variable
Remove Eluna* from being passed. You can now get it through Eluna::GetEluna(L) Change function call cleanup to lua_settop instead of manual loop Explicitly delete the copy constructor and copy assignment operators
This commit is contained in:
@@ -19,7 +19,7 @@ namespace LuaCorpse
|
||||
*
|
||||
* @return uint64 ownerGUID
|
||||
*/
|
||||
int GetOwnerGUID(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
||||
int GetOwnerGUID(lua_State* L, Corpse* corpse)
|
||||
{
|
||||
#ifndef TRINITY
|
||||
Eluna::Push(L, corpse->GetOwnerGuid());
|
||||
@@ -34,7 +34,7 @@ namespace LuaCorpse
|
||||
*
|
||||
* @return uint32 ghostTime
|
||||
*/
|
||||
int GetGhostTime(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
||||
int GetGhostTime(lua_State* L, Corpse* corpse)
|
||||
{
|
||||
Eluna::Push(L, corpse->GetGhostTime());
|
||||
return 1;
|
||||
@@ -52,7 +52,7 @@ namespace LuaCorpse
|
||||
*
|
||||
* @return [CorpseType] corpseType
|
||||
*/
|
||||
int GetType(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
||||
int GetType(lua_State* L, Corpse* corpse)
|
||||
{
|
||||
Eluna::Push(L, corpse->GetType());
|
||||
return 1;
|
||||
@@ -63,7 +63,7 @@ namespace LuaCorpse
|
||||
*
|
||||
* See [Corpse:GetGhostTime].
|
||||
*/
|
||||
int ResetGhostTime(Eluna* /*E*/, lua_State* /*L*/, Corpse* corpse)
|
||||
int ResetGhostTime(lua_State* /*L*/, Corpse* corpse)
|
||||
{
|
||||
corpse->ResetGhostTime();
|
||||
return 0;
|
||||
@@ -72,7 +72,7 @@ namespace LuaCorpse
|
||||
/**
|
||||
* Saves the [Corpse] to the database.
|
||||
*/
|
||||
int SaveToDB(Eluna* /*E*/, lua_State* /*L*/, Corpse* corpse)
|
||||
int SaveToDB(lua_State* /*L*/, Corpse* corpse)
|
||||
{
|
||||
corpse->SaveToDB();
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user