Skip to content
Closed
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The addon and the companion app share one version number.

## [Unreleased]

### Added
- Addon: **Alt + click on a Questie map icon** (world map or minimap) opens that quest on Wowhead, also for quests you have not taken yet. The icon tooltip shows the hint.
- Addon: for quests not in your log, the link window says whether you can take it, using Questie's database: Questie's availability verdict, the required level and every previous quest, each marked done or missing.
- Addon: quest titles come from Questie when the quest is not in your log.
- Addon: **hovering a Questie "!" icon** (map or minimap) adds the same "can you take it?" lines to its tooltip: Questie's verdict (already completed, in your log, missing pre-quest...), level and previous quests marked done or missing. The lines stay when Questie redraws the tooltip on Shift.

## [1.2.1] - 2026-11-18

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The project has two parts:
- **Button next to the target frame**: opens the NPC page on the **Loot** tab (trash, good and quest drops with drop rates). Shift + drag to move it.
- **Quest log**: an icon on every quest and a **Wowhead** button in the quest details.
- **Quest giver window**: an icon next to the close button, to check a quest before accepting it.
- **Questie map icons**: **Alt + click** any quest icon on the world map or minimap to open it on Wowhead. For quests you have not taken, the window also says whether you can take it: level, previous quests (done or missing) and Questie's verdict. **Hovering** a "!" icon shows the same lines in its tooltip.
- **Key bindings** (Options → Keybindings → AddOns): Wowhead for your target or for the unit under the mouse.
- Links always point to the **Forever** section of Wowhead, in your **client language** (English, Spanish, German, French, Italian, Portuguese, Russian, Korean and Chinese).

