mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
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.
59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2010 - 2014 Eluna Lua Engine <http://emudevs.com/>
|
|
* This program is free software licensed under GPL version 3
|
|
* Please see the included DOCS/LICENSE.md for more information
|
|
*/
|
|
|
|
#ifndef CORPSEMETHODS_H
|
|
#define CORPSEMETHODS_H
|
|
|
|
namespace LuaCorpse
|
|
{
|
|
// GetOwnerGUID()
|
|
int GetOwnerGUID(lua_State* L, Corpse* corpse)
|
|
{
|
|
#ifdef MANGOS
|
|
Eluna::Push(L, corpse->GetOwnerGuid());
|
|
#else
|
|
Eluna::Push(L, corpse->GetOwnerGUID());
|
|
#endif
|
|
return 1;
|
|
}
|
|
|
|
// GetGhostTime()
|
|
int GetGhostTime(lua_State* L, Corpse* corpse)
|
|
{
|
|
Eluna::Push(L, uint32(corpse->GetGhostTime()));
|
|
return 1;
|
|
}
|
|
|
|
// GetType()
|
|
int GetType(lua_State* L, Corpse* corpse)
|
|
{
|
|
Eluna::Push(L, corpse->GetType());
|
|
return 1;
|
|
}
|
|
|
|
// ResetGhostTime()
|
|
int ResetGhostTime(lua_State* L, Corpse* corpse)
|
|
{
|
|
corpse->ResetGhostTime();
|
|
return 0;
|
|
}
|
|
|
|
// SaveToDB()
|
|
int SaveToDB(lua_State* L, Corpse* corpse)
|
|
{
|
|
corpse->SaveToDB();
|
|
return 0;
|
|
}
|
|
|
|
// DeleteBonesFromWorld()
|
|
int DeleteBonesFromWorld(lua_State* L, Corpse* corpse)
|
|
{
|
|
corpse->DeleteBonesFromWorld();
|
|
return 0;
|
|
}
|
|
};
|
|
#endif
|