Quote:
Originally Posted by Rainrider
(Post 296298)
I also don't find GetAddOnEnableState particularly useful. You could get this info from GetAddOnInfo's fifth return (named "reason" in previous posts in this thread). If reason is not "DISABLED" then the addon is enabled.
|
GetAddOnEnableState is theoretically useful; while GetAddOnInfo only tells you whether the addon is enabled on the currect character, with GetAddOnEnableState you can get a bit more detail:
Addon is enabled on all characters:
GetAddOnEnableState(nil, index) => 2
GetAddOnEnableState("Charname", index) => 2
Addon is only enabled on some characters, including the current one:
GetAddOnEnableState(nil, index) => 1
GetAddOnEnableState("Charname", index) => 2
Addon is only enabled on some characters, but not on the current one:
GetAddOnEnableState(nil, index) => 1
GetAddOnEnableState("Charname", index) => 0
Addon is not enabled on any characters:
GetAddOnEnableState(nil, index) => 0
GetAddOnEnableState("Charname", index) => 0
The only real use I can think of for this information is in addon managers; the new in-game Blizzard addon manager is the same one that you can use at the character screen, including the "all/character" dropdown, though you can only choose "All" or the current character when using it in-game.
Quote:
Originally Posted by Rainrider
(Post 296298)
Apart from that the old behavior of GetAddOnInfo is easily achieved by creating an addon_name = addon_index dictionary, isn't it?
|
Yeah, but that's still annoying, and requires a significant increase in code clutter and complexity for no apparent reason.
LoadAddOn can still handle names, so it's not like they just decided to remove the ability to identify addons by name on the C side. They just disabled the functionality for certain API functions because ... well, because.
If all they wanted was to stop people from being able to disable the Blizzard_* addons, they should have just done that instead of breaking the whole API.