CoA: route item/spell/NPC/quest links to db.exil.es

db.exil.es is the CoA-aware item/spell DB; Wowhead doesn't know about
CoA's custom classes, spells, or worldforged items. Achievements aren't
indexed on db.exil.es yet, so those still go to Wowhead.

- item/spell/npc/quest URLs now use path syntax (db.exil.es/item/<id>).
- Fallback search routes to /items?q=… instead of Wowhead's /search.
- WowheadLinkComments toggle is now a no-op for db.exil.es URLs (no
  comments there); it still works for the achievement fallback.
This commit is contained in:
2026-05-21 00:05:23 +02:00
parent dd8735a358
commit 61090571de
+20 -68
View File
@@ -1413,31 +1413,10 @@ function LeaPlusLC:Isolated()
end end
end) end)
-- Get localised Wowhead URL -- CoA: use db.exil.es (self-hosted CoA-aware DB) for item/spell/npc/quest links.
local wowheadLoc -- Achievements aren't on db.exil.es, so fall back to Wowhead for those only.
if GameLocale == "deDE" then local wowheadLoc = "db.exil.es"
wowheadLoc = "wowhead.com/wotlk/de" local achievementHost = "wowhead.com/wotlk"
elseif GameLocale == "esMX" then
wowheadLoc = "wowhead.com/wotlk/es"
elseif GameLocale == "esES" then
wowheadLoc = "wowhead.com/wotlk/es"
elseif GameLocale == "frFR" then
wowheadLoc = "wowhead.com/wotlk/fr"
elseif GameLocale == "itIT" then
wowheadLoc = "wowhead.com/wotlk/it"
elseif GameLocale == "ptBR" then
wowheadLoc = "wowhead.com/wotlk/pt"
elseif GameLocale == "ruRU" then
wowheadLoc = "wowhead.com/wotlk/ru"
elseif GameLocale == "koKR" then
wowheadLoc = "wowhead.com/wotlk/ko"
elseif GameLocale == "zhCN" then
wowheadLoc = "wowhead.com/wotlk/cn"
elseif GameLocale == "zhTW" then
wowheadLoc = "wowhead.com/wotlk/cn"
else
wowheadLoc = "wowhead.com/wotlk"
end
---------------------------------------------------------------------- ----------------------------------------------------------------------
-- Achievements frame -- Achievements frame
@@ -1480,9 +1459,9 @@ function LeaPlusLC:Isolated()
if achievementID then if achievementID then
-- Set editbox text -- Set editbox text
if LeaPlusLC["WowheadLinkComments"] == "On" then if LeaPlusLC["WowheadLinkComments"] == "On" then
aEB:SetText("https://" .. wowheadLoc .. "/achievement=" .. achievementID .. "#comments") aEB:SetText("https://" .. achievementHost .. "/achievement=" .. achievementID .. "#comments")
else else
aEB:SetText("https://" .. wowheadLoc .. "/achievement=" .. achievementID) aEB:SetText("https://" .. achievementHost .. "/achievement=" .. achievementID)
end end
lastAchievementLink = aEB:GetText() lastAchievementLink = aEB:GetText()
-- Set hidden fontstring then resize editbox to match -- Set hidden fontstring then resize editbox to match
@@ -1588,12 +1567,8 @@ function LeaPlusLC:Isolated()
mEB:Show() mEB:Show()
end end
-- Set editbox text -- Set editbox text (db.exil.es has no /quest comments, so the toggle is a no-op here)
if LeaPlusLC["WowheadLinkComments"] == "On" then mEB:SetText("https://" .. wowheadLoc .. "/quest/" .. questID)
mEB:SetText("https://" .. wowheadLoc .. "/quest=" .. questID .. "#comments")
else
mEB:SetText("https://" .. wowheadLoc .. "/quest=" .. questID)
end
-- Set hidden fontstring then resize editbox to match -- Set hidden fontstring then resize editbox to match
mEB.z:SetText(mEB:GetText()) mEB.z:SetText(mEB:GetText())
@@ -18470,32 +18445,9 @@ function LeaPlusLC:SlashFunc(str)
end) :gsub(" ", "+") end) :gsub(" ", "+")
end end
-- Show web link -- Show web link (CoA: db.exil.es, see header for rationale)
if not LeaPlusLC.WowheadLock then if not LeaPlusLC.WowheadLock then
-- Set Wowhead link prefix LeaPlusLC.WowheadLock = "db.exil.es"
if GameLocale == "deDE" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/de"
elseif GameLocale == "esMX" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/es"
elseif GameLocale == "esES" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/es"
elseif GameLocale == "frFR" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/fr"
elseif GameLocale == "itIT" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/it"
elseif GameLocale == "ptBR" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/pt"
elseif GameLocale == "ruRU" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/ru"
elseif GameLocale == "koKR" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/ko"
elseif GameLocale == "zhCN" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/cn"
elseif GameLocale == "zhTW" then
LeaPlusLC.WowheadLock = "wowhead.com/wotlk/cn"
else
LeaPlusLC.WowheadLock = "wowhead.com/wotlk"
end
end end
-- Store frame under mouse -- Store frame under mouse
local mouseFocus = GetMouseFocus() local mouseFocus = GetMouseFocus()
@@ -18513,7 +18465,7 @@ function LeaPlusLC:SlashFunc(str)
if itemLink then if itemLink then
local itemID = itemLink:match("item:(%d+):") local itemID = itemLink:match("item:(%d+):")
if itemID then if itemID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/item=" .. itemID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/item/" .. itemID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["Item"] .. ": " .. itemLink .. " (" .. itemID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["Item"] .. ": " .. itemLink .. " (" .. itemID .. ")")
return return
end end
@@ -18521,7 +18473,7 @@ function LeaPlusLC:SlashFunc(str)
-- Spell -- Spell
local name, void, spellID = tooltip:GetSpell() local name, void, spellID = tooltip:GetSpell()
if name and spellID then if name and spellID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell=" .. spellID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell/" .. spellID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. name .. " (" .. spellID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. name .. " (" .. spellID .. ")")
return return
end end
@@ -18531,7 +18483,7 @@ function LeaPlusLC:SlashFunc(str)
if npcName and npcGuid then if npcName and npcGuid then
local void, void, void, void, void, npcID = strsplit("-", npcGuid) local void, void, void, void, void, npcID = strsplit("-", npcGuid)
if npcID then if npcID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/npc=" .. npcID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/npc/" .. npcID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["NPC"] .. ": " .. npcName .. " (" .. npcID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["NPC"] .. ": " .. npcName .. " (" .. npcID .. ")")
return return
end end
@@ -18541,7 +18493,7 @@ function LeaPlusLC:SlashFunc(str)
if _G["BuffButton" .. i] and mouseFocus == _G["BuffButton" .. i] then if _G["BuffButton" .. i] and mouseFocus == _G["BuffButton" .. i] then
local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitBuff("player", i) local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitBuff("player", i)
if spellName and spellID then if spellName and spellID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell=" .. spellID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell/" .. spellID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")")
end end
return return
@@ -18551,7 +18503,7 @@ function LeaPlusLC:SlashFunc(str)
if _G["DebuffButton" .. i] and mouseFocus == _G["DebuffButton" .. i] then if _G["DebuffButton" .. i] and mouseFocus == _G["DebuffButton" .. i] then
local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitDebuff("player", i) local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitDebuff("player", i)
if spellName and spellID then if spellName and spellID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell=" .. spellID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell/" .. spellID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")")
end end
return return
@@ -18563,7 +18515,7 @@ function LeaPlusLC:SlashFunc(str)
if _G["TargetFrameBuff" .. i] and mouseFocus == _G["TargetFrameBuff" .. i] then if _G["TargetFrameBuff" .. i] and mouseFocus == _G["TargetFrameBuff" .. i] then
local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitBuff("target", i) local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitBuff("target", i)
if spellName and spellID then if spellName and spellID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell=" .. spellID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell/" .. spellID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")")
end end
return return
@@ -18573,7 +18525,7 @@ function LeaPlusLC:SlashFunc(str)
if _G["TargetFrameDebuff" .. i] and mouseFocus == _G["TargetFrameDebuff" .. i] then if _G["TargetFrameDebuff" .. i] and mouseFocus == _G["TargetFrameDebuff" .. i] then
local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitDebuff("target", i) local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitDebuff("target", i)
if spellName and spellID then if spellName and spellID then
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell=" .. spellID, false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell/" .. spellID, false)
LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")") LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")")
end end
return return
@@ -18585,7 +18537,7 @@ function LeaPlusLC:SlashFunc(str)
-- if _G["FocusFrameDebuff" .. i] and mouseFocus == _G["FocusFrameDebuff" .. i] then -- if _G["FocusFrameDebuff" .. i] and mouseFocus == _G["FocusFrameDebuff" .. i] then
-- local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitDebuff("focus", i) -- local spellName, void, void, void, void, void, void, void, void, void, spellID = UnitDebuff("focus", i)
-- if spellName and spellID then -- if spellName and spellID then
-- LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell=" .. spellID, false) -- LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/spell/" .. spellID, false)
-- LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")") -- LeaPlusLC.FactoryEditBox.f:SetText(L["Spell"] .. ": " .. spellName .. " (" .. spellID .. ")")
-- end -- end
-- return -- return
@@ -18604,8 +18556,8 @@ function LeaPlusLC:SlashFunc(str)
end end
if not unitFocus or not UnitIsPlayer(unitFocus) then if not unitFocus or not UnitIsPlayer(unitFocus) then
tipTitle = tipTitle:gsub("|c%x%x%x%x%x%x%x%x", ""):gsub("|r", "") tipTitle = tipTitle:gsub("|c%x%x%x%x%x%x%x%x", ""):gsub("|r", "")
LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/search?q=" .. urlencode(tipTitle), false) LeaPlusLC:ShowSystemEditBox("https://" .. LeaPlusLC.WowheadLock .. "/items?q=" .. urlencode(tipTitle), false)
LeaPlusLC.FactoryEditBox.f:SetText("|cffff0000" .. L["Link will search Wowhead"]) LeaPlusLC.FactoryEditBox.f:SetText("|cffff0000" .. L["Link will search db.exil.es"])
return return
end end
end end