View Single Post
10-15-14, 03:36 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Lua Code:
  1. local function GetMapName()
  2.     local mapName, _, _, isMicroDungeon, microDungeonMapName = GetMapInfo()
  3.     local name = WORLD_MAP
  4.     if GetCurrentMapZone() > 0 then
  5.         name = GetMapNameByID(GetCurrentMapAreaID())
  6.         local floorNum = DungeonUsesTerrainMap() and GetCurrentMapDungeonLevel() - 1 or GetCurrentMapDungeonLevel()
  7.         if floorNum > 0 then
  8.             name = name .. ': ' .. _G["DUNGEON_FLOOR_" .. strupper(mapName or '') .. floorNum]
  9.         end
  10.     else
  11.         local currentContinent = GetCurrentMapContinent()
  12.         if currentContinent ~= WORLDMAP_WORLD_ID and currentContinent ~= WORLDMAP_COSMIC_ID then
  13.             name = select(currentContinent, GetMapContinents())
  14.         end
  15.     end
  16.     return name or (isMicroDungeon and microDungeonMapName or mapName)
  17. end

Last edited by semlar : 10-15-14 at 03:42 PM.
  Reply With Quote