Fix TC build

This commit is contained in:
Rochet2
2020-06-29 13:58:03 +03:00
parent f7adf33028
commit 31f4cfd98c
4 changed files with 17 additions and 5 deletions

View File

@@ -182,6 +182,7 @@ namespace LuaMap
* @param float x
* @param float y
* @param float z
* @param uint32 phasemask = PHASEMASK_NORMAL
* @return uint32 areaId
*/
int GetAreaId(lua_State* L, Map* map)
@@ -189,8 +190,11 @@ namespace LuaMap
float x = Eluna::CHECKVAL<float>(L, 2);
float y = Eluna::CHECKVAL<float>(L, 3);
float z = Eluna::CHECKVAL<float>(L, 4);
#if defined TRINITY
float phasemask = Eluna::CHECKVAL<uint32>(L, 5, PHASEMASK_NORMAL);
#if defined TRINITY || AZEROTHCORE
Eluna::Push(L, map->GetAreaId(phasemask, x, y, z));
#elif defined AZEROTHCORE
Eluna::Push(L, map->GetAreaId(x, y, z));
#else
Eluna::Push(L, map->GetTerrain()->GetAreaId(x, y, z));