diff options
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 540bd0d8586..854ccc7e67a 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -55,6 +55,7 @@ #include "AuctionHouseBot.h" #include "CreatureEventAIMgr.h" #include "DBCEnums.h" +#include "TimeMgr.h" bool ChatHandler::HandleAHBotOptionsCommand(const char *args) { @@ -4614,7 +4615,7 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/) uint32 Entry = target->GetEntry(); CreatureInfo const* cInfo = target->GetCreatureInfo(); - int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL); + int32 curRespawnDelay = target->GetRespawnTimeEx()-sGameTime.GetGameTime(); if(curRespawnDelay < 0) curRespawnDelay = 0; std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true); @@ -5974,7 +5975,7 @@ bool ChatHandler::HandleBanInfoHelper(uint32 accountid, char const* accountname) time_t unbandate = time_t(fields[3].GetUInt64()); bool active = false; - if(fields[2].GetBool() && (fields[1].GetUInt64() == (uint64)0 ||unbandate >= time(NULL)) ) + if(fields[2].GetBool() && (fields[1].GetUInt64() == (uint64)0 ||unbandate >= sGameTime.GetGameTime()) ) active = true; bool permanent = (fields[1].GetUInt64() == (uint64)0); std::string bantime = permanent?GetTrinityString(LANG_BANINFO_INFINITE):secsToTimeString(fields[1].GetUInt64(), true); @@ -6824,7 +6825,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/) for (Player::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr) { InstanceSave *save = itr->second.save; - std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); + std::string timeleft = GetTimeString(save->GetResetTime() - sGameTime.GetGameTime()); PSendSysMessage("map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); counter++; } @@ -6840,7 +6841,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/) for (Group::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr) { InstanceSave *save = itr->second.save; - std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); + std::string timeleft = GetTimeString(save->GetResetTime() - sGameTime.GetGameTime()); PSendSysMessage("map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); counter++; } } @@ -6869,7 +6870,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args) if(itr->first != player->GetMapId()) { InstanceSave *save = itr->second.save; - std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); + std::string timeleft = GetTimeString(save->GetResetTime() - sGameTime.GetGameTime()); PSendSysMessage("unbinding map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); player->UnbindInstance(itr, Difficulty(i)); counter++; |