Node color changes and quest db menu rework

This commit is contained in:
User
2026-08-20 15:59:05 -05:00
parent b3ce9fc31d
commit 3dfaee29ab
6 changed files with 142 additions and 17 deletions
+9 -3
View File
@@ -400,9 +400,15 @@ local function AttachWorldMapPinInput(pin)
pin:RegisterForClicks("LeftButtonUp")
pin:SetScript("OnEnter",function() QuestieOcto.Tooltips:Show(this) end)
pin:SetScript("OnLeave",function() QuestieOcto.Tooltips:Hide(this) end)
-- Continent-map markers should behave as zone-entry targets instead of
-- swallowing the click that would otherwise select the zone underneath.
pin:SetScript("OnClick",function() OpenContinentZoneForPin(this) end)
-- Full Node objective dots re-roll their quest color on click; otherwise a
-- continent-map marker still behaves as a zone-entry target.
pin:SetScript("OnClick",function()
if this.fullNode and QuestieOcto.Visuals then
local qid=this.questID or (this.fullNodeNode and this.fullNodeNode.questID)
if qid then QuestieOcto.Visuals:CycleQuestColor(qid); return end
end
OpenContinentZoneForPin(this)
end)
end
function M:GetOrCreate(key,node,x,y,clusterCount,generation,kind)
+8
View File
@@ -445,6 +445,14 @@ function MM:GetOrCreate(index)
pin:SetScript("OnEnter",function() QuestieOcto.Tooltips:Show(this) end)
pin:SetScript("OnLeave",function() QuestieOcto.Tooltips:Hide(this) end)
if pin.RegisterForClicks then pin:RegisterForClicks("LeftButtonUp") end
-- Full Node objective dots re-roll their quest color on click.
pin:SetScript("OnClick",function()
if this.fullNode and QuestieOcto.Visuals then
local qid=this.questID or (this.fullNodeNode and this.fullNodeNode.questID)
if qid then QuestieOcto.Visuals:CycleQuestColor(qid) end
end
end)
self.frames[index]=pin
self.stats.created=self.stats.created+1
+19 -1
View File
@@ -23,8 +23,26 @@ local function SeedColor(seed)
return 0.45+r/2,0.45+g/2,0.45+b/2
end
V.colorRolls=V.colorRolls or {}
function V:GetQuestColor(questID)
return SeedColor(tonumber(questID) or 0)
questID=tonumber(questID) or 0
-- Each Full Node click re-rolls the quest's color (see CycleQuestColor).
local roll=self.colorRolls[questID] or 0
return SeedColor(questID+roll*1000003)
end
-- Full Nodes: clicking a spawn dot re-rolls its quest's color so overlapping
-- quests can be told apart, mirroring pfQuest's node click behavior.
function V:CycleQuestColor(questID)
questID=tonumber(questID)
if not questID then return end
self.colorRolls[questID]=(self.colorRolls[questID] or 0)+1
if QuestieOcto.Map and QuestieOcto.Map.RefreshVisualSettings then
QuestieOcto.Map:RefreshVisualSettings()
elseif QuestieOcto.Minimap and QuestieOcto.Minimap.RefreshVisualSettings then
QuestieOcto.Minimap:RefreshVisualSettings()
end
end
function V:GetObjectiveColor(questID,objectiveIndex)