comparison Main.lua @ 488:95e0a5b04d52 7.0.3-4

Added a workaround for WoWDB not supporting micro-dungeons - micro-dungeon coordinates are now translated on to the base floor for the world map if possible.
author MMOSimca <mmosimca@gmail.com>
date Wed, 14 Sep 2016 08:21:01 -0400
parents b661f10e04d9
children 83fcf3250d35
comparison
equal deleted inserted replaced
487:b661f10e04d9 488:95e0a5b04d52
329 return "NONE:0:false" 329 return "NONE:0:false"
330 end 330 end
331 331
332 332
333 local function CurrentLocationData() 333 local function CurrentLocationData()
334 local x, y, current_area_id, map_level = HereBeDragons:GetPlayerZonePosition(true) 334 local x, y, current_area_id, map_level, map_file, is_micro_dungeon = HereBeDragons:GetPlayerZonePosition(false)
335 local zone_name = _G.GetRealZoneText() 335 local zone_name = _G.GetRealZoneText()
336
337 -- Remove micro-dungeon-ness by translating back to the parent world map (at floor 0) if possible
338 if (is_micro_dungeon and x and y and current_area_id and map_level and map_level > 0) then
339 x, y = HereBeDragons:TranslateZoneCoordinates(x, y, current_area_id, map_level, current_area_id, 0, false)
340 map_level = 0
341 end
336 342
337 -- Put coordinates into expected format (as integers, they don't get a billion decimals output in the SavedVariables) 343 -- Put coordinates into expected format (as integers, they don't get a billion decimals output in the SavedVariables)
338 local x_int = nil 344 local x_int = nil
339 if (x and type(x) == "number") then 345 if (x and type(x) == "number") then
340 x_int = _G.floor(x * 1000) 346 x_int = _G.floor(x * 1000)