Map/Minimap tooltips for quests with the same objective (item) are not displayed on the 2nd quest in the list
Cabro opened this issue ยท 14 comments
Map/Minimap tooltips!
The last quest in the list - Footwraps of the Oracle (8596) has the same item objective as Mantle of the Oracle (8594), and recently the addon stopped showing the objective for the 2nd quest where the items are the same.
Easier to test would be i guess the Blasted Lands quests:
https://www.wowhead.com/wotlk/quest=2602/infallible-mind
https://www.wowhead.com/wotlk/quest=2604/spiritual-domination
https://www.wowhead.com/wotlk/quest=2601/the-basilisks-bite
https://www.wowhead.com/wotlk/quest=2603/vultures-vigor
https://www.wowhead.com/wotlk/quest=2582/rage-of-ages
https://www.wowhead.com/wotlk/quest=2586/salt-of-the-scorpok
https://www.wowhead.com/wotlk/quest=2584/spirit-of-the-boar
Where they require the same items (although in different quantities).
If that doesn't do the trick, you can just test with
https://www.wowhead.com/wotlk/quest=8352/scepter-of-the-council + https://www.wowhead.com/wotlk/quest=9248/a-humble-offering
Same item, same quantity
Oh boy... yeah, it's the bug I fixed were we remove duplicate tooltips that's causing this...
Actually, I misspoke... the bug I fixed pertained to Creature/NPC tooltips that were duplicated. However, I know enough about the Tooltip stacks that I think I know where to begin looking at why this is happening.
shouldnt the code check if the objective is for the same quest before nuking it?
I was expecting the blasted lands quests to not cause the bug, since they are different objectives, multiple quantities also. The bug could show on the silithus quests for the abyssal scepter. If nothing else works, AQ40 class tier quests.
Ahhhh... "since they are different objectives" I think that's it dude.
First screen shot... the first quest needs 2 Vulture Gizzards and so does the third quest. The other two screen shots... the objectives are different quantities even though they need the same item.
In other words, if your Footwraps of the Oracle (8596) needed 2 bindings it would not be broken.
Everything leading up to this function worked perfectly...
function _MapIconTooltip:AddTooltipsForQuest(icon, tip, quest, usedText)
for text, nameTable in pairs(tip) do
local data = {}
data[text] = nameTable;
--Add the data for the first time
if not usedText[text] then
tinsert(quest, data)
usedText[text] = true;
tinsert(quest, data)
is the key line that adds the objective text to the quest title line in the tooltip. if not usedText[text] then
looks for text already there. Since the "text" isn't unique to a specific quest... any duplicate gets skipped and thus it skips tinsert(quest, data)
.
Here is the fix:
function _MapIconTooltip:AddTooltipsForQuest(icon, tip, quest, usedText)
for text, nameTable in pairs(tip) do
local data = {}
data[text] = nameTable
--Add the data for the first time
if not usedText[icon.data.Id] then
usedText[icon.data.Id] = {}
if not usedText[icon.data.Id][text] then
tinsert(quest, data)
usedText[icon.data.Id][text] = true
end
The allows us to tag EACH objective and make it unique to that quest specifically without adding any duplicates.
Go read the code and look through the stack yourself. You'll find that we don't need to do any additional nil checks in the _MapIconTooltip:AddTooltipsForQuest
function. :D