v9.7.2: Ebonhold Database integration and core logic refinements

This commit is contained in:
Xurkon
2026-02-14 21:13:44 -06:00
parent 0a2cc15641
commit 6ef85d4e2d
573 changed files with 1751730 additions and 2 deletions
+110
View File
@@ -0,0 +1,110 @@
---@type Tutorial
local Tutorial = QuestieLoader:ImportModule("Tutorial")
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils")
---@type QuestieLib
local QuestieLib = QuestieLoader:ImportModule("QuestieLib");
--- COMPATIBILITY ---
local BackdropTemplateMixin = not QuestieCompat.Is335 and BackdropTemplateMixin
local function ShowAscensionScalingIfNeeded()
if type(SetLevelScaling) == "function"
and not Questie.db.profile.ascensionScalingAsked
then
C_Timer.After(0.5, function()
Tutorial.CreateAscensionScalingFrame()
end)
end
end
---@return Frame
function Tutorial.CreateChooseObjectiveTypeFrame()
if Tutorial.chooseObjectiveFrame then
Tutorial.chooseObjectiveFrame:Show()
return
end
local baseFrame = CreateFrame("Frame", "QuestieTutorialChooseObjectiveType", UIParent, BackdropTemplateMixin and "BackdropTemplate")
baseFrame:SetSize(740, 358)
baseFrame:SetPoint("CENTER", 0, 50)
baseFrame:SetFrameStrata("HIGH")
baseFrame:EnableMouse(true)
baseFrame:SetMovable(true)
baseFrame:RegisterForDrag("LeftButton")
baseFrame:SetScript("OnDragStart", baseFrame.StartMoving)
baseFrame:SetScript("OnDragStop", baseFrame.StopMovingOrSizing)
baseFrame:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
baseFrame:SetBackdropColor(0, 0, 0, 1)
baseFrame:SetBackdropBorderColor(1, 1, 1, 1)
local titleText = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
titleText:SetText(l10n("Welcome to Questie"))
titleText:SetFont("Fonts\\FRIZQT__.TTF", 16)
titleText:SetPoint("TOP", 0, -10)
local customText = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
customText:SetText(l10n("With WotLK Phase 4 Blizzard introduced their own quest objective system.\n\nPlease choose the objective style you want to use:"))
customText:SetPoint("TOP", 0, -35)
local onlyQuestieImage = baseFrame:CreateTexture(nil, "OVERLAY")
onlyQuestieImage:SetTexture(QuestieLib.AddonPath.."Modules\\Tutorial\\onlyQuestie.blp")
onlyQuestieImage:SetSize(220, 220)
onlyQuestieImage:SetPoint("TOPLEFT", 20, -90)
local pdfQuestImage = baseFrame:CreateTexture(nil, "OVERLAY")
pdfQuestImage:SetTexture(QuestieLib.AddonPath.."Modules\\Tutorial\\pfQuest.blp")
pdfQuestImage:SetSize(220, 220)
pdfQuestImage:SetPoint("TOP", 0, -90)
local onlyBlizzardImage = baseFrame:CreateTexture(nil, "OVERLAY")
onlyBlizzardImage:SetTexture(QuestieLib.AddonPath.."Modules\\Tutorial\\onlyBlizzard.blp")
onlyBlizzardImage:SetSize(220, 220)
onlyBlizzardImage:SetPoint("TOPRIGHT", -20, -90)
local acceptOnlyQuestieButton = CreateFrame("Button", nil, baseFrame, "UIPanelButtonTemplate")
acceptOnlyQuestieButton:SetText(l10n("Questie Objectives"))
acceptOnlyQuestieButton:SetSize(140, 24)
acceptOnlyQuestieButton:SetPoint("BOTTOMLEFT", 60, 15)
acceptOnlyQuestieButton:SetScript("OnClick", function()
Questie.db.global.tutorialObjectiveTypeChosen = true
QuestieOptionsUtils.ExecuteTheme(nil, 'questie')
baseFrame:Hide()
ShowAscensionScalingIfNeeded()
end)
local acceptPfQuestButton = CreateFrame("Button", nil, baseFrame, "UIPanelButtonTemplate")
acceptPfQuestButton:SetText(l10n("pfQuest Objectives"))
acceptPfQuestButton:SetSize(140, 24)
acceptPfQuestButton:SetPoint("BOTTOM", 0, 15)
acceptPfQuestButton:SetScript("OnClick", function()
Questie.db.global.tutorialObjectiveTypeChosen = true
QuestieOptionsUtils.ExecuteTheme(nil, 'pfquest')
baseFrame:Hide()
ShowAscensionScalingIfNeeded()
end)
local acceptOnlyBlizzardButton = CreateFrame("Button", nil, baseFrame, "UIPanelButtonTemplate")
acceptOnlyBlizzardButton:SetText(l10n("Blizzard Objectives"))
acceptOnlyBlizzardButton:SetSize(140, 24)
acceptOnlyBlizzardButton:SetPoint("BOTTOMRIGHT", -60, 15)
acceptOnlyBlizzardButton:SetScript("OnClick", function()
Questie.db.global.tutorialObjectiveTypeChosen = true
QuestieOptionsUtils.ExecuteTheme(nil, 'blizzard')
baseFrame:Hide()
ShowAscensionScalingIfNeeded()
end)
end
+88
View File
@@ -0,0 +1,88 @@
---@type Tutorial
local Tutorial = QuestieLoader:ImportModule("Tutorial")
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
---@type AvailableQuests
local AvailableQuests = QuestieLoader:ImportModule("AvailableQuests")
---@type QuestieLib
local QuestieLib = QuestieLoader:ImportModule("QuestieLib");
---@return Frame
function Tutorial.ShowRunes()
local baseFrame = CreateFrame("Frame", "QuestieTutorialShowRunes", UIParent, BackdropTemplateMixin and "BackdropTemplate")
baseFrame:SetSize(500, 240)
baseFrame:SetPoint("CENTER", 0, 50)
baseFrame:SetFrameStrata("HIGH")
baseFrame:EnableMouse(true)
baseFrame:SetMovable(true)
baseFrame:RegisterForDrag("LeftButton")
baseFrame:SetScript("OnDragStart", baseFrame.StartMoving)
baseFrame:SetScript("OnDragStop", baseFrame.StopMovingOrSizing)
baseFrame:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
baseFrame:SetBackdropColor(0, 0, 0, 1)
baseFrame:SetBackdropBorderColor(1, 1, 1, 1)
local titleText = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
titleText:SetText(l10n("Welcome to Questie"))
titleText:SetFont(STANDARD_TEXT_FONT, 16)
titleText:SetPoint("TOP", 0, -10)
local customText = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
customText:SetText(
l10n("Questie can show you the locations of Phase 1 & 2 runes for your class.\n\n") ..
l10n("Rune locations are marked with the following symbol:")
)
customText:SetPoint("TOP", 0, -35)
local showRunesIcon = baseFrame:CreateTexture(nil, "OVERLAY")
showRunesIcon:SetTexture(QuestieLib.AddonPath.."Icons\\sod_rune.blp")
showRunesIcon:SetSize(30, 30)
showRunesIcon:SetPoint("TOP", 0, -85)
local chooseText = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
chooseText:SetText(
l10n("Please choose if you want to see them or not\n") ..
l10n("(This can always be changed in the Icons tab of the settings)")
)
chooseText:SetPoint("TOP", 0, -125)
local showPhase1RunesButton = CreateFrame("CheckButton", nil, baseFrame, "ChatConfigCheckButtonTemplate")
showPhase1RunesButton.Text:SetText(" " .. l10n("Phase 1"))
showPhase1RunesButton.Text:SetTextColor(1, 0.82, 0)
showPhase1RunesButton:SetChecked(true)
showPhase1RunesButton:SetPoint("BOTTOM", -30, 60)
local showPhase2RunesButton = CreateFrame("CheckButton", nil, baseFrame, "ChatConfigCheckButtonTemplate")
showPhase2RunesButton.Text:SetText(" " .. l10n("Phase 2"))
showPhase2RunesButton.Text:SetTextColor(1, 0.82, 0)
showPhase2RunesButton:SetChecked(true)
showPhase2RunesButton:SetPoint("BOTTOM", -30, 40)
local confirmButton = CreateFrame("Button", nil, baseFrame, "UIPanelButtonTemplate")
confirmButton:SetText(DONE)
confirmButton:SetSize(80, 24)
confirmButton:SetPoint("BOTTOM", 0, 15)
confirmButton:SetScript("OnClick", function()
local showPhase1Runes = showPhase1RunesButton:GetChecked()
local showPhase2Runes = showPhase2RunesButton:GetChecked()
Questie.db.profile.showSoDRunes = showPhase1Runes or showPhase2Runes
Questie.db.profile.tutorialShowRunesDone = true
Questie.db.profile.showRunesOfPhase = {
phase1 = showPhase1Runes,
phase2 = showPhase2Runes,
phase3 = false,
phase4 = false,
}
AvailableQuests.CalculateAndDrawAll()
baseFrame:Hide()
end)
end
+165
View File
@@ -0,0 +1,165 @@
---@class Tutorial
---@field Initialize function
local Tutorial = QuestieLoader:CreateModule("Tutorial")
--Ascension
Tutorial.chooseObjectiveFrame = Tutorial.chooseObjectiveFrame or nil
Tutorial.ascensionScalingFrame = Tutorial.ascensionScalingFrame or nil
---@type AvailableQuests
local AvailableQuests = QuestieLoader:ImportModule("AvailableQuests")
---@type QuestieQuest
local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest")
---@type QuestieTracker
local QuestieTracker = QuestieLoader:ImportModule("QuestieTracker")
function Tutorial.CreateAscensionScalingFrame()
if Tutorial.ascensionScalingFrame then
Tutorial.ascensionScalingFrame:Show()
return
end
local baseFrame = CreateFrame("Frame", "QuestieTutorialAscensionScaling", UIParent, BackdropTemplateMixin and "BackdropTemplate")
baseFrame:SetSize(780, 470)
baseFrame:SetPoint("CENTER", 0, 0)
baseFrame:SetFrameStrata("HIGH")
baseFrame:EnableMouse(true)
baseFrame:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 },
})
baseFrame:SetBackdropColor(0, 0, 0, 0.95)
baseFrame:SetBackdropBorderColor(1, 1, 1, 1)
-- Title
local title = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge")
title:SetText("Ascension Level Scaling")
title:SetPoint("TOP", 0, -16)
----------------------------------------------------------------
-- Helper: Create Card
----------------------------------------------------------------
local function CreateCard(parent, xOffset, config)
local card = CreateFrame("Frame", nil, parent, BackdropTemplateMixin and "BackdropTemplate")
card:SetSize(288, 396)
card:SetPoint("TOP", parent, "TOP", xOffset, -48)
card:EnableMouse(true)
-- Card background (Skill style)
local bg = card:CreateTexture(nil, "BACKGROUND")
bg:SetAllPoints(card)
bg:SetAtlas("SkillCardNormalQuality3", true)
card.bg = bg
card:SetScript("OnEnter", function()
card.bg:SetAtlas("SkillCardGoldQuality3", true)
end)
card:SetScript("OnLeave", function()
card.bg:SetAtlas("SkillCardNormalQuality3", true)
end)
-- Icon
local icon = card:CreateTexture(nil, "ARTWORK")
if config.atlas then
icon:SetAtlas(config.atlas, true)
else
icon:SetTexture(config.texture)
end
icon:SetSize(192, 192)
icon:SetPoint("TOP", 0, -80)
-- Title text
local titleText = card:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
titleText:SetText(config.title)
titleText:SetPoint("TOP", icon, "BOTTOM", 0, -6)
-- Description
local desc = card:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
desc:SetText(config.desc)
desc:SetWidth(260)
desc:SetJustifyH("CENTER")
desc:SetPoint("TOP", titleText, "BOTTOM", 0, -4)
-- Small quest icon
local questIcon = card:CreateTexture(nil, "OVERLAY")
questIcon:SetTexture(config.questIcon)
questIcon:SetSize(32, 32)
questIcon:SetPoint("BOTTOM", desc, "TOP", 0, 34)
-- Make whole card clickable
card:SetScript("OnMouseUp", function()
Questie.db.profile.enableAscensionScaling = config.enable
Questie.db.profile.ascensionScalingAsked = true
-- Force options & map refresh
Questie.db.profileChanged = true
AvailableQuests.CalculateAndDrawAll()
QuestieTracker:Update()
baseFrame:Hide()
end)
-- Setting change later
local footerText = baseFrame:CreateFontString(nil, "OVERLAY", "GameFontDisableSmall")
footerText:SetText("You can change this later from Questie settings.")
footerText:SetTextColor(1, 0.82, 0, 1)
footerText:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE")
footerText:SetPoint("BOTTOM", 0, 12)
end
----------------------------------------------------------------
-- ENABLE CARD
----------------------------------------------------------------
CreateCard(baseFrame, -180, {
atlas = "ExperienceIconLevelScaling",
title = "Scale Quest Levels",
desc = "Low-level quests scale to your level\nand remain relevant.",
questIcon = "Interface\\AddOns\\Questie-335\\Icons\\available.blp",
enable = true,
})
----------------------------------------------------------------
-- DISABLE CARD
----------------------------------------------------------------
CreateCard(baseFrame, 180, {
atlas = "ExperienceIconNoLevelScaling",
title = "Original Quest Levels",
desc = "Quests keep their original levels.\nLow-level quests turn gray.",
questIcon = "Interface\\AddOns\\Questie-335\\Icons\\available_gray.blp",
enable = false,
})
end
function Tutorial.Initialize()
-- 1) Objective Type
if (Questie.IsWotlk or QuestieCompat.Is335)
and GetCVar("questPOI") ~= nil
and not Questie.db.global.tutorialObjectiveTypeChosen
then
Tutorial.CreateChooseObjectiveTypeFrame()
return
end
-- 2) Ascension Scaling (after objective chosen)
if type(SetLevelScaling) == "function"
and Questie.db.global.tutorialObjectiveTypeChosen
and not Questie.db.profile.ascensionScalingAsked
then
Tutorial.CreateAscensionScalingFrame()
return
end
-- 3) SoD Runes
if Questie.IsSoD and not Questie.db.profile.tutorialShowRunesDone then
Tutorial.ShowRunes()
end
end
Binary file not shown.
Binary file not shown.
Binary file not shown.