View Single Post
10-15-14, 03:44 PM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by semlar View Post
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
Sexy that what i need, thanks.
Shame Blizzard doesn't have a global function something like this.
  Reply With Quote