WoWInterface SVN mikma

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /Invataxi
    from Rev 574 to Rev 576
    Reverse comparison

Rev 574 → Rev 576

Invataxi.lua
33,30 → 33,40
end
 
local function CheckControl()
local wintergrasp = select(11,GetMapZones(4))
local continent,zone = GetCurrentMapContinent(),GetCurrentMapZone()
SetMapZoom(4)
for i=1,GetNumMapLandmarks() do
local name, description, textureIndex, x, y, mapLinkID = GetMapLandmarkInfo(i);
if name == wintergrasp then
if textureIndex == 48 then
InvataxiDB.wgfaction = "Horde controlled"
elseif textureIndex == 46 then
InvataxiDB.wgfaction = "Alliance controlled"
elseif textureIndex == 101 then
InvataxiDB.wgfaction = "Battle on!"
else
InvataxiDB.wgfaction = "???"
-- instanssissa GetWintergraspWaitTime() näyttää nil
if select(2,GetInstanceInfo()) == "raid" or select(2,GetInstanceInfo()) == "party" then
--if InvataxiDB.wgstart - time() => 0 and InvataxiDB.wgfaction ~= nil then
 
--end
else
if GetWintergraspWaitTime() == nil then
InvataxiDB.wgfaction = ""
else
local wintergrasp = select(11,GetMapZones(4))
local continent,zone = GetCurrentMapContinent(),GetCurrentMapZone()
SetMapZoom(4)
for i=1,GetNumMapLandmarks() do
local name, description, textureIndex, x, y, mapLinkID = GetMapLandmarkInfo(i);
if name == wintergrasp then
if textureIndex == 48 then
InvataxiDB.wgfaction = "(Horde controlled)"
elseif textureIndex == 46 then
InvataxiDB.wgfaction = "(Alliance controlled)"
else
InvataxiDB.wgfaction = ""
end
end
end
end
SetMapZoom(continent,zone)
end
 
end
SetMapZoom(continent,zone)
end
 
local function WGQueueTime()
if select(2,GetInstanceInfo()) == "none" then -- out of everything.
if GetWintergraspWaitTime() == nil then
return ""
return "lol"
elseif GetWintergraspWaitTime() < 900 then
return "Queue up!",true
else
80,7 → 90,7
else
InvataxiDB.wgstart = nil
CheckControl()
--return ""
return "Battle"
end
else
if InvataxiDB.wgstart and ( InvataxiDB.wgstart - time() ) > 0 then
98,9 → 108,9
if total >= 1 then
local wgqueue = select(2,WGQueueTime()) and ", "..WGQueueTime() or ""
local wgstart = WGStartTime() and WGStartTime().." " or ""
local faction = InvataxiDB.wgfaction
local faction = InvataxiDB.wgfaction and InvataxiDB.wgfaction or ""
 
Invataxi.DO.text = text..wgstart.."("..faction..wgqueue..")"
Invataxi.DO.text = text..wgstart..faction..wgqueue
total = 0
end
end
275,7 → 285,7
local wgqueue = WGQueueTime()
y,x = tooltip:AddLine("Queue:",wgqueue)
tooltip:SetLineScript(y,"OnMouseDown",PasteToChat,"Wintergrasp queue: "..wgqueue)
local wgstart = WGStartTime() and WGStartTime() or ""
local wgstart = WGStartTime()
y,x = tooltip:AddLine("Start:",wgstart)
tooltip:SetLineScript(y,"OnMouseDown",PasteToChat,"Wintergrasp: "..wgstart)
tooltip:AddSeparator()