Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (core): Load Order Adjustment GAME_EVENT_START hook #10939

Merged
merged 2 commits into from
Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/server/game/Events/GameEventMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,9 +1235,6 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)

LOG_DEBUG("gameevent", "GameEvent {} \"{}\" started.", event_id, mGameEvent[event_id].description);

//! Run SAI scripts with SMART_EVENT_GAME_EVENT_END
RunSmartAIScripts(event_id, true);

// spawn positive event tagget objects
GameEventSpawn(event_id);
// un-spawn negative event tagged objects
Expand All @@ -1255,6 +1252,9 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
// update bg holiday
UpdateBattlegroundSettings();

//! Run SAI scripts with SMART_EVENT_GAME_EVENT_START
RunSmartAIScripts(event_id, true);

// If event's worldstate is 0, it means the event hasn't been started yet. In that case, reset seasonal quests.
// When event ends (if it expires or if it's stopped via commands) worldstate will be set to 0 again, ready for another seasonal quest reset.
if (sWorld->getWorldState(event_id) == 0)
Expand Down