fix(tracker): show quest item shortcut buttons for custom quests
Item buttons only checked QuestieDB static data (sourceItemId / requiredSourceItems), which custom server quests never have. Fall back to GetQuestLogSpecialItemInfo to resolve the item live from the quest log when the DB has no data for the quest.
This commit is contained in:
@@ -504,7 +504,11 @@ function TrackerLinePool.Initialize(questFrame)
|
||||
|
||||
-- Check primary source item
|
||||
if quest.sourceItemId and quest.sourceItemId ~= 0 and buttonType == "primary" then
|
||||
if QuestieDB.QueryItemSingle(quest.sourceItemId, "class") == 12 and GetItemCount(quest.sourceItemId, false, false) > 0 then
|
||||
-- For quests QuestieDB has no data on, sourceItemId was resolved live via
|
||||
-- GetQuestLogSpecialItemInfo -- the client already vetted it as the quest's
|
||||
-- special item, so the static-DB item class isn't known/needed here.
|
||||
local isQuestItem = quest._liveSourceItem or QuestieDB.QueryItemSingle(quest.sourceItemId, "class") == 12
|
||||
if isQuestItem and GetItemCount(quest.sourceItemId, false, false) > 0 then
|
||||
foundItemId = quest.sourceItemId
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user