Skip to content

Commit

Permalink
Shutdown messages are now sent in blizzlike intervals. Author: Shauren
Browse files Browse the repository at this point in the history
  • Loading branch information
DomGries committed Sep 20, 2011
1 parent 56789be commit 0a773fa
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/game/World.cpp
Expand Up @@ -1862,19 +1862,13 @@ void World::ShutdownMsg(bool show, Player* player)
if(m_ShutdownMask & SHUTDOWN_MASK_IDLE)
return;

///- Display a message every 12 hours, hours, 5 minutes, minute, 5 seconds and finally seconds
if ( show ||
(m_ShutdownTimer < 10) ||
// < 30 sec; every 5 sec
(m_ShutdownTimer<30 && (m_ShutdownTimer % 5 )==0) ||
// < 5 min ; every 1 min
(m_ShutdownTimer<5*MINUTE && (m_ShutdownTimer % MINUTE )==0) ||
// < 30 min ; every 5 min
(m_ShutdownTimer<30*MINUTE && (m_ShutdownTimer % (5*MINUTE))==0) ||
// < 12 h ; every 1 h
(m_ShutdownTimer<12*HOUR && (m_ShutdownTimer % HOUR )==0) ||
// > 12 h ; every 12 h
(m_ShutdownTimer>12*HOUR && (m_ShutdownTimer % (12*HOUR) )==0))
///- Display a message every 12 hours, 1 hour, 5 minutes, 1 minute and 15 seconds
if (show ||
(m_ShutdownTimer < 5 * MINUTE && (m_ShutdownTimer % 15) == 0) || // < 5 min; every 15 sec
(m_ShutdownTimer < 15 * MINUTE && (m_ShutdownTimer % MINUTE) == 0) || // < 15 min; every 1 min
(m_ShutdownTimer < 30 * MINUTE && (m_ShutdownTimer % (5 * MINUTE)) == 0) || // < 30 min; every 5 min
(m_ShutdownTimer < 12 * HOUR && (m_ShutdownTimer % HOUR) == 0) || // < 12 h; every 1 h
(m_ShutdownTimer >= 12 * HOUR && (m_ShutdownTimer % (12 * HOUR)) == 0)) // >= 12 h; every 12 h
{
std::string str = secsToTimeString(m_ShutdownTimer);

Expand Down

0 comments on commit 0a773fa

Please sign in to comment.