Revert "Core/Event: prevent seasonal quests from resetting at server restart

Port From (https://github.com/TrinityCore/TrinityCore/commit/306022054bec6010a63e80407c8d2f8d672b935b)
This commit is contained in:
hondacrx
2022-07-04 00:52:44 -04:00
parent 52e1b6de31
commit 3a402854aa
+1 -10
View File
@@ -137,8 +137,6 @@ namespace Game
data.end = data.start + data.length;
}
// When event is started, set its worldstate to current time
Global.WorldMgr.SetWorldState(event_id, GameTime.GetGameTime());
return false;
}
else
@@ -174,9 +172,6 @@ namespace Game
RemoveActiveEvent(event_id);
UnApplyEvent(event_id);
// When event is stopped, clean up its worldstate
Global.WorldMgr.SetWorldState(event_id, 0);
if (overwrite && !serverwide_evt)
{
data.start = GameTime.GetGameTime() - data.length * Time.Minute;
@@ -1017,8 +1012,6 @@ namespace Game
}
else
{
// If event is inactive, periodically clean up its worldstate
Global.WorldMgr.SetWorldState(id, 0);
Log.outDebug(LogFilter.Misc, "GameEvent {0} is not active", id);
if (IsActiveEvent(id))
deactivate.Add(id);
@@ -1106,9 +1099,7 @@ namespace Game
//! 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 (Global.WorldMgr.GetWorldState(event_id) == 0)
// check for seasonal quest reset.
Global.WorldMgr.ResetEventSeasonalQuests(event_id);
}