Expand Down Expand Up @@ -91,6 +92,7 @@ Abre **Wowhead (WoW Forever)** con el botín de cualquier PNJ o con cualquier mi
- **Botón junto al marco del objetivo**: abre la ficha del PNJ en la pestaña **Botín** (normal, bueno y de misión, con porcentajes). Mayús + arrastrar para moverlo.
- **Registro de misiones**: icono en cada misión y botón **Wowhead** en el detalle.
- **Ventana del PNJ que da misiones**: icono junto a la X para revisar la misión antes de aceptarla.
- **Iconos de Questie en el mapa**: **Alt + clic** en cualquier icono de misión del mapa o del minimapa la abre en Wowhead. Si aún no la tienes, la ventana te dice si puedes cogerla: nivel, misiones previas (hechas o pendientes) y el veredicto de Questie. **Al pasar el ratón** por un "!" lo ves en su tooltip.
- **Atajos de teclado** (Opciones → Atajos → Addons).
- Comandos: `/wh`, `/wh m <id>`, `/wh <texto>`, `/wh ultima`, `/wh reset`, `/wh diag`.
- Los enlaces van siempre a la sección **Forever** de Wowhead, en el **idioma de tu cliente**.
Expand Down
14 changes: 14 additions & 0 deletions WowheadForeverLink/Locales.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ local L = {
RESET_DONE = "target button moved back to its place.",
QUEST_USAGE = "usage: /wh q <quest ID>",
DIAG_SAVED = "type /reload to save this to SavedVariables.",
QUESTIE_ALT_CLICK = "Alt + click: view on Wowhead",
REQ_TITLE = "Can you take it? (Questie)",
REQ_LEVEL = "Required level %d (you are %d)",
REQ_ALL = "Requires all of these quests:",
REQ_ONE = "Requires one of these quests:",
REQ_NONE = "No previous quests required.",
HELP = {
"commands:",
" /wh — target's loot",
Expand All @@ -38,6 +44,7 @@ local L = {
" /wh last — show the last link again",
" /wh reset — move the target button back to its place",
" /wh diag — addon status",
" Alt + click on a Questie map icon — that quest on Wowhead",
},
}

Expand Down Expand Up @@ -70,6 +77,12 @@ local esES = {
RESET_DONE = "botón del objetivo devuelto a su sitio.",
QUEST_USAGE = "uso: /wh m <número de misión>",
DIAG_SAVED = "haz /reload para que quede guardado en SavedVariables.",
QUESTIE_ALT_CLICK = "Alt + clic: ver en Wowhead",
REQ_TITLE = "¿Puedes cogerla? (Questie)",
REQ_LEVEL = "Nivel requerido %d (tienes %d)",
REQ_ALL = "Requiere todas estas misiones:",
REQ_ONE = "Requiere una de estas misiones:",
REQ_NONE = "No requiere misiones previas.",
HELP = {
"comandos:",
" /wh — botín del objetivo",
Expand All @@ -78,6 +91,7 @@ local esES = {
" /wh ultima — vuelve a mostrar el último enlace",
" /wh reset — devuelve el botón del objetivo a su sitio",
" /wh diag — estado del addon",
" Alt + clic en un icono de Questie del mapa — esa misión en Wowhead",
},
}

Expand Down
182 changes: 180 additions & 2 deletions WowheadForeverLink/WowheadForeverLink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ local function CreateWindow()
f.hint:SetPoint("TOP", e, "BOTTOM", -4, -10)
f.hint:SetText(L.COPY_HINT)

-- Optional extra lines (quest requirements from Questie).
f.info = f:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
f.info:SetPoint("TOPLEFT", 24, -96)
f.info:SetWidth(352)
f.info:SetJustifyH("LEFT")
f.info:SetJustifyV("TOP")
f.info:SetSpacing(2)

e:SetScript("OnEscapePressed", function() f:Hide() end)
e:SetScript("OnEnterPressed", function() f:Hide() end)
-- Typing restores the URL: the box only exists to copy from.
Expand Down Expand Up @@ -131,12 +139,23 @@ local function CreateWindow()
return f
end

local function ShowURL(url, title)
local WINDOW_HEIGHT = 118

local function ShowURL(url, title, infoLines)
window = window or CreateWindow()
window.generation = (window.generation or 0) + 1
window.url = url
window.title:SetText(title or "Wowhead")
window.edit:SetText(url)
if infoLines and #infoLines > 0 then
window.info:SetText(table.concat(infoLines, "\n"))
window.info:Show()
window:SetHeight(WINDOW_HEIGHT + 8 + (window.info:GetStringHeight() or 0))
else
window.info:SetText("")
window.info:Hide()
window:SetHeight(WINDOW_HEIGHT)
end
window:Show()
-- With the gamepad UI on, focusing from addon code taints Blizzard's
-- navigation (Questie avoids it too): there focus comes from a click.
Expand Down Expand Up @@ -217,6 +236,67 @@ local function OpenTarget()
OpenUnit(data)
end

---------------------------------------------------------------------------
-- Questie (optional): quest names and "can you take it?" requirements
---------------------------------------------------------------------------
local function QuestieModule(name)
if not (QuestieLoader and QuestieLoader.ImportModule) then return nil end
local ok, module = pcall(QuestieLoader.ImportModule, QuestieLoader, name)
if ok and type(module) == "table" then return module end
end

local READY = "|TInterface\\RaidFrame\\ReadyCheck-Ready:14|t "
local NOT_READY = "|TInterface\\RaidFrame\\ReadyCheck-NotReady:14|t "

local function IsQuestCompleted(questID)
if C_QuestLog and C_QuestLog.IsQuestFlaggedCompleted then
local ok, done = pcall(C_QuestLog.IsQuestFlaggedCompleted, questID)
if ok and done ~= nil and not IsSecret(done) then return done == true end
end
local complete = Questie and Questie.db and Questie.db.char and Questie.db.char.complete
return complete and complete[questID] and true or false
end

local function QuestieQuestName(db, questID)
if not (db and db.QueryQuestSingle) then return nil end
local ok, name = pcall(db.QueryQuestSingle, questID, "name")
if ok and type(name) == "string" then return name end
end

-- Lines that tell whether the player can take the quest, from Questie's database.
local function QuestRequirements(db, questID)
if not (db and db.GetQuest) then return nil end
local ok, quest = pcall(db.GetQuest, questID)
if not ok or type(quest) ~= "table" then return nil end

local lines = { "|cffffd100" .. L.REQ_TITLE .. "|r" }
if db.IsDoableVerbose then
local okText, text = pcall(db.IsDoableVerbose, questID, false, true, true)
if okText and type(text) == "string" and text ~= "" then lines[#lines + 1] = text end
end

local level = quest.requiredLevel
local mine = UnitLevel("player")
if type(level) == "number" and level > 1 and type(mine) == "number" and not IsSecret(mine) then
lines[#lines + 1] = (mine >= level and READY or NOT_READY) .. L.REQ_LEVEL:format(level, mine)
end

local function AddQuests(list, label)
if type(list) ~= "table" or not next(list) then return false end
lines[#lines + 1] = label
for _, id in ipairs(list) do
local preID = math.abs(id) -- negative entries only skip Questie's exclusive check
local name = QuestieQuestName(db, preID) or L.QUEST:format(preID)
lines[#lines + 1] = " " .. (IsQuestCompleted(preID) and READY or NOT_READY) .. name
end
return true
end
local hasAll = AddQuests(quest.preQuestGroup, L.REQ_ALL)
local hasOne = AddQuests(quest.preQuestSingle, L.REQ_ONE)
if not hasAll and not hasOne then lines[#lines + 1] = READY .. L.REQ_NONE end
return lines
end

local function OpenQuest(questID)
if not questID or IsSecret(questID) or questID == 0 then
Print(L.NO_QUEST)
Expand All @@ -227,7 +307,15 @@ local function OpenQuest(questID)
local ok, t = pcall(C_QuestLog.GetTitleForQuestID, questID)
if ok and t ~= nil and not IsSecret(t) then title = t end
end
ShowURL(QuestURL(questID), title or L.QUEST:format(questID))
local db = QuestieModule("QuestieDB")
title = title or QuestieQuestName(db, questID)
local info
local onQuest = C_QuestLog and C_QuestLog.IsOnQuest and C_QuestLog.IsOnQuest(questID)
if onQuest ~= true then -- requirements only matter for quests not taken yet
local ok, lines = pcall(QuestRequirements, db, questID)
if ok then info = lines else Diag("requirements: " .. tostring(lines)) end
end
ShowURL(QuestURL(questID), title or L.QUEST:format(questID), info)
end

-- Key bindings (Bindings.xml)
Expand Down Expand Up @@ -401,6 +489,92 @@ local function HookQuestFrames()
end
end

---------------------------------------------------------------------------
-- Questie map icons (world map and minimap): Alt + click opens the quest.
-- Questie uses Shift (hide quest) and Ctrl (TomTom) on its icons; Alt is free.
---------------------------------------------------------------------------
local function DecorateQuestieIcon(frame)
if type(frame) ~= "table" or frame.wowheadForeverLink or not frame.HookScript then return end
frame.wowheadForeverLink = true
frame:HookScript("OnClick", function(self, button)
if button ~= "LeftButton" or not IsAltKeyDown() then return end
local id = self.data and self.data.Id
if type(id) == "number" then Safe("questie icon", OpenQuest, id) end
end)
end

-- Extra tooltip lines for a hovered Questie icon: for an available quest ("!"),
-- whether the player can take it; for any quest icon, the Alt+click hint.
local function AppendQuestieTooltip(tooltip, icon)
local data = icon and icon.data
local id = data and data.Id
if type(id) ~= "number" then return end
if data.Type == "available" then
local ok, lines = pcall(QuestRequirements, QuestieModule("QuestieDB"), id)
if ok and lines then
tooltip:AddLine(" ")
for _, line in ipairs(lines) do tooltip:AddLine(line, 1, 1, 1) end
elseif not ok then
Diag("tooltip requirements: " .. tostring(lines))
end
end
tooltip:AddLine(L.QUESTIE_ALT_CLICK, 0.22, 0.75, 0.93)
tooltip:Show()
end

-- Questie draws map icon tooltips in MapIconTooltip.ShowOnTooltip and redraws
-- them with Tooltip._Rebuild when a modifier key changes: add our lines both times.
local function HookQuestieTooltip()
if hooked.questieTooltip then return end
local module = QuestieModule("MapIconTooltip")
if not (module and type(module.ShowOnTooltip) == "function") then return end
hooksecurefunc(module, "ShowOnTooltip", function(icon, tooltip)
Safe("questie tooltip", function()
if type(tooltip) ~= "table" or tooltip._owner ~= icon then return end -- Questie skipped this show
-- Questie assigns a new _Rebuild on every show: wrap each new one once.
local rebuild = tooltip._Rebuild
if type(rebuild) == "function" and rebuild ~= tooltip.wowheadForeverLinkRebuild then
local wrapper = function(tt, ...)
rebuild(tt, ...)
Safe("questie tooltip", AppendQuestieTooltip, tt, tt._owner)
end
tooltip._Rebuild = wrapper
tooltip.wowheadForeverLinkRebuild = wrapper
end
AppendQuestieTooltip(tooltip, icon)
end)
end)
hooked.questieTooltip = true
end

-- Questie names its icons QuestieFrame1, QuestieFrame2...: covers icons created before the hook.
local scannedQuestieFrames = 0
local function ScanQuestieIcons()
local i = scannedQuestieFrames + 1
while _G["QuestieFrame" .. i] do
DecorateQuestieIcon(_G["QuestieFrame" .. i])
scannedQuestieFrames = i
i = i + 1
end
end

local function HookQuestieMap()
if hooked.questie then return end
local pool = QuestieModule("QuestieFramePool")
if not (pool and type(pool.GetFrame) == "function") then return end
local original = pool.GetFrame
pool.GetFrame = function(...)
local frame = original(...)
Safe("questie icon", DecorateQuestieIcon, frame)
return frame
end
if WorldMapFrame and WorldMapFrame.HookScript then
WorldMapFrame:HookScript("OnShow", function() Safe("questie scan", ScanQuestieIcons) end)
end
ScanQuestieIcons()
hooked.questie = true
end

---------------------------------------------------------------------------
-- Right-click on a portrait: entry in Blizzard's unit menu
---------------------------------------------------------------------------
Expand Down Expand Up @@ -474,6 +648,8 @@ local function SlashCommand(text)
questDetails = hooked.questDetails or false,
questFrame = hooked.questFrame or false,
menus = hooked.menus or false,
questie = hooked.questie or false,
questieTooltip = hooked.questieTooltip or false,
target = cachedTarget and cachedTarget.kind or "none",
}
for k, v in pairs(DB.status) do print(" " .. k .. " = " .. tostring(v)) end
Expand Down Expand Up @@ -508,6 +684,8 @@ events:SetScript("OnEvent", function(_, event, arg1)
Safe("target button", CreateTargetButton)
Safe("hooks", HookQuestFrames)
Safe("menus", HookUnitMenus)
Safe("questie", HookQuestieMap)
Safe("questie tooltip", HookQuestieTooltip)
Print(L.READY)
elseif event == "PLAYER_TARGET_CHANGED" then
Safe("target changed", UpdateTargetButton)
Expand Down
1 change: 1 addition & 0 deletions WowheadForeverLink/WowheadForeverLink.toc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## Version: 1.2.1
## Category: Quests
## SavedVariables: WowheadForeverLinkDB
## OptionalDeps: Questie
## IconTexture: Interface\AddOns\WowheadForeverLink\icon.png
## X-License: MIT
## X-Website: https://github.com/AlexDXC2026/WowheadForeverLink
Expand Down
2 changes: 2 additions & 0 deletions docs/CURSEFORGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Right-click a portrait, click the small magnifier next to your target, or the ic
- **Button next to the target frame**: opens the NPC page on the **Loot** tab — trash, good and quest drops with their drop rates. *Shift + drag* to move it.
- **Quest log**: an icon on every quest, plus a **Wowhead** button in the quest details.
- **Quest giver window**: check a quest on Wowhead before accepting it.
- **Questie map icons**: **Alt + click** a quest icon on the map or minimap to open it on Wowhead, and see right away if you can take it: required level and previous quests, each marked done or missing. Just **hovering** a "!" shows it in the tooltip.
- **Key bindings**: Wowhead for your target, or for whatever is under the mouse.
- **Client language**: English, Español, Deutsch, Français, Italiano, Português, Русский, 한국어, 中文.
- Works in combat and instances whenever the game allows reading the unit; otherwise it falls back to what it read when you targeted it.
Expand Down Expand Up @@ -55,6 +56,7 @@ Bugs and ideas: [GitHub issues](https://github.com/AlexDXC2026/WowheadForeverLin
- **Clic derecho en un retrato** → **Ver en Wowhead**.
- **Botón junto al marco del objetivo**: ficha del PNJ en la pestaña **Botín** (normal, bueno y de misión, con porcentajes).
- **Registro de misiones** y **ventana del PNJ**: icono para ver la misión en Wowhead.
- **Iconos de Questie en el mapa**: **Alt + clic** abre la misión en Wowhead y te dice si puedes cogerla (nivel y misiones previas hechas o pendientes). Con solo **pasar el ratón** por un "!" lo ves en el tooltip.
- Enlaces siempre a la sección **Forever**, en el **idioma de tu cliente**.
- Comandos: `/wh`, `/wh m <id>`, `/wh <texto>`, `/wh ultima`, `/wh reset`.

Expand Down
Loading