Corpse Method Documentation

Removed corpse documented methods from LuaFunctions.cpp.
This commit is contained in:
Easelm
2014-08-09 17:50:58 -04:00
parent 02ed184f13
commit af9bdac9d4
2 changed files with 42 additions and 6 deletions

View File

@@ -9,6 +9,11 @@
namespace LuaCorpse namespace LuaCorpse
{ {
/**
* Returns the &Corpse Owner GUID.
*
* @return uint64 ownerGUID
*/
int GetOwnerGUID(lua_State* L, Corpse* corpse) int GetOwnerGUID(lua_State* L, Corpse* corpse)
{ {
#ifndef TRINITY #ifndef TRINITY
@@ -19,30 +24,61 @@ namespace LuaCorpse
return 1; return 1;
} }
/**
* Returns the ghost time of a &Corpse.
*
* @return time_t ghostTime
*/
int GetGhostTime(lua_State* L, Corpse* corpse) int GetGhostTime(lua_State* L, Corpse* corpse)
{ {
Eluna::Push(L, uint32(corpse->GetGhostTime())); Eluna::Push(L, uint32(corpse->GetGhostTime()));
return 1; 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(lua_State* L, Corpse* corpse) int GetType(lua_State* L, Corpse* corpse)
{ {
Eluna::Push(L, corpse->GetType()); Eluna::Push(L, corpse->GetType());
return 1; return 1;
} }
/**
* Resets the &Corpse ghost time.
*
*/
int ResetGhostTime(lua_State* /*L*/, Corpse* corpse) int ResetGhostTime(lua_State* /*L*/, Corpse* corpse)
{ {
corpse->ResetGhostTime(); corpse->ResetGhostTime();
return 0; return 0;
} }
/**
* Saves the &Corpse to the database.
*
*/
int SaveToDB(lua_State* /*L*/, Corpse* corpse) int SaveToDB(lua_State* /*L*/, Corpse* corpse)
{ {
corpse->SaveToDB(); corpse->SaveToDB();
return 0; return 0;
} }
/**
* Deletes the &Corpse from the world.
*
*/
int DeleteBonesFromWorld(lua_State* /*L*/, Corpse* corpse) int DeleteBonesFromWorld(lua_State* /*L*/, Corpse* corpse)
{ {
corpse->DeleteBonesFromWorld(); corpse->DeleteBonesFromWorld();

View File

@@ -1159,12 +1159,12 @@ ElunaRegister<Map> MapMethods[] =
ElunaRegister<Corpse> CorpseMethods[] = ElunaRegister<Corpse> CorpseMethods[] =
{ {
{ "GetOwnerGUID", &LuaCorpse::GetOwnerGUID }, // :GetOwnerGUID() - Returns the corpse owner GUID { "GetOwnerGUID", &LuaCorpse::GetOwnerGUID },
{ "GetGhostTime", &LuaCorpse::GetGhostTime }, // :GetGhostTime() - Returns the ghost time of a corpse { "GetGhostTime", &LuaCorpse::GetGhostTime },
{ "GetType", &LuaCorpse::GetType }, // :GetType() - Returns the (CorpseType) of a corpse { "GetType", &LuaCorpse::GetType },
{ "ResetGhostTime", &LuaCorpse::ResetGhostTime }, // :ResetGhostTime() - Resets the corpse's ghost time { "ResetGhostTime", &LuaCorpse::ResetGhostTime },
{ "SaveToDB", &LuaCorpse::SaveToDB }, // :SaveToDB() - Saves to database { "SaveToDB", &LuaCorpse::SaveToDB },
{ "DeleteBonesFromWorld", &LuaCorpse::DeleteBonesFromWorld }, // :DeleteBonesFromWorld() - Deletes all bones from the world { "DeleteBonesFromWorld", &LuaCorpse::DeleteBonesFromWorld },
{ NULL, NULL } { NULL, NULL }
}; };