diff options
author | n0n4m3 <none@none> | 2009-12-23 08:04:10 +0100 |
---|---|---|
committer | n0n4m3 <none@none> | 2009-12-23 08:04:10 +0100 |
commit | 3fe0bc52541d8cdf4fa992d9b8b3101cde5848f0 (patch) | |
tree | be5871dc19f69f4555d9ffa7c57e5d964b8e60e0 /src/game/Level0.cpp | |
parent | 7ea2510980d4b1c96f0341e9c8b9d5784862dc72 (diff) |
Replaced time(NULL) on sGameTime.GetGameTime() this is used for better performance.
Original Timer.h divided into 2 parts. Shared project has no need to know about GameTime Singleton.
2 Identical structures with different types are now replaced with one generic templated structure and 2 typedefs.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level0.cpp')
-rw-r--r-- | src/game/Level0.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index cdfa3517bfa..820478bee8e 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -30,6 +30,7 @@ #include "SystemConfig.h" #include "revision.h" #include "Util.h" +#include "TimeMgr.h" bool ChatHandler::HandleHelpCommand(const char* args) { @@ -99,22 +100,14 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/) uint32 queuedClientsNum = sWorld.GetQueuedSessionCount(); uint32 maxActiveClientsNum = sWorld.GetMaxActiveSessionCount(); uint32 maxQueuedClientsNum = sWorld.GetMaxQueuedSessionCount(); - std::string uptime = secsToTimeString(sWorld.GetUptime()); + std::string str = secsToTimeString(sGameTime.GetUptime()); uint32 updateTime = sWorld.GetUpdateTime(); PSendSysMessage(_FULLVERSION); - //if(m_session) - // full = _FULLVERSION(REVISION_DATE,REVISION_TIME,"|cffffffff|Hurl:" REVISION_ID "|h" REVISION_ID "|h|r"); - //else - // full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_ID); - - //SendSysMessage(full); - //PSendSysMessage(LANG_USING_SCRIPT_LIB,sWorld.GetScriptsVersion()); - //PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion()); - //PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion()); + PSendSysMessage(LANG_CONNECTED_PLAYERS, PlayersNum, MaxPlayersNum); PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum); - PSendSysMessage(LANG_UPTIME, uptime.c_str()); + PSendSysMessage(LANG_UPTIME, str.c_str()); PSendSysMessage("Update time diff: %u.", updateTime); return true; |