Core/GameEvent: Fix OnGameEvent() hook not being called on Creature/GameObject spawned by the event itself

Hook broken since it was added in 1b2c413933
This commit is contained in:
jackpoz
2019-07-31 21:09:35 +02:00
parent 713dd276a7
commit d9ae19d974

View File

@@ -1166,9 +1166,6 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
TC_LOG_INFO("gameevent", "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str());
//! 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
@@ -1185,6 +1182,10 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
UpdateEventNPCVendor(event_id, true);
// 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)