mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
* Attempt fix VS 2010 pow error * Tweak the doc parser a little to work with variable arugments ... and show enum names and similar. * Change push and check to work with more types like size and time (fix osx) * Add errors to using not implemented operations on eluna objects * Change some SQL comments to work with documentation better * Add functions to create uint64 and int64 values (may need rename) * Change doc generation documentation a little to make it clearer how proto is used
89 lines
1.8 KiB
C++
89 lines
1.8 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
|
|
{
|
|
/**
|
|
* Returns the [Corpse] Owner GUID.
|
|
*
|
|
* @return uint64 ownerGUID
|
|
*/
|
|
int GetOwnerGUID(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
|
{
|
|
#ifndef TRINITY
|
|
Eluna::Push(L, corpse->GetOwnerGuid());
|
|
#else
|
|
Eluna::Push(L, corpse->GetOwnerGUID());
|
|
#endif
|
|
return 1;
|
|
}
|
|
|
|
/**
|
|
* Returns the ghost time of a [Corpse].
|
|
*
|
|
* @return uint32 ghostTime
|
|
*/
|
|
int GetGhostTime(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
|
{
|
|
Eluna::Push(L, corpse->GetGhostTime());
|
|
return 1;
|
|
}
|
|
|
|
/**
|
|
* Returns the [CorpseType] of a [Corpse].
|
|
*
|
|
* <pre>
|
|
* enum CorpseType
|
|
* {
|
|
* CORPSE_BONES = 0,
|
|
* CORPSE_RESURRECTABLE_PVE = 1,
|
|
* CORPSE_RESURRECTABLE_PVP = 2
|
|
* };
|
|
* </pre>
|
|
*
|
|
* @return [CorpseType] corpseType
|
|
*/
|
|
int GetType(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
|
{
|
|
Eluna::Push(L, corpse->GetType());
|
|
return 1;
|
|
}
|
|
|
|
/**
|
|
* Resets the [Corpse] ghost time.
|
|
*
|
|
*/
|
|
int ResetGhostTime(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
|
{
|
|
corpse->ResetGhostTime();
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* Saves the [Corpse] to the database.
|
|
*
|
|
*/
|
|
int SaveToDB(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
|
{
|
|
corpse->SaveToDB();
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* Deletes the [Corpse] from the world.
|
|
*
|
|
*/
|
|
int DeleteBonesFromWorld(Eluna* /*E*/, lua_State* L, Corpse* corpse)
|
|
{
|
|
corpse->DeleteBonesFromWorld();
|
|
return 0;
|
|
}
|
|
};
|
|
#endif
|