feat: add GetNumAddOns and GetAddOnInfo for addon introspection

- GetNumAddOns() — returns count of loaded addons
- GetAddOnInfo(indexOrName) — returns name, title, notes, loadable

Addon info is stored in the Lua registry from the .toc directives
and populated before addon files execute. Useful for addon managers
and compatibility checks between addons.

Total WoW API: 33 functions.
This commit is contained in:
Kelsi 2026-03-20 13:07:45 -07:00
parent 66431ab762
commit ee3f60a1bb
3 changed files with 77 additions and 0 deletions

View file

@ -52,6 +52,7 @@ void AddonManager::scanAddons(const std::string& addonsPath) {
}
void AddonManager::loadAllAddons() {
luaEngine_.setAddonList(addons_);
int loaded = 0, failed = 0;
for (const auto& addon : addons_) {
if (loadAddon(addon)) loaded++;