How to disable Addon for specific Class Spec?
Hi,
I would like to modify https://www.curseforge.com/wow/addon...-mode-targeter to disable the addon for holy paladin and mistweaver monk. Sadly I am a noob in programing. I can read some parts and "addonTable:Disable(OPTIONS)" should disable the addon in the code. Is there any function to detect the mentioned class specs? If so how can I use this and there does it need to be placed in the code? Thx |
I'm looking into this...
I'm looking into this for my MagnetButtons addon. I will let you know when I know... Crazy day, but if you want a go at figuring it out, I will quickly explain what to look for... create a frame and set a script for OnEvent, and RegisterAllEvents()... Somewhere in there lies a way to detect spec changes.
Worst case, use an OnUpdate frame event handler to constantly check your current role, and call some callback function when it changes. |
You'd want to register for PLAYER_SPECIALIZATION_CHANGED
You can get the current spec with GetSpecialization(). Below is an example of usage from wowpedia: Lua Code:
wow.gamepedia.com/API_GetSpecialization |
Nice, thanks! :)
Quote:
|
All times are GMT -6. The time now is 08:46 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI