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:
leak
2010-12-19 17:06:33 +01:00
parent 9c35e10444
commit fd694cd232
36 changed files with 2645 additions and 2286 deletions
+4 -4
View File
@@ -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)