diff options
| author | leak <none@none> | 2010-12-19 17:06:33 +0100 |
|---|---|---|
| committer | leak <none@none> | 2010-12-19 17:06:33 +0100 |
| commit | fd694cd2324a7e2d61d833a78024b68fd3605053 (patch) | |
| tree | 2fb48411eb25ff627b56786b66c96dd646a30651 /src/server/game/Conditions/DisableMgr.cpp | |
| parent | 9c35e10444b24848e0a909c46727ac2a312ab5de (diff) | |
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
Diffstat (limited to 'src/server/game/Conditions/DisableMgr.cpp')
| -rwxr-xr-x | src/server/game/Conditions/DisableMgr.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index 51e7df69552..17004b3f6a3 100755 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -36,6 +36,8 @@ DisableMgr::~DisableMgr() void DisableMgr::LoadDisables() { + uint32 oldMSTime = getMSTime(); + // reload case for (DisableMap::iterator itr = m_DisableMap.begin(); itr != m_DisableMap.end(); ++itr) itr->second.clear(); @@ -50,9 +52,8 @@ void DisableMgr::LoadDisables() { barGoLink bar(1); bar.step(); - + sLog.outString(">> Loaded 0 disables. DB table `disables` is empty!"); sLog.outString(); - sLog.outString(">> Loaded %u disables", total_count); return; } @@ -182,19 +183,21 @@ void DisableMgr::LoadDisables() } while (result->NextRow()); + sLog.outString(">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime)); sLog.outString(); - sLog.outString(">> Loaded %u disables.", total_count); } void DisableMgr::CheckQuestDisables() { + uint32 oldMSTime = getMSTime(); + uint32 count = m_DisableMap[DISABLE_TYPE_QUEST].size(); if (!count) { barGoLink bar(1); bar.step(); + sLog.outString(">> Checked 0 quest disables."); sLog.outString(); - sLog.outString(">> Done."); return; } @@ -215,8 +218,8 @@ void DisableMgr::CheckQuestDisables() ++itr; } + sLog.outString(">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); sLog.outString(); - sLog.outString(">> Done."); } bool DisableMgr::IsDisabledFor(DisableType type, uint32 entry, Unit const* pUnit) |
