WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Macro Command to remove error text and sound? (https://www.wowinterface.com/forums/showthread.php?t=52181)

Jynks 04-11-15 03:48 PM

Macro Command to remove error text and sound?
 
Hey there.. can anyone remember the text for removing the error text as well as the sound "i can't cast that that" type stuff you can put in a macro?

Petrah 04-11-15 10:30 PM

Is that something different than the option in System/Sound "Error Speech"?

karmamuscle 04-12-15 12:30 AM

Is this what you're looking for?

Code:

/run sfx=GetCVar("Sound_EnableSFX");
/console Sound_EnableSFX 0
/cast Spell
/run UIErrorsFrame:Clear()
/run SetCVar("Sound_EnableSFX",sfx);


Jynks 04-12-15 02:55 AM

thanks guys!

SDPhantom 04-14-15 03:10 PM

I've known this for a while and find it funny that Blizzard never actually finished registering these commands.

ChatFrame.lua:2320
Code:

-- easier method to turn on/off errors for macros
SlashCmdList["UI_ERRORS_OFF"] = function(msg)
        UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE");
        SetCVar("Sound_EnableSFX", "0");
end

SlashCmdList["UI_ERRORS_ON"] = function(msg)
        UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE");
        SetCVar("Sound_EnableSFX", "1");
end


Seerah 04-14-15 06:58 PM

Ugh, registering/unregistering the event is the awful way to do it. :p

Petrah 04-15-15 03:12 AM

I agree with Seerah. Disable the sound for error text from within the games system settings. An addon that allows you to choose which error texts you wish to remove may be a better option for you.


http://www.curse.com/addons/wow/errorfilter

(It is hosted here, but not updated... so I linked to the updated version on Curse)

SDPhantom 04-17-15 02:22 PM

Quote:

Originally Posted by Seerah (Post 308167)
Ugh, registering/unregistering the event is the awful way to do it. :p

It is Blizzard code we're looking at. What else would you expect from them? I just think it's funny they didn't finish implementing it and left these functions orphaned in the command list.

In my custom dev addon, I completed their registration by linking them in the hash table with /erron and /erroff.
Code:

hash_SlashCmdList["/ERROFF"]=SlashCmdList.UI_ERRORS_OFF;
hash_SlashCmdList["/ERRON"]=SlashCmdList.UI_ERRORS_ON;



Note: Trying to register SLASH_<Tag># globals after FrameXML loads wouldn't work as they are processed into the hash file and the entries of SlashCmdList are moved into its metatable. The code I posted just provides the missing action of pushing pointers of the functions into the hash table and associating them with their slash commands. Also note the index needs to be uppercase as Blizzard code transforms typed commands to uppercase in order to perform case-insensitive lookups.


All times are GMT -6. The time now is 11:33 PM.

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