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:
Rochet2
2017-03-19 15:48:48 +02:00
parent 8d3433f4b5
commit b7c379a42c
23 changed files with 990 additions and 976 deletions

View File

@@ -49,7 +49,7 @@ namespace LuaQuest
* @param [QuestFlags] flag : all available flags can be seen above
* @return bool hasFlag
*/
int HasFlag(Eluna* /*E*/, lua_State* L, Quest* quest)
int HasFlag(lua_State* L, Quest* quest)
{
uint32 flag = Eluna::CHECKVAL<uint32>(L, 2);
#ifndef TRINITY
@@ -66,7 +66,7 @@ namespace LuaQuest
*
* @return bool isDaily
*/
int IsDaily(Eluna* /*E*/, lua_State* L, Quest* quest)
int IsDaily(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->IsDaily());
return 1;
@@ -78,7 +78,7 @@ namespace LuaQuest
*
* @return bool isRepeatable
*/
int IsRepeatable(Eluna* /*E*/, lua_State* L, Quest* quest)
int IsRepeatable(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->IsRepeatable());
return 1;
@@ -89,7 +89,7 @@ namespace LuaQuest
*
* @return uint32 entryId
*/
int GetId(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetId(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetQuestId());
return 1;
@@ -100,7 +100,7 @@ namespace LuaQuest
*
* @return uint32 level
*/
int GetLevel(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetLevel(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetQuestLevel());
return 1;
@@ -111,7 +111,7 @@ namespace LuaQuest
*
* @return uint32 minLevel
*/
int GetMinLevel(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetMinLevel(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetMinLevel());
return 1;
@@ -122,7 +122,7 @@ namespace LuaQuest
*
* @return int32 entryId
*/
int GetNextQuestId(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetNextQuestId(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetNextQuestId());
return 1;
@@ -133,7 +133,7 @@ namespace LuaQuest
*
* @return int32 entryId
*/
int GetPrevQuestId(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetPrevQuestId(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetPrevQuestId());
return 1;
@@ -144,7 +144,7 @@ namespace LuaQuest
*
* @return int32 entryId
*/
int GetNextQuestInChain(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetNextQuestInChain(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetNextQuestInChain());
return 1;
@@ -155,7 +155,7 @@ namespace LuaQuest
*
* @return [QuestFlags] flags
*/
int GetFlags(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetFlags(lua_State* L, Quest* quest)
{
#ifndef TRINITY
Eluna::Push(L, quest->GetQuestFlags());
@@ -172,13 +172,13 @@ namespace LuaQuest
*
* @return uint32 type
*/
int GetType(Eluna* /*E*/, lua_State* L, Quest* quest)
int GetType(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetType());
return 1;
}
/*int GetMaxLevel(Eluna* E, lua_State* L, Quest* quest)
/*int GetMaxLevel(lua_State* L, Quest* quest)
{
Eluna::Push(L, quest->GetMaxLevel());
return 1;