Quantcast WoWInterface - View Single Post - PlaySound() behavior changed in 7.3.0?
View Single Post
06-30-17, 11:06 AM   #7
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
They're fully converting to numbers from strings, not entirely unlike what they're trying with textures -- it looks like they retired the old PlaySound() and reused the name for PlaySoundKitID().

PlaySoundKitID() -- Removed
PlaySound() -- only accepts numbers
SOUNDKIT{} -- table with numbers, found in SoundKitConstants.lua (example linked in original post) (nb: it may not be complete)

Lua Code:
  1. PlaySound(1001)
or
Lua Code:
  1. PlaySound(SOUNDKIT.SOUNDKIT_TABLE_ENTRY)

For the most part, the SOUNDKIT entries are similar to the text names though with more underscores.

If you want to seamlessly update, you can do what arith pointed out in the latest Ace3:
Lua Code:
  1. PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856)
alternatively
Lua Code:
  1. PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
I've converted my code to the latter and it runs w/o error.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote