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/Texts | |
| 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/Texts')
| -rwxr-xr-x | src/server/game/Texts/CreatureTextMgr.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 1445e5bed32..17bf02939b4 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -24,6 +24,8 @@ void CreatureTextMgr::LoadCreatureTexts() { + uint32 oldMSTime = getMSTime(); + mTextMap.clear(); // for reload case mTextRepeatMap.clear(); //reset all currently used temp texts @@ -34,14 +36,14 @@ void CreatureTextMgr::LoadCreatureTexts() { barGoLink bar(1); bar.step(); + sLog.outString(">> Loaded 0 ceature texts. DB table `creature_texts` is empty."); sLog.outString(); - sLog.outString(">> Loaded 0 Creature Texts. DB table `creature_texts` is empty."); return; } barGoLink bar(result->GetRowCount()); - uint32 TextCount = 0; - uint32 CreatureCount = 0; + uint32 textCount = 0; + uint32 creatureCount = 0; do { @@ -88,7 +90,7 @@ void CreatureTextMgr::LoadCreatureTexts() //entry not yet added, add empty TextHolder (list of groups) if (mTextMap.find(temp.entry) == mTextMap.end()) { - ++CreatureCount; + ++creatureCount; CreatureTextHolder TextHolder; mTextMap[temp.entry] = TextHolder; } @@ -101,11 +103,11 @@ void CreatureTextMgr::LoadCreatureTexts() //add the text into our entry's group mTextMap[temp.entry][temp.group].push_back(temp); - ++TextCount; + ++textCount; } while (result->NextRow()); + sLog.outString(">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime)); sLog.outString(); - sLog.outString(">> Loaded %u Creature Texts for %u Creatures.", TextCount, CreatureCount); } uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisperGuid, ChatType msgtype, Language language, TextRange range, uint32 sound, Team team, bool gmOnly, Player* srcPlr) |
