Mercurial > wow > wowdb-profiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
160:090eff7671f2 | 161:7c01f8f3b709 |
---|---|
263 return npc | 263 return npc |
264 end | 264 end |
265 | 265 |
266 | 266 |
267 local function CurrentLocationData() | 267 local function CurrentLocationData() |
268 if _G.WorldMapFrame:IsVisible() or private.in_combat then | 268 if _G.GetCurrentMapAreaID() ~= current_area_id then |
269 return _G.GetRealZoneText(), current_area_id, 0, 0, 0, InstanceDifficultyToken() | 269 return _G.GetRealZoneText(), current_area_id, 0, 0, 0, InstanceDifficultyToken() |
270 end | 270 end |
271 WDP:SetCurrentAreaID() | |
272 | |
273 local map_level = _G.GetCurrentMapDungeonLevel() or 0 | 271 local map_level = _G.GetCurrentMapDungeonLevel() or 0 |
274 local x, y = _G.GetPlayerMapPosition("player") | 272 local x, y = _G.GetPlayerMapPosition("player") |
275 | 273 |
276 x = x or 0 | 274 x = x or 0 |
277 y = y or 0 | 275 y = y or 0 |
300 end | 298 end |
301 | 299 |
302 if y % 2 ~= 0 then | 300 if y % 2 ~= 0 then |
303 y = y + 1 | 301 y = y + 1 |
304 end | 302 end |
305 | 303 Debug(("x: %d y: %d map_id: %d"):format(x, y, _G.GetCurrentMapAreaID())) |
306 Debug(("x: %d y: %d"):format(x, y)) | |
307 return _G.GetRealZoneText(), current_area_id, x, y, map_level, InstanceDifficultyToken() | 304 return _G.GetRealZoneText(), current_area_id, x, y, map_level, InstanceDifficultyToken() |
308 end | 305 end |
309 | 306 |
310 | 307 |
311 local function ItemLinkToID(item_link) | 308 local function ItemLinkToID(item_link) |