Skip to content

Commit

Permalink
Core/GameEvent: Fix game event end time duration overwriting (Trinity…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jildor committed Aug 16, 2024
1 parent 5f58619 commit bcb3ffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/game/Events/GameEventMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool GameEventMgr::StartEvent(uint16 event_id, bool overwrite)
{
mGameEvent[event_id].start = GameTime::GetGameTime();
if (data.end <= data.start)
data.end = data.start + data.length;
data.end = data.start + data.length * MINUTE;
}

// When event is started, set its worldstate to current time
Expand Down Expand Up @@ -186,7 +186,7 @@ void GameEventMgr::StopEvent(uint16 event_id, bool overwrite)
{
data.start = GameTime::GetGameTime() - data.length * MINUTE;
if (data.end <= data.start)
data.end = data.start + data.length;
data.end = data.start + data.length * MINUTE;
}
else if (serverwide_evt)
{
Expand Down

0 comments on commit bcb3ffa

Please sign in to comment.