mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Temporary revert 6743 commit. I fix this patch across 1-2 days.
--HG-- branch : trunk
This commit is contained in:
@@ -55,7 +55,6 @@
|
||||
#include "AuctionHouseBot.h"
|
||||
#include "CreatureEventAIMgr.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "TimeMgr.h"
|
||||
|
||||
bool ChatHandler::HandleAHBotOptionsCommand(const char *args)
|
||||
{
|
||||
@@ -4615,7 +4614,7 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/)
|
||||
uint32 Entry = target->GetEntry();
|
||||
CreatureInfo const* cInfo = target->GetCreatureInfo();
|
||||
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-sGameTime.GetGameTime();
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if(curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
|
||||
@@ -5975,7 +5974,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 >= sGameTime.GetGameTime()) )
|
||||
if(fields[2].GetBool() && (fields[1].GetUInt64() == (uint64)0 ||unbandate >= time(NULL)) )
|
||||
active = true;
|
||||
bool permanent = (fields[1].GetUInt64() == (uint64)0);
|
||||
std::string bantime = permanent?GetTrinityString(LANG_BANINFO_INFINITE):secsToTimeString(fields[1].GetUInt64(), true);
|
||||
@@ -6825,7 +6824,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() - sGameTime.GetGameTime());
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
|
||||
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++;
|
||||
}
|
||||
@@ -6841,7 +6840,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() - sGameTime.GetGameTime());
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
|
||||
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++;
|
||||
}
|
||||
}
|
||||
@@ -6870,7 +6869,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args)
|
||||
if(itr->first != player->GetMapId())
|
||||
{
|
||||
InstanceSave *save = itr->second.save;
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - sGameTime.GetGameTime());
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
|
||||
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++;
|
||||
|
||||
Reference in New Issue
Block a user