Move GetPlayers from global method to map method.

For backwards compatibility for GetPlayersInMap(mapid, instid) use GetMapById(mapid, instid):GetPlayers()
This commit is contained in:
Rochet2
2017-07-19 19:41:49 +03:00
parent 199efc2ec8
commit 963352e4f5
3 changed files with 43 additions and 51 deletions

View File

@@ -84,7 +84,6 @@ luaL_Reg GlobalMethods[] =
{ "GetPlayerByName", &LuaGlobalFunctions::GetPlayerByName },
{ "GetGameTime", &LuaGlobalFunctions::GetGameTime },
{ "GetPlayersInWorld", &LuaGlobalFunctions::GetPlayersInWorld },
{ "GetPlayersInMap", &LuaGlobalFunctions::GetPlayersInMap },
{ "GetGuildByName", &LuaGlobalFunctions::GetGuildByName },
{ "GetGuildByLeaderGUID", &LuaGlobalFunctions::GetGuildByLeaderGUID },
{ "GetPlayerCount", &LuaGlobalFunctions::GetPlayerCount },
@@ -1188,6 +1187,7 @@ ElunaRegister<Map> MapMethods[] =
{ "GetInstanceId", &LuaMap::GetInstanceId },
{ "GetInstanceData", &LuaMap::GetInstanceData },
{ "GetPlayerCount", &LuaMap::GetPlayerCount },
{ "GetPlayers", &LuaMap::GetPlayers },
{ "GetMapId", &LuaMap::GetMapId },
{ "GetAreaId", &LuaMap::GetAreaId },
{ "GetHeight", &LuaMap::GetHeight },