mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
[10687] UInt32 timer class copies instead using time_t timers for mstime cases.
Also cleanup weather update code and some random code cleanups.
This commit is contained in:
parent
478bf3b367
commit
464908f453
15 changed files with 87 additions and 67 deletions
|
|
@ -35,15 +35,13 @@ Weather::Weather(uint32 zone, WeatherZoneChances const* weatherChances) : m_zone
|
|||
m_type = WEATHER_TYPE_FINE;
|
||||
m_grade = 0;
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_WEATHER, "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)) );
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_WEATHER, "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)) );
|
||||
}
|
||||
|
||||
/// Launch a weather update
|
||||
bool Weather::Update(time_t diff)
|
||||
{
|
||||
if (m_timer.GetCurrent()>=0)
|
||||
m_timer.Update(diff);
|
||||
else m_timer.SetCurrent(0);
|
||||
m_timer.Update(diff);
|
||||
|
||||
///- If the timer has passed, ReGenerate the weather
|
||||
if(m_timer.Passed())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue