WoWInterface SVN zz_Coords

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 83 to Rev 84
    Reverse comparison

Rev 83 → Rev 84

trunk/zz_Coords/core.lua
43,29 → 43,22
mapID = C_Map.GetBestMapForUnit("player")
if(mapID) then
x,y = C_Map.GetPlayerMapPosition(mapID,"player"):GetXY()
if(x) then
if(y) then
playerCoords = format("%.1f, %.1f", x*100, y*100)
end
if(x and y) then
playerCoords = format("%.1f, %.1f", x*100, y*100)
end
end
end
local colorlist = {
['friendly'] = "00ff00",
['arena'] = "ffff00",
['sanctuary'] = "9999ff",
}
local function pvpColor(txt)
local pvpType, isFFA, faction = GetZonePVPInfo()
if(pvpType == "friendly") then
col = "00ff00"
elseif(pvpType == "hostile") then
col = "ff0000"
elseif(pvpType == "arena") then
col = "ffff00"
if(colorlist[pvpType]) then
col = colorlist[pvpType]
elseif(pvpType == "hostile" or pvpType == "combat" or pvpType=="contested") then
if(faction == select(2,UnitFactionGroup('player'))) then
col = "886600"
else
col = "ff0000"
end
elseif(pvpType == "sanctuary") then
col = "9999ff"
col = faction == select(2,UnitFactionGroup('player')) and "886600" or "ff0000"
else
return txt
end
81,7 → 74,7
if(p.tooltip) then
tip = p.tooltip
end
local n = type(tip.AddHeader) == 'function' and tip:AddHeader(childName) or tip:AddLine(childName)
tip:AddLine(childName)
tip:AddLine(GetRealZoneText())
tip:AddLine(GetSubZoneText())
tip:AddLine(format("%s: %s",childName,tostring(playerCoords)))