fix(quest-tag): prefer live quest log tag over static QuestTag.lua data
Ascension sometimes reuses a Blizzard questId for custom content whose group/tag status differs from the original (e.g. 253 "Bride of the Embalmer" is a real group quest here but zeroed by QuestTag.lua for TBC+/WotLK clients). Once a quest is accepted, QuestieDB.GetQuestTagInfo now checks the live questLog entry's questTag before falling back to questTagCorrections and the static QuestTag.lua table. Compat.lua gains QuestTagNameToId, a reverse lookup built from questTagToName.
This commit is contained in:
@@ -999,6 +999,25 @@ end
|
||||
---@param questId number
|
||||
---@return number|nil questType, string|nil questTag
|
||||
function QuestieDB.GetQuestTagInfo(questId)
|
||||
-- Prefer the server's own live tag over static data whenever the quest is currently in
|
||||
-- the quest log. Custom servers can reuse a Blizzard quest ID for different content (e.g.
|
||||
-- Ascension's "Bride of the Embalmer" reusing ID 253, which Questie's static QuestTag.lua
|
||||
-- correctly marks as non-group for retail's real quest 253), which the static tables below
|
||||
-- have no way to know about. The live tag is authoritative once available, whether that
|
||||
-- means it HAS a tag the static data misses, or has NO tag the static data wrongly assumes.
|
||||
local cachedQuest = QuestLogCache.questLog_DO_NOT_MODIFY[questId]
|
||||
if cachedQuest then
|
||||
local liveTag = cachedQuest.questTag
|
||||
if liveTag then
|
||||
local liveTagId = QuestieCompat.QuestTagNameToId[liveTag]
|
||||
if liveTagId then
|
||||
return liveTagId, liveTag
|
||||
end
|
||||
else
|
||||
return nil, nil
|
||||
end
|
||||
end
|
||||
|
||||
if questTagCorrections[questId] then
|
||||
return questTagCorrections[questId][1], questTagCorrections[questId][2]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user