Streamlining loading functions for server startup
- Added a couple of timer outputs - Improved code consistency between loading functions - Progess bars should look and behave similar on all OS now (sLog.outString() is not needed anymore to replace the progress bar in log files) --HG-- branch : trunk
This commit is contained in:
@@ -76,6 +76,8 @@ Weather* WeatherMgr::AddWeather(uint32 zone_id)
|
||||
|
||||
void WeatherMgr::LoadWeatherData()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
@@ -84,11 +86,9 @@ void WeatherMgr::LoadWeatherData()
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outErrorDb(">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
|
||||
sLog.outString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -134,8 +134,8 @@ void WeatherMgr::LoadWeatherData()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog.outString(">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u weather definitions", count);
|
||||
}
|
||||
|
||||
void WeatherMgr::Update(uint32 diff)
|
||||
|
||||
Reference in New Issue
Block a user