mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
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
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "WaypointMovementGenerator.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "TimeMgr.h"
|
||||
|
||||
void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
@@ -154,7 +155,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());
|
||||
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(GetPlayer()->GetMapId(),diff))
|
||||
{
|
||||
uint32 timeleft = timeReset - time(NULL);
|
||||
uint32 timeleft = timeReset - sGameTime.GetGameTime();
|
||||
GetPlayer()->SendInstanceResetWarning(GetPlayer()->GetMapId(), diff, timeleft);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user