Revert Tooltip.lua to v1.6.1 (3f8563c) - fixing nameplate icon regression
This commit is contained in:
@@ -234,18 +234,11 @@ function QuestieTooltips:GetTooltip(key)
|
|||||||
if id then
|
if id then
|
||||||
if key:sub(1,2) == "m_" then
|
if key:sub(1,2) == "m_" then
|
||||||
local learnedNpc = QuestieLearner.data.npcs[id]
|
local learnedNpc = QuestieLearner.data.npcs[id]
|
||||||
-- npc[10] from _AddToArray is an array of questIds, not {questId -> objList}
|
if learnedNpc and learnedNpc[10] then -- check questObjectives
|
||||||
if learnedNpc and learnedNpc[10] then
|
for questId, objList in next, learnedNpc[10] do
|
||||||
for _, questId in ipairs(learnedNpc[10]) do
|
local oIndex = 1
|
||||||
local qData = QuestieLearner.data.quests[questId]
|
while objList[oIndex] do
|
||||||
if qData and qData[10] then
|
local objText = objList[oIndex]
|
||||||
for slotIdx = 1, #qData[10] do
|
|
||||||
local objSlot = qData[10][slotIdx]
|
|
||||||
if objSlot then
|
|
||||||
for oIndex = 1, #objSlot do
|
|
||||||
local objEntry = objSlot[oIndex]
|
|
||||||
if objEntry and objEntry[2] then
|
|
||||||
local objText = objEntry[2]
|
|
||||||
local needed, collected
|
local needed, collected
|
||||||
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
||||||
if objectives then
|
if objectives then
|
||||||
@@ -275,10 +268,7 @@ if key:sub(1,2) == "m_" then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end
|
oIndex = oIndex + 1
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if learnedNpc.mc then
|
if learnedNpc.mc then
|
||||||
@@ -287,18 +277,11 @@ if key:sub(1,2) == "m_" then
|
|||||||
end
|
end
|
||||||
elseif key:sub(1,2) == "o_" then
|
elseif key:sub(1,2) == "o_" then
|
||||||
local learnedObj = QuestieLearner.data.objects[id]
|
local learnedObj = QuestieLearner.data.objects[id]
|
||||||
-- obj[2] from _AddToArray is an array of questIds (questStarts), not {questId -> objList}
|
if learnedObj and learnedObj[10] then
|
||||||
if learnedObj and learnedObj[2] then
|
for questId, objList in next, learnedObj[10] do
|
||||||
for _, questId in ipairs(learnedObj[2]) do
|
local oIndex = 1
|
||||||
local qData = QuestieLearner.data.quests[questId]
|
while objList[oIndex] do
|
||||||
if qData and qData[10] then
|
local objText = objList[oIndex]
|
||||||
for slotIdx = 1, #qData[10] do
|
|
||||||
local objSlot = qData[10][slotIdx]
|
|
||||||
if objSlot then
|
|
||||||
for oIndex = 1, #objSlot do
|
|
||||||
local objEntry = objSlot[oIndex]
|
|
||||||
if objEntry and objEntry[2] then
|
|
||||||
local objText = objEntry[2]
|
|
||||||
local needed, collected
|
local needed, collected
|
||||||
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
||||||
if objectives then
|
if objectives then
|
||||||
@@ -328,10 +311,7 @@ elseif key:sub(1,2) == "o_" then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end
|
oIndex = oIndex + 1
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if learnedObj.mc then
|
if learnedObj.mc then
|
||||||
|
|||||||
Reference in New Issue
Block a user