|
231 | 231 | for _, f in ipairs(frames) do if rawget(f, "unit") == "nameplate1" and f._shown then onForbidden = true end end |
232 | 232 | print("quest: forbidden plate left alone", not onForbidden) |
233 | 233 | profile.hideInInstances = true |
| 234 | + rawset(mobPlate, "IsForbidden", nil) |
| 235 | + |
| 236 | + -- Two quests, same mob: the tooltip lists only quest A, already done (3/3); quest B still |
| 237 | + -- needs the mob (2/8) but isn't in the tooltip. The icon must show, with B's count. |
| 238 | + env.C_TooltipInfo = { GetUnit = function() |
| 239 | + return { lines = { |
| 240 | + { type = 17, leftText = "Quest A" }, |
| 241 | + { type = 8, leftText = "Kobold Vermin slain: 3/3", completed = true }, |
| 242 | + } } |
| 243 | + end } |
| 244 | + env.C_QuestLog.GetNumQuestLogEntries = function() return 1 end |
| 245 | + env.C_QuestLog.GetQuestIDForLogIndex = function() return 202 end |
| 246 | + env.C_QuestLog.GetTitleForQuestID = function() return "Quest B" end |
| 247 | + env.C_QuestLog.GetQuestObjectives = function() return { { text = "Kobold Vermin slain: 2/8", finished = false } } end |
| 248 | + try("multiquest scan", eventFrame._scripts.OnEvent, eventFrame, "QUEST_LOG_UPDATE") |
| 249 | + try("multiquest plate", eventFrame._scripts.OnEvent, eventFrame, "NAME_PLATE_UNIT_REMOVED", "nameplate1") |
| 250 | + try("multiquest plate", eventFrame._scripts.OnEvent, eventFrame, "NAME_PLATE_UNIT_ADDED", "nameplate1") |
| 251 | + local multiCount |
| 252 | + for _, f in ipairs(frames) do |
| 253 | + if rawget(f, "unit") == "nameplate1" and f._shown then multiCount = rawget(f, "progressValue") end |
| 254 | + end |
| 255 | + print("quest: second quest on the same mob shows", multiCount) |
| 256 | + env.C_TooltipInfo = nil |
| 257 | + env.C_QuestLog.GetNumQuestLogEntries = function() return 0 end |
234 | 258 | env.UnitExists = function() return false end |
235 | 259 | env.C_NamePlate.GetNamePlates = function() return {} end |
236 | 260 | env.C_NamePlate.GetNamePlateForUnit = function() return nil end |
|
0 commit comments