From 5b815a899b7ffdbcbd10cf72ae95c269f5587fc7 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 1 Aug 2021 12:19:49 +0200 Subject: [PATCH] librange: disable target sounds during scan --- libs/librange.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/librange.lua b/libs/librange.lua index fdbd772d..e30ca0c3 100644 --- a/libs/librange.lua +++ b/libs/librange.lua @@ -90,6 +90,10 @@ local unitcache = {} -- actual unit-range table local unitdata = { } +-- setup sound function switches +local SoundOn = PlaySound +local SoundOff = function() return end + librange.id = 1 librange:Hide() @@ -141,11 +145,16 @@ librange:SetScript("OnUpdate", function() if TradeFrame and TradeFrame:IsShown() then return nil end if PlayerFrame and PlayerFrame.inCombat then return nil end + _G.PlaySound = SoundOff pfScanActive = true + TargetUnit(unit) unitdata[unit] = IsActionInRange(librange.slot) TargetLastTarget() + + _G.PlaySound = SoundOn pfScanActive = false + this:ReAttack() end