A leveling guide for WoW 1.12 players of pfQuest, based on Easy Route by stealthzi (MIT). See README.md and CHANGES.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XfR1apt9f3R7SxBKB2FF2D
59 lines
2.8 KiB
Lua
59 lines
2.8 KiB
Lua
-- texlua datacheck.lua <addon>: consistency of Data/Route.lua against the reader and the other data files.
|
|
local here = arg[0]:match("^(.*)/") or "."
|
|
arg[2], arg[3], arg[4], arg[5] = "Human", "WARRIOR", "1", "casual"
|
|
local W = dofile(here .. "/wow.lua")
|
|
local ER, S, RR = W.ER, W.ER.Steps, W.ER.RouteReader
|
|
local R = pfQuest_xpGuide_Route
|
|
local problems = {}
|
|
local function bad(s) table.insert(problems, s) end
|
|
local HORDE = { Orc = 1, Troll = 1, Tauren = 1, Scourge = 1 }
|
|
local sizes = pfQuest_xpGuide_ZoneSizes or {}
|
|
for race, path in pairs(R.paths) do
|
|
local fac = HORDE[race] and "Horde" or "Alliance"
|
|
for i, no in ipairs(path) do
|
|
local v = R.visits[no]
|
|
if not v then bad(race .. ": visit " .. no .. " missing") else
|
|
if v.race ~= race then bad(race .. ": visit " .. no .. " belongs to " .. tostring(v.race)) end
|
|
if not sizes[v.zone] then bad(race .. ": no zone size for " .. v.zone) end
|
|
local areas, nbad = RR.ReadVisit(v)
|
|
if nbad and nbad > 0 then bad(race .. " " .. v.zone .. ": " .. nbad .. " unreadable lines") end
|
|
local nq = 0
|
|
for _, a in ipairs(areas) do
|
|
for _, q in ipairs(a.q) do
|
|
nq = nq + 1
|
|
if not S.QuestTitle(q.id) then bad(race .. " " .. v.zone .. ": quest " .. tostring(q.id) .. " has no title") end
|
|
for _, z in ipairs({ q.hzone, q.ozone }) do
|
|
if z and not sizes[z] then bad(race .. " " .. v.zone .. ": quest " .. tostring(q.id) .. " points into unknown zone " .. z) end
|
|
end
|
|
end
|
|
end
|
|
if v.n and v.n ~= nq then bad(race .. " " .. v.zone .. ": n=" .. v.n .. " but " .. nq .. " quests read") end
|
|
if not v.stop then for _, sp in ipairs(RR.ReadSpots(v)) do if not sp.name then bad("spot without name") end end end
|
|
local nxt = path[i + 1] and R.visits[path[i + 1]]
|
|
if nxt and nxt.zone ~= v.zone then
|
|
local key = fac .. "|" .. v.zone .. ">" .. nxt.zone
|
|
local t = R.travel[key]
|
|
if not t then bad("no travel for " .. key .. " (" .. race .. ")") else
|
|
local legs = RR.ReadTravel(t)
|
|
if #legs == 0 then bad("travel " .. key .. " reads as no legs") end
|
|
for _, l in ipairs(legs) do
|
|
local zone = l.zone
|
|
if zone and not sizes[zone] then bad("travel " .. key .. " via unknown zone " .. zone) end
|
|
end
|
|
end
|
|
end
|
|
if i == 1 or (R.visits[path[i - 1]] or {}).zone ~= v.zone then
|
|
if not R.flights[fac .. "|" .. v.zone] and not v.stop then bad("no flights entry " .. fac .. "|" .. v.zone .. " (" .. race .. ")") end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
-- generated steps of every visit parse
|
|
for race in pairs(R.paths) do
|
|
W.race = race
|
|
for _, info in ipairs(ER.RouteGuides()) do end
|
|
end
|
|
local seen = {}
|
|
for _, p in ipairs(problems) do if not seen[p] then seen[p] = true; print(p) end end
|
|
print(#problems .. " problems")
|