mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: add zone change and login sequence events for Lua addons
Fire ZONE_CHANGED_NEW_AREA and ZONE_CHANGED when worldStateZoneId changes in SMSG_INIT_WORLD_STATES. Add VARIABLES_LOADED and PLAYER_LOGIN events in the addon loading sequence (before PLAYER_ENTERING_WORLD), and fire PLAYER_ENTERING_WORLD on subsequent world entries (teleport, instance). Enables zone-aware addons like DBM and quest trackers.
This commit is contained in:
parent
5eaf738b66
commit
66f779c186
2 changed files with 17 additions and 1 deletions
|
|
@ -5134,6 +5134,11 @@ void Application::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
if (addonManager_ && !addonsLoaded_) {
|
||||
addonManager_->loadAllAddons();
|
||||
addonsLoaded_ = true;
|
||||
addonManager_->fireEvent("VARIABLES_LOADED");
|
||||
addonManager_->fireEvent("PLAYER_LOGIN");
|
||||
addonManager_->fireEvent("PLAYER_ENTERING_WORLD");
|
||||
} else if (addonManager_ && addonsLoaded_) {
|
||||
// Subsequent world entries (e.g. teleport, instance entry)
|
||||
addonManager_->fireEvent("PLAYER_ENTERING_WORLD");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue