@@ -51,6 +51,7 @@ local DEFAULTS = {
5151 minimap = true , -- minimap button
5252 minimapAngle = 220 , -- its position around the minimap (degrees)
5353 sound = true , -- play a sound when a quest objective completes
54+ hideInInstances = true , -- no icons inside dungeons and raids
5455 doneCheck = true , -- an icon that stops being needed turns into a check mark, then fades
5556 readyAlert = true , -- chat line when every objective of a quest is done
5657 minimapSummary = true , -- the minimap button's tooltip lists the open objectives
@@ -646,9 +647,16 @@ local function UpdateCombatAlpha()
646647 for _ , f in pairs (icons ) do f :SetAlpha (alpha ) end
647648end
648649
650+ -- Inside a dungeon or raid (party / raid instance), with "Hide in dungeons and raids" on.
651+ local function InstanceHidden ()
652+ if not (db .hideInInstances and IsInInstance ) then return false end
653+ local inside , kind = IsInInstance ()
654+ return inside and (kind == " party" or kind == " raid" ) or false
655+ end
656+
649657local function Refresh (unit )
650658 local plate = C_NamePlate and C_NamePlate .GetNamePlateForUnit (unit )
651- if db .active and db .enabled and plate then
659+ if db .active and db .enabled and plate and not InstanceHidden () then
652660 local needed , kind , progress = IsQuestMob (unit )
653661 if needed then ShowIcon (unit , plate , kind , progress ) return end
654662 if not UnitIsDead (unit ) then HideOrComplete (unit ) return end
@@ -840,7 +848,7 @@ local function UpdateGate(isQuest)
840848end
841849
842850function RefreshSoftObject ()
843- if not ObjectsOn () then
851+ if not ObjectsOn () or InstanceHidden () then
844852 UpdateGate (false )
845853 HideIcon (SOFT )
846854 return
@@ -1891,7 +1899,7 @@ local ICON_KEYS = { "style", "bounce", "bounceHeight", "bounceSpeed", "glow", "g
18911899local PROGRESS_KEYS = { " progress" , " objectProgress" , " progressPulse" , " progressAttach" , " progressFloat" , " progressSize" , " progressFont" ,
18921900 " progressOutline" , " progressColor" , " progressFormat" , " progressShadow" , " progressX" , " progressY" }
18931901local BEHAVIOR_KEYS = { " colorByType" , " combat" , " minimap" , " minimapAngle" , " sound" , " soundChoice" ,
1894- " doneCheck" , " readyAlert" , " minimapSummary" }
1902+ " hideInInstances " , " doneCheck" , " readyAlert" , " minimapSummary" }
18951903
18961904local function ResetKeys (keys )
18971905 for _ , key in ipairs (keys ) do db [key ] = DEFAULTS [key ] end
@@ -2091,6 +2099,7 @@ local function BuildBehaviorTab(tab)
20912099 GateCheck (On .AddonOn , AddCheck (tab , " READY_ALERT" , " READY_ALERT_TIP" , " readyAlert" , COL1 , TOP - 208 ))
20922100 GateCheck (function () return db .minimap end ,
20932101 AddCheck (tab , " MINIMAP_SUMMARY" , " MINIMAP_SUMMARY_TIP" , " minimapSummary" , COL2 , TOP - 160 ))
2102+ GateCheck (On .AnyIconOn , AddCheck (tab , " HIDE_INSTANCES" , " HIDE_INSTANCES_TIP" , " hideInInstances" , COL2 , TOP - 208 ))
20942103end
20952104
20962105-- Profiles tab in the Ace3 layout players know from RareScanner and many others: intro, reset,
0 commit comments