WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Group Invite Volume Increase (https://www.wowinterface.com/forums/showthread.php?t=59419)

vx_odessa_xv 12-24-22 02:12 PM

Group Invite Volume Increase
 
@Kanegasi - Hey, I'm just contacting you cause I saw your posts helping people with changing out event sounds and sound file volumes and was curious how I would go about the same, altering the sound volume of when I receive an invite to a group. Not a LFR queue pop but just a flat party invite from another player.

The sound file used when you are invited is this one here linked below, but looking at your scripting in that forum post I can't make heads or tails of how to put things together for an lua file that would instead make this invite to a group/party alert sound play at a 100% master volume

https://www.wowhead.com/sound=139828...ync-readycheck

I hope this is something you can help me with and I'll hear back from you soon.

vx_odessa_xv 12-26-22 03:32 PM

Might anyone be able to assist with this? I had at one time had a pinned together bit that was working properly to achieve this "invited to group triggers at 100% master volume" I am currently after, but I can't make heads or tails of this here in the lua I tried to alter with it below after the Dragonflight expansion drop to get it functional once again.

Lua Code:
  1. local entries={
  2.     [139828]=1 -- UIPartySyncReadyCheck
  3. }
  4.  
  5. local pool,f={},CreateFrame('frame') f.handles={} f.lastchan={} f.nodupeids={} f.nodupehandles={}
  6. function f.pool(t,i)
  7.     if i then pool[i]:SetScript('OnUpdate',nil) pool[i].t=nil return end
  8.     for i=1,#pool do
  9.         if pool[i] and not pool[i].t then pool[i].t={i=i,t=t} return i end
  10.     end
  11.     tinsert(pool,CreateFrame('frame')) i=#pool pool[i].t={i=i,t=t} return i
  12. end
  13. f:SetScript('OnEvent',function(_,_,handle)
  14.     if f.nodupehandles[handle] then
  15.         f.nodupeids[f.nodupehandles[handle]]=nil
  16.         f.nodupehandles[handle]=nil
  17.     end
  18.     if f.handles[handle] then
  19.         if f[f.handles[handle]] and f.lastchan[f.handles[handle]]==handle then
  20.             SetCVar(f.handles[handle],f[f.handles[handle]])
  21.             f[f.handles[handle]]=nil
  22.         end
  23.         f.handles[handle]=nil
  24.     end
  25. end)
  26. f:RegisterEvent('SOUNDKIT_FINISHED')
  27. hooksecurefunc('PlaySound',function(id,channel,nodupe,_,_,_,_,own)
  28.     if not own and not f.nodupeids[id] and entries[id] then
  29.         local _,handle=PlaySound(64,'Master',false)
  30.         if handle then
  31.             StopSound(handle) StopSound(handle-1)
  32.             channel=(not channel and 'Master') or (strlower(channel)=='sfx' and 'SFX') or strlower(channel):gsub('^%a',strupper)
  33.             local cvar='Sound_'..channel..'Volume'
  34.             pool[f.pool({id,channel,nodupe,cvar})]:SetScript('OnUpdate',function(self)
  35.                 local handle=nil
  36.                 if type(entries[self.t.t[1]])=="string" then
  37.                     _,handle=PlaySoundFile(entries[self.t.t[1]],self.t.t[2],self.t.t[3])
  38.                 else
  39.                     _,handle=PlaySound(self.t.t[1],self.t.t[2],self.t.t[3],true,nil,nil,nil,true)
  40.                 end
  41.                 if type(entries[self.t.t[1]])=="number" and handle then
  42.                     if self.t.t[3]~=false then
  43.                         f.nodupeids[self.t.t[1]]=handle
  44.                         f.nodupehandles[handle]=self.t.t[1]
  45.                     end
  46.                     f.lastchan[self.t.t[4]]=handle
  47.                     f.handles[handle]=self.t.t[4]
  48.                     if not f[self.t.t[4]] then
  49.                         f[self.t.t[4]]=GetCVar(self.t.t[4])
  50.                         if f[self.t.t[4]] then SetCVar(self.t.t[4],entries[self.t.t[1]]) end
  51.                     end
  52.                 end
  53.                 f.pool('',self.t.i)
  54.             end)
  55.         end
  56.     end
  57. end)


All times are GMT -6. The time now is 09:45 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI