minimap: do not show zero coords

This commit is contained in:
shagu
2016-12-19 21:45:16 +01:00
parent 77f02d9674
commit 6d9d7946c3
+8 -3
View File
@@ -86,9 +86,14 @@ pfUI:RegisterModule("minimap", function ()
Minimap:SetScript("OnEnter", function()
SetMapToCurrentZone()
local posX, posY = GetPlayerMapPosition("player")
local roundedX = ceil(posX * 1000)/10
local roundedY = ceil(posY * 1000)/10
pfUI.minimapCoordinates.text:SetText(roundedX..", "..roundedY)
if posX ~= 0 and posY ~= 0 then
local roundedX = ceil(posX * 1000)/10
local roundedY = ceil(posY * 1000)/10
pfUI.minimapCoordinates.text:SetText(roundedX..", "..roundedY)
else
pfUI.minimapCoordinates.text:SetText("|cffffaaaaN/A")
end
pfUI.minimapCoordinates:Show()
end)
Minimap:SetScript("OnLeave", function()