mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: add /reload command to re-initialize addon system
Add AddonManager::reload() which saves all SavedVariables, shuts down the Lua VM, re-initializes it, rescans .toc files, and reloads all addons. Wire /reload, /reloadui, /rl slash commands that call reload() and fire VARIABLES_LOADED + PLAYER_LOGIN + PLAYER_ENTERING_WORLD lifecycle events. Essential for addon development and troubleshooting.
This commit is contained in:
parent
23ebfc7e85
commit
21ead2aa4b
3 changed files with 51 additions and 0 deletions
|
|
@ -27,9 +27,14 @@ public:
|
|||
|
||||
void saveAllSavedVariables();
|
||||
|
||||
/// Re-initialize the Lua VM and reload all addons (used by /reload).
|
||||
bool reload();
|
||||
|
||||
private:
|
||||
LuaEngine luaEngine_;
|
||||
std::vector<TocFile> addons_;
|
||||
game::GameHandler* gameHandler_ = nullptr;
|
||||
std::string addonsPath_;
|
||||
|
||||
bool loadAddon(const TocFile& addon);
|
||||
std::string getSavedVariablesPath(const TocFile& addon) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue