Lua Code:
local function GetMapName()
local mapName, _, _, isMicroDungeon, microDungeonMapName = GetMapInfo()
local name = WORLD_MAP
if GetCurrentMapZone() > 0 then
name = GetMapNameByID(GetCurrentMapAreaID())
local floorNum = DungeonUsesTerrainMap() and GetCurrentMapDungeonLevel() - 1 or GetCurrentMapDungeonLevel()
if floorNum > 0 then
name = name .. ': ' .. _G["DUNGEON_FLOOR_" .. strupper(mapName or '') .. floorNum]
end
else
local currentContinent = GetCurrentMapContinent()
if currentContinent ~= WORLDMAP_WORLD_ID and currentContinent ~= WORLDMAP_COSMIC_ID then
name = select(currentContinent, GetMapContinents())
end
end
return name or (isMicroDungeon and microDungeonMapName or mapName)
end