WoW:API GetWorldPVPAreaInfo: Difference between revisions

Fixed LUA example code
m (correct result to code)
(Fixed LUA example code)
Line 18: Line 18:


== Example ==
== Example ==
  local _, localizedName, _, canQueue, startTime, canEnter = GetWorldPVPAreaInfo(2)
  local _, localizedName, isActive, canQueue, startTime, canEnter = GetWorldPVPAreaInfo(2)
   
   
  if isActive then
  if isActive then
     if canEnter and canQueue then
     if canEnter and canQueue then
           print("Get over to " .. name .. ", quick!")
           print("Get over to " .. localizedName .. ", quick!")
     else
     else
           print("They're fighting over in " .. name .. ".  Don't you wish you could join in?")
           print("They're fighting over in " .. localizedName .. ".  Don't you wish you could join in?")
     end
     end
  else
  else
     print("Cool your jets, " .. name .. " doesn't start for another " .. SecondsToTime(start) .. ".")
     print("Cool your jets, " .. localizedName .. " doesn't start for another " .. SecondsToTime(startTime) .. ".")
  end
  end


Anonymous user