Eluna implement changes from new_mthread to master ~ Does not add multithread support

This commit is contained in:
Rochet2
2014-11-30 01:37:45 +02:00
parent a7f4954fbe
commit 6268216a64
27 changed files with 3331 additions and 3000 deletions

View File

@@ -14,9 +14,9 @@ namespace LuaBattleGround
*
* @return string name
*/
int GetName(lua_State* L, BattleGround* bg)
int GetName(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetName());
Eluna::Push(E->L, bg->GetName());
return 1;
}
@@ -26,11 +26,11 @@ namespace LuaBattleGround
* @param uint32 team : team ID
* @return uint32 count
*/
int GetAlivePlayersCountByTeam(lua_State* L, BattleGround* bg)
int GetAlivePlayersCountByTeam(Eluna* E, BattleGround* bg)
{
uint32 team = Eluna::CHECKVAL<uint32>(L, 2);
uint32 team = Eluna::CHECKVAL<uint32>(E->L, 2);
Eluna::Push(L, bg->GetAlivePlayersCountByTeam((Team)team));
Eluna::Push(E->L, bg->GetAlivePlayersCountByTeam((Team)team));
return 1;
}
@@ -39,9 +39,9 @@ namespace LuaBattleGround
*
* @return [Map] map
*/
int GetMap(lua_State* L, BattleGround* bg)
int GetMap(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetBgMap());
Eluna::Push(E->L, bg->GetBgMap());
return 1;
}
@@ -51,11 +51,11 @@ namespace LuaBattleGround
* @param uint32 kills : amount of kills
* @return uint32 bonusHonor
*/
int GetBonusHonorFromKillCount(lua_State* L, BattleGround* bg)
int GetBonusHonorFromKillCount(Eluna* E, BattleGround* bg)
{
uint32 kills = Eluna::CHECKVAL<uint32>(L, 2);
uint32 kills = Eluna::CHECKVAL<uint32>(E->L, 2);
Eluna::Push(L, bg->GetBonusHonorFromKill(kills));
Eluna::Push(E->L, bg->GetBonusHonorFromKill(kills));
return 1;
}
@@ -64,9 +64,9 @@ namespace LuaBattleGround
*
* @return BattleGroundBracketId bracketId
*/
int GetBracketId(lua_State* L, BattleGround* bg)
int GetBracketId(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetBracketId());
Eluna::Push(E->L, bg->GetBracketId());
return 1;
}
@@ -75,12 +75,12 @@ namespace LuaBattleGround
*
* @return uint32 endTime
*/
int GetEndTime(lua_State* L, BattleGround* bg)
int GetEndTime(Eluna* E, BattleGround* bg)
{
#ifdef CATA
Eluna::Push(L, bg->GetRemainingTime());
Eluna::Push(E->L, bg->GetRemainingTime());
#else
Eluna::Push(L, bg->GetEndTime());
Eluna::Push(E->L, bg->GetEndTime());
#endif
return 1;
}
@@ -91,11 +91,11 @@ namespace LuaBattleGround
* @param uint32 team : team ID
* @return uint32 freeSlots
*/
int GetFreeSlotsForTeam(lua_State* L, BattleGround* bg)
int GetFreeSlotsForTeam(Eluna* E, BattleGround* bg)
{
uint32 team = Eluna::CHECKVAL<uint32>(L, 2);
uint32 team = Eluna::CHECKVAL<uint32>(E->L, 2);
Eluna::Push(L, bg->GetFreeSlotsForTeam((Team)team));
Eluna::Push(E->L, bg->GetFreeSlotsForTeam((Team)team));
return 1;
}
@@ -104,9 +104,9 @@ namespace LuaBattleGround
*
* @return uint32 instanceId
*/
int GetInstanceId(lua_State* L, BattleGround* bg)
int GetInstanceId(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetInstanceID());
Eluna::Push(E->L, bg->GetInstanceID());
return 1;
}
@@ -115,9 +115,9 @@ namespace LuaBattleGround
*
* @return uint32 mapId
*/
int GetMapId(lua_State* L, BattleGround* bg)
int GetMapId(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMapId());
Eluna::Push(E->L, bg->GetMapId());
return 1;
}
@@ -126,9 +126,9 @@ namespace LuaBattleGround
*
* @return BattleGroundTypeId typeId
*/
int GetTypeId(lua_State* L, BattleGround* bg)
int GetTypeId(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetTypeID());
Eluna::Push(E->L, bg->GetTypeID());
return 1;
}
@@ -137,9 +137,9 @@ namespace LuaBattleGround
*
* @return uint32 maxLevel
*/
int GetMaxLevel(lua_State* L, BattleGround* bg)
int GetMaxLevel(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMaxLevel());
Eluna::Push(E->L, bg->GetMaxLevel());
return 1;
}
@@ -148,9 +148,9 @@ namespace LuaBattleGround
*
* @return uint32 minLevel
*/
int GetMinLevel(lua_State* L, BattleGround* bg)
int GetMinLevel(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMinLevel());
Eluna::Push(E->L, bg->GetMinLevel());
return 1;
}
@@ -159,9 +159,9 @@ namespace LuaBattleGround
*
* @return uint32 maxPlayerCount
*/
int GetMaxPlayers(lua_State* L, BattleGround* bg)
int GetMaxPlayers(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMaxPlayers());
Eluna::Push(E->L, bg->GetMaxPlayers());
return 1;
}
@@ -170,9 +170,9 @@ namespace LuaBattleGround
*
* @return uint32 minPlayerCount
*/
int GetMinPlayers(lua_State* L, BattleGround* bg)
int GetMinPlayers(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMinPlayers());
Eluna::Push(E->L, bg->GetMinPlayers());
return 1;
}
@@ -181,9 +181,9 @@ namespace LuaBattleGround
*
* @return uint32 maxTeamPlayerCount
*/
int GetMaxPlayersPerTeam(lua_State* L, BattleGround* bg)
int GetMaxPlayersPerTeam(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMaxPlayersPerTeam());
Eluna::Push(E->L, bg->GetMaxPlayersPerTeam());
return 1;
}
@@ -192,9 +192,9 @@ namespace LuaBattleGround
*
* @return uint32 minTeamPlayerCount
*/
int GetMinPlayersPerTeam(lua_State* L, BattleGround* bg)
int GetMinPlayersPerTeam(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetMinPlayersPerTeam());
Eluna::Push(E->L, bg->GetMinPlayersPerTeam());
return 1;
}
@@ -203,9 +203,9 @@ namespace LuaBattleGround
*
* @return Team team
*/
int GetWinner(lua_State* L, BattleGround* bg)
int GetWinner(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetWinner());
Eluna::Push(E->L, bg->GetWinner());
return 1;
}
@@ -214,9 +214,9 @@ namespace LuaBattleGround
*
* @return BattleGroundStatus status
*/
int GetStatus(lua_State* L, BattleGround* bg)
int GetStatus(Eluna* E, BattleGround* bg)
{
Eluna::Push(L, bg->GetStatus());
Eluna::Push(E->L, bg->GetStatus());
return 1;
}
};