Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion ZygorGuidesViewer/ZygorGuidesViewer/Compat/Taxi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Taxi.open = Taxi.open or false
Taxi.lastSnapshot = Taxi.lastSnapshot or { nodes = {}, byKey = {}, updatedAt = 0 }
Taxi.known = Taxi.known or {}
Taxi.knownNames = Taxi.knownNames or {}
Taxi.revision = Taxi.revision or 0

-- TaxiNodeName is returned as "Node, Zone" on the 3.3.5 client, while the
-- static map-position data uses the node's stable display name. Keep the
Expand All @@ -22,7 +23,10 @@ end

function Taxi:RememberKnownName(name)
local key = name_key(name)
if key ~= "" then self.knownNames[key] = true end
if key ~= "" and not self.knownNames[key] then
self.knownNames[key] = true
self.revision = (tonumber(self.revision) or 0) + 1
end
end

function Taxi:IsKnownName(name)
Expand Down Expand Up @@ -213,6 +217,14 @@ function Taxi:Startup(saved)
end
end
self.saved = saved
-- InitialFlightPaths binds SavedVariables after the addon modules have
-- started. Notify Navigation now that the learned-node set is usable;
-- otherwise an already selected guide keeps the route calculated before
-- this cache existed until the next /reload or manual waypoint change.
Compat:Fire("TAXI_CACHE_UPDATED", {
nodes = {}, byKey = {}, updatedAt = Compat.Now(), available = true,
restored = true, revision = self.revision,
})
return true
end

Expand Down
24 changes: 22 additions & 2 deletions ZygorGuidesViewer/ZygorGuidesViewer/Conditions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,26 @@ function Conditions:Skill(name)
return 0
end

-- `skillmax` is deliberately separate from `skill`: training Apprentice,
-- Journeyman, and later ranks changes a profession's cap without changing
-- its current value. The authored profession guides use it for exactly that
-- trainer-rank check (for example, Engineering 1/75 after Apprentice).
function Conditions:SkillMax(name)
name=tostring(name or ""):lower()
local service=ZGV.Compat and ZGV.Compat.Profession
if service and type(service.GetSkill)=="function" then
local ok,result=pcall(service.GetSkill,service,name)
if ok and type(result)=="table" then
return tonumber(result.maxSkillLevel or result.max or result.maximum) or 0
end
end
for index=1,(GetNumSkillLines and GetNumSkillLines() or 0) do
local skillName,isHeader,_,_,_,_,maximum=GetSkillLineInfo(index)
if not isHeader and skillName and skillName:lower()==name then return tonumber(maximum) or 0 end
end
return 0
end

function Conditions:Reputation(name)
if ZGV.Faction and ZGV.Faction.GetReputation then
local rep=ZGV.Faction:GetReputation(name)
Expand Down Expand Up @@ -241,7 +261,7 @@ bind("counthaveq","CountHaveQuests")
bind("readyq","QuestReady")
bind("readyallq","AllQuestsReady")
bind("skill","Skill")
bind("skillmax","Skill")
bind("skillmax","SkillMax")
bind("rep","Reputation")
bind("repval","ReputationValue")
bind("itemcount","ItemCount")
Expand Down Expand Up @@ -347,7 +367,7 @@ _G.raceclass=function(...) return Conditions:RaceClass(...) end
_G.completedq=function(...) return Conditions:CompletedQuest(...) end
_G.havequest=function(...) return Conditions:HaveQuest(...) end
_G.skill=function(...) return Conditions:Skill(...) end
_G.skillmax=function(...) return Conditions:Skill(...) end
_G.skillmax=function(...) return Conditions:SkillMax(...) end
_G.rep=function(...) return Conditions:Reputation(...) end
_G.itemcount=function(...) return Conditions:ItemCount(...) end
_G.knownspell=function(...) return Conditions:KnownSpell(...) end
Expand Down
2 changes: 1 addition & 1 deletion ZygorGuidesViewer/ZygorGuidesViewer/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ZGV.version = "8.1.0-wotlk.13"
-- Bump this whenever a client-facing package is deployed. It is included in
-- the first session diagnostic so a reload can be verified from the client
-- log rather than inferred from file timestamps.
ZGV.buildRevision = "20260714-navigation-line-renderer-01"
ZGV.buildRevision = "20260715-travel-refresh-01"
ZGV.interface = 30300
ZGV.targetBuild = 12340
ZGV.DIR = "Interface\\AddOns\\ZygorGuidesViewer"
Expand Down
5 changes: 4 additions & 1 deletion ZygorGuidesViewer/ZygorGuidesViewer/Database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ local profileDefaults = {
minimap={ x=-3, y=-2 },
actionbar={ enabled=true, x=0, y=80, scale=1, locked=false, direction=2, quest=true, talk=true, kill=true, trash=false, hideInCombat=false },
automation={ accept=true, progress=true, turnin=true, gossip=true, repair=true, sellGreys=false, equip=false, autoSelectReward=false, questRewardHint=true },
navigation={ enabled=true, useTomTom=true, knownTaxi={} },
-- Travel recommendations are advisory only. They build a route from the
-- character's learned taxi points and ready travel abilities; no protected
-- item, spell or taxi action is ever invoked by the route planner.
navigation={ enabled=true, useTomTom=true, knownTaxi={}, useTaxi=true, useHearth=true, useAstralRecall=true, useTravelItems=true },
map={ showCoords=true, poiEnabled=true, poiMode="quick", hideTypes={rare=false,treasure=false}, mapIcons=true, minimapIcons=true },
pointer={ audio=true, meters=false, freeze=false, showMinimap=true, showWorldMap=true, showLines=true, autoCorpse=true },
-- Questie owns the Blizzard quest-watch list when installed. Zygor keeps
Expand Down
3 changes: 2 additions & 1 deletion ZygorGuidesViewer/ZygorGuidesViewer/ModernArrow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ if type(UI) ~= "table" then return end
local ROOT = ZGV.ARROWSDIR .. "Starlight\\"
local SPECIALS = {
arrived = { 1, 1 }, waiting = { 1, 2 }, upstairs = { 2, 1 }, downstairs = { 2, 2 },
error = { 3, 1 }, unreachable = { 4, 1 }, route = { 5, 1 }, taxi = { 5, 1 }, ship = { 6, 1 },
error = { 3, 1 }, unreachable = { 4, 1 }, route = { 5, 1 }, taxi = { 5, 1 },
hearth = { 5, 1 }, astral = { 5, 1 }, useitem = { 5, 1 }, spell = { 5, 1 }, ship = { 6, 1 },
}

local function setSpecial(texture, name)
Expand Down
Loading
Loading