aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-23 08:04:10 +0100
committern0n4m3 <none@none>2009-12-23 08:04:10 +0100
commit3fe0bc52541d8cdf4fa992d9b8b3101cde5848f0 (patch)
treebe5871dc19f69f4555d9ffa7c57e5d964b8e60e0 /src/game/BattleGround.cpp
parent7ea2510980d4b1c96f0341e9c8b9d5784862dc72 (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/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 554f8555627..ec8bccd535f 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -35,6 +35,7 @@
#include "Object.h"
#include "SpellAuras.h"
#include "Util.h"
+#include "TimeMgr.h"
namespace Trinity
{
@@ -259,7 +260,7 @@ void BattleGround::Update(uint32 diff)
BattleGroundPlayerMap::iterator itr = m_Players.find(*(m_OfflineQueue.begin()));
if (itr != m_Players.end())
{
- if (itr->second.OfflineRemoveTime <= sWorld.GetGameTime())
+ if (itr->second.OfflineRemoveTime <= sGameTime.GetGameTime())
{
RemovePlayerAtLeave(itr->first, true, true);// remove player from BG
m_OfflineQueue.pop_front(); // remove from offline queue
@@ -1266,7 +1267,7 @@ void BattleGround::EventPlayerLoggedOut(Player* player)
{
// player is correct pointer, it is checked in WorldSession::LogoutPlayer()
m_OfflineQueue.push_back(player->GetGUID());
- m_Players[player->GetGUID()].OfflineRemoveTime = sWorld.GetGameTime() + MAX_OFFLINE_TIME;
+ m_Players[player->GetGUID()].OfflineRemoveTime = sGameTime.GetGameTime() + MAX_OFFLINE_TIME;
if (GetStatus() == STATUS_IN_PROGRESS)
{
if (isBattleGround())