diff Main.lua @ 161:7c01f8f3b709

When attempting to update locations, don't check if the WorldMapFrame is visible and don't perform any map-voodoo. Simply check if the current map area ID matches that of current_area_id and return appropriate data.
author James D. Callahan III <jcallahan@curse.com>
date Sun, 07 Oct 2012 01:29:51 -0500
parents 75cf16f95ad0
children ef88920c634b
line wrap: on
line diff
--- a/Main.lua	Fri Oct 05 22:31:56 2012 -0500
+++ b/Main.lua	Sun Oct 07 01:29:51 2012 -0500
@@ -265,11 +265,9 @@
 
 
 local function CurrentLocationData()
-    if _G.WorldMapFrame:IsVisible() or private.in_combat then
+    if _G.GetCurrentMapAreaID() ~= current_area_id then
         return _G.GetRealZoneText(), current_area_id, 0, 0, 0, InstanceDifficultyToken()
     end
-    WDP:SetCurrentAreaID()
-
     local map_level = _G.GetCurrentMapDungeonLevel() or 0
     local x, y = _G.GetPlayerMapPosition("player")
 
@@ -302,8 +300,7 @@
     if y % 2 ~= 0 then
         y = y + 1
     end
-
-    Debug(("x: %d y: %d"):format(x, y))
+    Debug(("x: %d y: %d map_id: %d"):format(x, y, _G.GetCurrentMapAreaID()))
     return _G.GetRealZoneText(), current_area_id, x, y, map_level, InstanceDifficultyToken()
 end