v1.4.9: Validation fixes, Profiler fix, Quest link duplicate fix, Ascension fixes
This commit is contained in:
@@ -106,7 +106,7 @@ function MapIconTooltip:Show()
|
||||
|
||||
local r, g, b, a = unpack(QuestieMap.zoneWaypointHoverColorOverrides[self.AreaID] or DEFAULT_WAYPOINT_HOVER_COLOR)
|
||||
--Highlight waypoints if they exist.
|
||||
for _, lineFrame in pairs(self.data.lineFrames or {}) do
|
||||
for _, lineFrame in next, self.data.lineFrames or {} do
|
||||
lineFrame.line:SetColorTexture(r, g, b, a)
|
||||
end
|
||||
|
||||
@@ -167,8 +167,8 @@ function MapIconTooltip:Show()
|
||||
|
||||
-- We need to check for duplicates.
|
||||
local add = true;
|
||||
for _, data in pairs(questOrder[key]) do
|
||||
for text, _ in pairs(data) do
|
||||
for _, data in next, questOrder[key] do
|
||||
for text, _ in next, data do
|
||||
if (text == iconData.ObjectiveData.Description) then
|
||||
add = false;
|
||||
break;
|
||||
@@ -180,10 +180,10 @@ function MapIconTooltip:Show()
|
||||
end
|
||||
else
|
||||
local tooltips = _MapIconTooltip:GetObjectiveTooltip(icon)
|
||||
for _, tip in pairs(tooltips) do
|
||||
for _, tip in next, tooltips do
|
||||
tinsert(orderedTooltips, 1, tip);
|
||||
end
|
||||
for _, tip in pairs(orderedTooltips) do
|
||||
for _, tip in next, orderedTooltips do
|
||||
local questData = questOrder[key]
|
||||
_MapIconTooltip:AddTooltipsForQuest(icon, tip, questData, usedText)
|
||||
end
|
||||
@@ -212,7 +212,7 @@ function MapIconTooltip:Show()
|
||||
end
|
||||
|
||||
if self.miniMapIcon then
|
||||
for icon, _ in pairs(HBDPins.activeMinimapPins) do
|
||||
for icon, _ in next, HBDPins.activeMinimapPins do
|
||||
handleMapIcon(icon)
|
||||
end
|
||||
else
|
||||
@@ -235,7 +235,8 @@ function MapIconTooltip:Show()
|
||||
local playerIsHonoredWithShaTar = (not QuestieReputation:HasReputation(nil, { 935, 8999 }))
|
||||
|
||||
-- tooltips for quest icons on the map
|
||||
for questTitleKey, data in pairs(self.npcAndObjectOrder) do -- this logic really needs to be improved
|
||||
-- tooltips for quest icons on the map
|
||||
for questTitleKey, data in next, self.npcAndObjectOrder do -- this logic really needs to be improved
|
||||
haveGiver = true
|
||||
if shift and (not firstLine) then
|
||||
-- Spacer between NPCs
|
||||
@@ -244,7 +245,7 @@ function MapIconTooltip:Show()
|
||||
|
||||
-- Display all NPC names for this quest group
|
||||
local names = {}
|
||||
for name, _ in pairs(data.npcNames) do
|
||||
for name, _ in next, data.npcNames do
|
||||
tinsert(names, name)
|
||||
end
|
||||
table.sort(names)
|
||||
@@ -262,7 +263,7 @@ function MapIconTooltip:Show()
|
||||
|
||||
local quests = data.quests
|
||||
|
||||
for _, questData in pairs(quests) do
|
||||
for _, questData in next, quests do
|
||||
local reputationReward = QuestieDB.QueryQuestSingle(questData.questId, "reputationReward")
|
||||
|
||||
if questData.title ~= nil then
|
||||
@@ -302,17 +303,17 @@ function MapIconTooltip:Show()
|
||||
if questData.subData and shift then
|
||||
local dataType = type(questData.subData)
|
||||
if dataType == "table" then
|
||||
for _, rawLine in pairs(questData.subData) do
|
||||
for _, rawLine in next, questData.subData do
|
||||
local lines = QuestieLib:TextWrap(rawLine, " ", false, math.max(375, Tooltip:GetWidth()),
|
||||
questData.questId) --275 is the default questlog width
|
||||
for _, line in pairs(lines) do
|
||||
for _, line in next, lines do
|
||||
self:AddLine(line, 0.86, 0.86, 0.86);
|
||||
end
|
||||
end
|
||||
elseif dataType == "string" then
|
||||
local lines = QuestieLib:TextWrap(questData.subData, " ", false,
|
||||
math.max(375, Tooltip:GetWidth())) --275 is the default questlog width
|
||||
for _, line in pairs(lines) do
|
||||
for _, line in next, lines do
|
||||
self:AddLine(line, 0.86, 0.86, 0.86);
|
||||
end
|
||||
end
|
||||
@@ -384,7 +385,7 @@ function MapIconTooltip:Show()
|
||||
local factionId, factionName
|
||||
local rewardValue
|
||||
local aldorPenalty, scryersPenalty
|
||||
for _, rewardPair in pairs(reputationReward) do
|
||||
for _, rewardPair in next, reputationReward do
|
||||
factionId = rewardPair[1]
|
||||
|
||||
if factionId == 935 and playerIsHonoredWithShaTar and (scryersPenalty or aldorPenalty) then
|
||||
@@ -408,17 +409,17 @@ function MapIconTooltip:Show()
|
||||
aldorPenalty = 0 - math.floor(rewardValue * 1.1)
|
||||
end
|
||||
|
||||
rewardTable[#rewardTable + 1] = (rewardValue > 0 and "+" or "") ..
|
||||
rewardValue .. " " .. factionName
|
||||
tinsert(rewardTable, (rewardValue > 0 and "+" or "") ..
|
||||
rewardValue .. " " .. factionName)
|
||||
end
|
||||
end
|
||||
|
||||
if aldorPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(932))
|
||||
rewardTable[#rewardTable + 1] = aldorPenalty .. " " .. factionName
|
||||
tinsert(rewardTable, aldorPenalty .. " " .. factionName)
|
||||
elseif scryersPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(934))
|
||||
rewardTable[#rewardTable + 1] = scryersPenalty .. " " .. factionName
|
||||
tinsert(rewardTable, scryersPenalty .. " " .. factionName)
|
||||
end
|
||||
|
||||
self:AddLine(
|
||||
@@ -430,7 +431,7 @@ function MapIconTooltip:Show()
|
||||
|
||||
-- tooltips for objectives of active quests
|
||||
---@param questId number
|
||||
for questId, textList in pairs(self.questOrder) do -- this logic really needs to be improved
|
||||
for questId, textList in next, self.questOrder do -- this logic really needs to be improved
|
||||
if type(questId) ~= "number" then
|
||||
-- Skip non-quest keys if any somehow ended up here
|
||||
break
|
||||
@@ -508,11 +509,11 @@ function MapIconTooltip:Show()
|
||||
|
||||
local hasRare = false
|
||||
if not shift then
|
||||
for _, textData in pairs(textList) do
|
||||
for textLine, nameData in pairs(textData) do
|
||||
for _, textData in next, textList do
|
||||
for textLine, nameData in next, textData do
|
||||
local dataType = type(nameData)
|
||||
if dataType == "table" then
|
||||
for name in pairs(nameData) do
|
||||
for name in next, nameData do
|
||||
if creatureLevels[name] and (creatureLevels[name][3] == 2 or creatureLevels[name][3] == 4) then
|
||||
hasRare = true
|
||||
break
|
||||
@@ -530,12 +531,12 @@ function MapIconTooltip:Show()
|
||||
end
|
||||
|
||||
local addedCreatureNames = {}
|
||||
for _, textData in pairs(textList) do
|
||||
for textLine, nameData in pairs(textData) do
|
||||
for _, textData in next, textList do
|
||||
for textLine, nameData in next, textData do
|
||||
local dataType = type(nameData)
|
||||
local hasName = false
|
||||
if dataType == "table" then
|
||||
for name in pairs(nameData) do
|
||||
for name in next, nameData do
|
||||
if (not addedCreatureNames[name]) then
|
||||
addedCreatureNames[name] = true
|
||||
name = _GetLevelString(creatureLevels, name)
|
||||
@@ -565,7 +566,7 @@ function MapIconTooltip:Show()
|
||||
local factionId, factionName
|
||||
local rewardValue
|
||||
local aldorPenalty, scryersPenalty
|
||||
for _, rewardPair in pairs(reputationReward) do
|
||||
for _, rewardPair in next, reputationReward do
|
||||
factionId = rewardPair[1]
|
||||
|
||||
if factionId == 935 and playerIsHonoredWithShaTar and (scryersPenalty or aldorPenalty) then
|
||||
@@ -589,17 +590,17 @@ function MapIconTooltip:Show()
|
||||
aldorPenalty = 0 - math.floor(rewardValue * 1.1)
|
||||
end
|
||||
|
||||
rewardTable[#rewardTable + 1] = (rewardValue > 0 and "+" or "") ..
|
||||
rewardValue .. " " .. factionName
|
||||
tinsert(rewardTable, (rewardValue > 0 and "+" or "") ..
|
||||
rewardValue .. " " .. factionName)
|
||||
end
|
||||
end
|
||||
|
||||
if aldorPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(932))
|
||||
rewardTable[#rewardTable + 1] = aldorPenalty .. " " .. factionName
|
||||
tinsert(rewardTable, aldorPenalty .. " " .. factionName)
|
||||
elseif scryersPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(934))
|
||||
rewardTable[#rewardTable + 1] = scryersPenalty .. " " .. factionName
|
||||
tinsert(rewardTable, scryersPenalty .. " " .. factionName)
|
||||
end
|
||||
|
||||
self:AddLine(
|
||||
@@ -674,16 +675,19 @@ function MapIconTooltip:Show()
|
||||
self:AddLine(" ")
|
||||
end
|
||||
|
||||
for title, data in pairs(self.manualOrder) do
|
||||
for title, data in next, self.manualOrder do
|
||||
local body = data.Body
|
||||
self:AddLine(title)
|
||||
for _, stringOrTable in ipairs(body) do
|
||||
local bIndex = 1
|
||||
while body[bIndex] do
|
||||
local stringOrTable = body[bIndex]
|
||||
local dataType = type(stringOrTable)
|
||||
if dataType == "string" then
|
||||
self:AddLine(stringOrTable)
|
||||
elseif dataType == "table" then
|
||||
self:AddDoubleLine(stringOrTable[1], '|cFFffffff' .. stringOrTable[2] .. '|r') --normal, white
|
||||
end
|
||||
bIndex = bIndex + 1
|
||||
end
|
||||
if self.miniMapIcon == false and not data.disableShiftToRemove then
|
||||
self:AddLine('|cFFa6a6a6Shift-click to hide|r') -- grey
|
||||
|
||||
@@ -90,13 +90,13 @@ function QuestieTooltips:RemoveQuest(questId)
|
||||
local quest = QuestieDB.GetQuest(questId)
|
||||
|
||||
if quest then
|
||||
for _, objective in pairs(quest.Objectives) do
|
||||
for _, objective in next, quest.Objectives do
|
||||
objective.AlreadySpawned = {}
|
||||
objective.hasRegisteredTooltips = false
|
||||
objective.registeredItemTooltips = false
|
||||
end
|
||||
|
||||
for _, objective in pairs(quest.SpecialObjectives) do
|
||||
for _, objective in next, quest.SpecialObjectives do
|
||||
objective.AlreadySpawned = {}
|
||||
objective.hasRegisteredTooltips = false
|
||||
objective.registeredItemTooltips = false
|
||||
@@ -105,11 +105,11 @@ function QuestieTooltips:RemoveQuest(questId)
|
||||
|
||||
Questie:Debug(Questie.DEBUG_DEVELOP, "[QuestieTooltips:RemoveQuest]", questId)
|
||||
|
||||
for _, key in pairs(QuestieTooltips.lookupKeysByQuestId[questId] or {}) do
|
||||
for _, key in next, QuestieTooltips.lookupKeysByQuestId[questId] or {} do
|
||||
--Count to see if we should remove the main object
|
||||
local totalCount = 0
|
||||
local totalRemoved = 0
|
||||
for _, tooltipData in pairs(QuestieTooltips.lookupByKey[key] or {}) do
|
||||
for _, tooltipData in next, QuestieTooltips.lookupByKey[key] or {} do
|
||||
--Remove specific quest
|
||||
if (tooltipData.questId == questId and tooltipData.objective) then
|
||||
QuestieTooltips.lookupByKey[key][tostring(tooltipData.questId) .. " " .. tooltipData.objective.Index] = nil
|
||||
@@ -135,13 +135,13 @@ local function _FetchTooltipsForGroupMembers(key, tooltipData)
|
||||
if QuestieComms and QuestieComms.data:KeyExists(key) then
|
||||
---@tooltipData @tooltipData[questId][playerName][objectiveIndex].text
|
||||
local tooltipDataExternal = QuestieComms.data:GetTooltip(key);
|
||||
for questId, playerList in pairs(tooltipDataExternal) do
|
||||
for questId, playerList in next, tooltipDataExternal do
|
||||
if (not tooltipData[questId]) then
|
||||
tooltipData[questId] = {
|
||||
title = QuestieLib:GetColoredQuestName(questId, Questie.db.profile.enableTooltipsQuestLevel, true, true)
|
||||
}
|
||||
end
|
||||
for playerName, _ in pairs(playerList) do
|
||||
for playerName, _ in next, playerList do
|
||||
local playerInfo = QuestiePlayer:GetPartyMemberByName(playerName);
|
||||
if playerInfo or QuestieComms.remotePlayerEnabled[playerName] then
|
||||
anotherPlayer = true
|
||||
@@ -157,17 +157,17 @@ local function _FetchTooltipsForGroupMembers(key, tooltipData)
|
||||
if QuestieComms.data:KeyExists(key) and anotherPlayer then
|
||||
---@tooltipData @tooltipData[questId][playerName][objectiveIndex].text
|
||||
local tooltipDataExternal = QuestieComms.data:GetTooltip(key);
|
||||
for questId, playerList in pairs(tooltipDataExternal) do
|
||||
for questId, playerList in next, tooltipDataExternal do
|
||||
if (not tooltipData[questId]) then
|
||||
tooltipData[questId] = {
|
||||
title = QuestieLib:GetColoredQuestName(questId, Questie.db.profile.enableTooltipsQuestLevel, true, true)
|
||||
}
|
||||
end
|
||||
for playerName, objectives in pairs(playerList) do
|
||||
for playerName, objectives in next, playerList do
|
||||
local playerInfo = QuestiePlayer:GetPartyMemberByName(playerName);
|
||||
if playerInfo or QuestieComms.remotePlayerEnabled[playerName] then
|
||||
anotherPlayer = true;
|
||||
for objectiveIndex, objective in pairs(objectives) do
|
||||
for objectiveIndex, objective in next, objectives do
|
||||
if (not objective) then
|
||||
objective = {}
|
||||
end
|
||||
@@ -229,12 +229,14 @@ function QuestieTooltips:GetTooltip(key)
|
||||
if key:sub(1,2) == "m_" then
|
||||
local learnedNpc = QuestieLearner.data.npcs[id]
|
||||
if learnedNpc and learnedNpc[10] then -- check questObjectives
|
||||
for questId, objList in pairs(learnedNpc[10]) do
|
||||
for _, objText in ipairs(objList) do
|
||||
for questId, objList in next, learnedNpc[10] do
|
||||
local oIndex = 1
|
||||
while objList[oIndex] do
|
||||
local objText = objList[oIndex]
|
||||
local needed, collected
|
||||
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
||||
if objectives then
|
||||
for _, obj in pairs(objectives) do
|
||||
for _, obj in next, objectives do
|
||||
if obj.text and objText and (obj.text == objText or string.find(obj.text, objText, 1, true) or string.find(objText, obj.text, 1, true)) then
|
||||
needed = obj.numRequired
|
||||
collected = obj.numFulfilled
|
||||
@@ -250,7 +252,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
Update = function(self)
|
||||
local objs = QuestLogCache.GetQuestObjectives(questId)
|
||||
if objs then
|
||||
for _, o in pairs(objs) do
|
||||
for _, o in next, objs do
|
||||
if o.text and self.Description and (o.text == self.Description or string.find(o.text, self.Description, 1, true) or string.find(self.Description, o.text, 1, true)) then
|
||||
self.Needed = o.numRequired
|
||||
self.Collected = o.numFulfilled
|
||||
@@ -260,6 +262,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
end
|
||||
end
|
||||
})
|
||||
oIndex = oIndex + 1
|
||||
end
|
||||
end
|
||||
if learnedNpc.mc then
|
||||
@@ -269,12 +272,14 @@ function QuestieTooltips:GetTooltip(key)
|
||||
elseif key:sub(1,2) == "o_" then
|
||||
local learnedObj = QuestieLearner.data.objects[id]
|
||||
if learnedObj and learnedObj[10] then
|
||||
for questId, objList in pairs(learnedObj[10]) do
|
||||
for _, objText in ipairs(objList) do
|
||||
for questId, objList in next, learnedObj[10] do
|
||||
local oIndex = 1
|
||||
while objList[oIndex] do
|
||||
local objText = objList[oIndex]
|
||||
local needed, collected
|
||||
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
||||
if objectives then
|
||||
for _, obj in pairs(objectives) do
|
||||
for _, obj in next, objectives do
|
||||
if obj.text and objText and (obj.text == objText or string.find(obj.text, objText, 1, true) or string.find(objText, obj.text, 1, true)) then
|
||||
needed = obj.numRequired
|
||||
collected = obj.numFulfilled
|
||||
@@ -290,7 +295,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
Update = function(self)
|
||||
local objs = QuestLogCache.GetQuestObjectives(questId)
|
||||
if objs then
|
||||
for _, o in pairs(objs) do
|
||||
for _, o in next, objs do
|
||||
if o.text and self.Description and (o.text == self.Description or string.find(o.text, self.Description, 1, true) or string.find(self.Description, o.text, 1, true)) then
|
||||
self.Needed = o.numRequired
|
||||
self.Collected = o.numFulfilled
|
||||
@@ -300,6 +305,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
end
|
||||
end
|
||||
})
|
||||
oIndex = oIndex + 1
|
||||
end
|
||||
end
|
||||
if learnedObj.mc then
|
||||
@@ -313,7 +319,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
|
||||
if QuestieTooltips.lookupByKey[key] then
|
||||
local playerName = UnitName("player")
|
||||
for k, tooltip in pairs(QuestieTooltips.lookupByKey[key]) do
|
||||
for k, tooltip in next, QuestieTooltips.lookupByKey[key] do
|
||||
if tooltip.name then
|
||||
if Questie.db.profile.showQuestsInNpcTooltip then
|
||||
local questString = QuestieLib:GetColoredQuestName(tooltip.questId, Questie.db.profile.enableTooltipsQuestLevel, true, true)
|
||||
@@ -376,11 +382,11 @@ function QuestieTooltips:GetTooltip(key)
|
||||
|
||||
local playerName = UnitName("player")
|
||||
|
||||
for questId, questData in pairs(tooltipData) do
|
||||
for questId, questData in next, tooltipData do
|
||||
local hasObjective = false
|
||||
local tempObjectives = {}
|
||||
for _, playerList in pairs(questData.objectivesText or {}) do
|
||||
for objectivePlayerName, objectiveInfo in pairs(playerList) do
|
||||
for _, playerList in next, questData.objectivesText or {} do
|
||||
for objectivePlayerName, objectiveInfo in next, playerList do
|
||||
local playerInfo = QuestiePlayer:GetPartyMemberByName(objectivePlayerName)
|
||||
local playerColor
|
||||
local playerType = ""
|
||||
@@ -412,7 +418,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
end
|
||||
if hasObjective then
|
||||
tinsert(tooltipLines, questData.title);
|
||||
for _, text in pairs(tempObjectives) do
|
||||
for _, text in next, tempObjectives do
|
||||
tinsert(tooltipLines, text);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -42,7 +42,7 @@ local function _WipeTable(t)
|
||||
if wipe then
|
||||
wipe(t)
|
||||
else
|
||||
for k in pairs(t) do
|
||||
for k in next, t do
|
||||
t[k] = nil
|
||||
end
|
||||
end
|
||||
@@ -151,26 +151,26 @@ local function _TryBuildNpcQuestStarterDrops()
|
||||
local npcDrops = QuestieDB.QueryItemSingle(itemId, "npcDrops")
|
||||
if npcDrops and type(npcDrops) == "table" then
|
||||
local itemName = QuestieDB.QueryItemSingle(itemId, "name")
|
||||
for _, npcId in pairs(npcDrops) do
|
||||
for _, npcId in next, npcDrops do
|
||||
local list = _npcQuestStarterDrops[npcId]
|
||||
if not list then
|
||||
list = {}
|
||||
_npcQuestStarterDrops[npcId] = list
|
||||
end
|
||||
list[#list + 1] = { itemId = itemId, questId = tonumber(questId), name = itemName }
|
||||
list[table.getn(list) + 1] = { itemId = itemId, questId = tonumber(questId), name = itemName }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Iterate all items from compiled database
|
||||
for itemId, _ in pairs(pointers) do
|
||||
for itemId, _ in next, pointers do
|
||||
processItem(itemId)
|
||||
end
|
||||
|
||||
-- Also iterate Ascension override items (they don't have pointers)
|
||||
if QuestieDB.itemDataOverrides and type(QuestieDB.itemDataOverrides) == "table" then
|
||||
for itemId, _ in pairs(QuestieDB.itemDataOverrides) do
|
||||
for itemId, _ in next, QuestieDB.itemDataOverrides do
|
||||
processItem(itemId)
|
||||
end
|
||||
end
|
||||
@@ -199,7 +199,7 @@ local function _AddQuestStarterDropsToTooltip(npcId)
|
||||
if not _npcQuestStarterDrops then return end
|
||||
|
||||
local drops = _npcQuestStarterDrops[npcId]
|
||||
if not drops or #drops == 0 then return end
|
||||
if not drops or table.getn(drops) == 0 then return end
|
||||
|
||||
if _TooltipHasQuestStarterLine(GameTooltip) then
|
||||
return
|
||||
@@ -207,19 +207,23 @@ local function _AddQuestStarterDropsToTooltip(npcId)
|
||||
|
||||
-- Filter drops to only show items where player doesn't have the quest yet
|
||||
local filteredDrops = {}
|
||||
for _, info in ipairs(drops) do
|
||||
local dropsCount = table.getn(drops)
|
||||
for i = 1, dropsCount do
|
||||
local info = drops[i]
|
||||
if info.questId and (not _PlayerHasQuest(info.questId)) then
|
||||
filteredDrops[#filteredDrops + 1] = info
|
||||
filteredDrops[table.getn(filteredDrops) + 1] = info
|
||||
end
|
||||
end
|
||||
|
||||
if #filteredDrops == 0 then
|
||||
if table.getn(filteredDrops) == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
GameTooltip:AddLine(QUEST_START_LINE)
|
||||
|
||||
for _, info in ipairs(filteredDrops) do
|
||||
local filteredCount = table.getn(filteredDrops)
|
||||
for i = 1, filteredCount do
|
||||
local info = filteredDrops[i]
|
||||
local itemId = info.itemId
|
||||
local questId = info.questId
|
||||
|
||||
@@ -256,9 +260,8 @@ function _QuestieTooltips:AddUnitDataToTooltip()
|
||||
guid = UnitGUID("mouseover");
|
||||
end
|
||||
|
||||
local type, _, _, _, _, npcId, _ = strsplit("-", guid or "");
|
||||
|
||||
if name and (type == "Creature" or type == "Vehicle") and (
|
||||
local guidType, _, _, _, _, npcId, _ = strsplit("-", guid or "");
|
||||
if name and (guidType == "Creature" or guidType == "Vehicle") and (
|
||||
name ~= QuestieTooltips.lastGametooltipUnit or
|
||||
(not QuestieTooltips.lastGametooltipCount) or
|
||||
_QuestieTooltips:CountTooltip() < QuestieTooltips.lastGametooltipCount or
|
||||
@@ -273,7 +276,7 @@ function _QuestieTooltips:AddUnitDataToTooltip()
|
||||
if Questie.db.profile.enableTooltipsNPCID == true then
|
||||
GameTooltip:AddDoubleLine("NPC ID", "|cFFFFFFFF" .. npcId .. "|r")
|
||||
end
|
||||
for _, v in pairs(tooltipData) do
|
||||
for _, v in next, tooltipData do
|
||||
GameTooltip:AddLine(v)
|
||||
end
|
||||
else
|
||||
@@ -325,7 +328,7 @@ function _QuestieTooltips:AddItemDataToTooltip()
|
||||
if Questie.db.profile.enableTooltipsItemID == true then
|
||||
GameTooltip:AddDoubleLine("Item ID", "|cFFFFFFFF" .. itemId .. "|r")
|
||||
end
|
||||
for _, v in pairs(tooltipData) do
|
||||
for _, v in next, tooltipData do
|
||||
self:AddLine(v)
|
||||
end
|
||||
end
|
||||
@@ -354,7 +357,7 @@ function _QuestieTooltips:AddObjectDataToTooltip(name)
|
||||
end
|
||||
|
||||
local alreadyAddedObjectiveLines = {}
|
||||
for _, gameObjectId in pairs(lookup) do
|
||||
for _, gameObjectId in next, lookup do
|
||||
local tooltipData = QuestieTooltips:GetTooltip("o_" .. gameObjectId);
|
||||
|
||||
if type(gameObjectId) == "number" and tooltipData then
|
||||
@@ -365,7 +368,7 @@ function _QuestieTooltips:AddObjectDataToTooltip(name)
|
||||
|
||||
if tooltipData[2] then
|
||||
-- Quest has objectives
|
||||
for index, line in pairs(tooltipData) do
|
||||
for index, line in next, tooltipData do
|
||||
if index > 1 and (not alreadyAddedObjectiveLines[line]) then -- skip the first entry, it's the title
|
||||
local _, _, acquired, needed = string.find(line, "(%d+)/(%d+)")
|
||||
-- We need "tonumber", because acquired can contain parts of the color string
|
||||
|
||||
Reference in New Issue
Block a user