feat(tooltip): ElvUI style without ElvUI; source in secondary only; fix learner source label
- ElvUI tooltip style: new 'ElvUI tooltip style' option (General tab, on by default) skins GameTooltip/WorldMapTooltip/ItemRefTooltip/shopping tooltips and the secondary learner frame with ElvUI's transparent flat look (dark bg + thin 1px border) when ElvUI is not installed. Corrected the secondary frame fallback that used the chunky WoW border. No-op when ElvUI is loaded. - Source attribution now shows ONLY inside the secondary learner tooltip when 'Use secondary learner tooltip' is enabled; removed from the main NPC/object/ item tooltip and gated off entirely when the secondary tooltip is disabled (map-pin source gated the same way). - Fixed learner-learned pins mislabelled 'AscensionDB': GetPinDataSource is now mode-aware and returns 'Learner' in learner mode when the entity has a learner record, even if AscensionDB also curates it (curated coords are discarded by GetNPC/GetObject in learner mode anyway). Test-neutral (145 successes / same 7 pre-existing failures + 1 error).
This commit is contained in:
+22
-11
@@ -2626,22 +2626,33 @@ function QuestieDB.GetPinDataSource(entityType, id, spawnData)
|
||||
end
|
||||
if not id then return nil end
|
||||
|
||||
-- AscensionDB-curated entity (has at least one curated override field for this id).
|
||||
local settings = _GetLearnerSettings()
|
||||
local mode = settings and settings.dataSourceMode or "auto"
|
||||
|
||||
-- Does the learner have a record for this entity?
|
||||
local learner = Questie.dbLearner and Questie.dbLearner.global
|
||||
local bucket = learner and ((entityType == "OBJECT" and learner.objects)
|
||||
or (entityType == "QUEST" and learner.quests)
|
||||
or (entityType == "ITEM" and learner.items)
|
||||
or learner.npcs)
|
||||
local hasLearner = bucket and bucket[id] ~= nil
|
||||
|
||||
-- In learner-only mode the displayed spawns ARE the learner's (GetNPC/GetObject
|
||||
-- return the learner record and discard curated coords), so the learner is the
|
||||
-- authoritative source even for AscensionDB-curated entities. Without this, a
|
||||
-- freshly-learned curated NPC was mislabelled "AscensionDB".
|
||||
if mode == "learner" and hasLearner then
|
||||
return "Learner"
|
||||
end
|
||||
|
||||
-- AscensionDB-curated entity (authoritative in auto/static modes).
|
||||
local ascKeys = QuestieDB.ascensionOverrideKeys and QuestieDB.ascensionOverrideKeys[entityType]
|
||||
if ascKeys and ascKeys[id] and next(ascKeys[id]) then
|
||||
return "AscensionDB"
|
||||
end
|
||||
|
||||
-- Learner-known entity (learned data exists for this id).
|
||||
local learner = Questie.dbLearner and Questie.dbLearner.global
|
||||
if learner then
|
||||
local bucket = (entityType == "OBJECT" and learner.objects)
|
||||
or (entityType == "QUEST" and learner.quests)
|
||||
or (entityType == "ITEM" and learner.items)
|
||||
or learner.npcs
|
||||
if bucket and bucket[id] then
|
||||
return "Learner"
|
||||
end
|
||||
if hasLearner then
|
||||
return "Learner"
|
||||
end
|
||||
|
||||
return "Questie DB"
|
||||
|
||||
Reference in New Issue
Block a user