Changing spell sound effect? - WoWInterface
Thread Tools Display Modes
04-02-20, 10:46 PM   #1
A Kobold Labourer
Join Date: Apr 2020
Posts: 1
Changing spell sound effect?

Title. I really like sub rogue’ Shuriken Storm sound effect, is there anyway for me ro replace Fan of Knives sound effect with Shuriken Storm', or maybe even any custom sound on my PC?
Thanks for your help
  Reply With Quote
04-03-20, 01:27 AM   #2
A Frostmaul Preserver
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 256
As I have already told you , you could try to hook PlaySound() as described here: https://www.wowinterface.com/forums/...688#post325688

I have not tried it myself, but this is how I would go about it. First you write:

hooksecurefunc("PlaySound", function(...)
  local id, channel, forceNoDuplicates, runFinishCallback = ...
  print("PlaySound", id)
This should print the sound id of any sound played.
Thus, you can note down the sound ids of Shuriken Storm and Fan of Knives.

Then you make a function above your hook function:
local function StopLastSound()
  -- Play some sound to get a handle.
  local _, handle = PlaySound(SOUNDKIT[next(SOUNDKIT)], "SFX", false)
  if handle then
    -- Stop this sound and the previous.

And change your hook function to
hooksecurefunc("PlaySound", function(...)
  local id = ...
  if id == <Fan of Knives id> then
    PlaySound(<Shuriken Storm id>)
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Changing spell sound effect?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off