mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)
This reverts commit 51b8773528.
This commit is contained in:
@@ -17,7 +17,6 @@ EndScriptData */
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "GameTime.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
class ban_commandscript : public CommandScript
|
||||
@@ -246,7 +245,7 @@ public:
|
||||
|
||||
time_t unbanDate = time_t(fields[3].GetUInt32());
|
||||
bool active = false;
|
||||
if (fields[2].GetBool() && (fields[1].GetUInt64() == uint64(0) || unbanDate >= GameTime::GetGameTime()))
|
||||
if (fields[2].GetBool() && (fields[1].GetUInt64() == uint64(0) || unbanDate >= time(nullptr)))
|
||||
active = true;
|
||||
bool permanent = (fields[1].GetUInt64() == uint64(0));
|
||||
std::string banTime = permanent ? handler->GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
|
||||
@@ -294,7 +293,7 @@ public:
|
||||
Field* fields = result->Fetch();
|
||||
time_t unbanDate = time_t(fields[3].GetUInt32());
|
||||
bool active = false;
|
||||
if (fields[2].GetUInt8() && (!fields[1].GetUInt32() || unbanDate >= GameTime::GetGameTime()))
|
||||
if (fields[2].GetUInt8() && (!fields[1].GetUInt32() || unbanDate >= time(nullptr)))
|
||||
active = true;
|
||||
bool permanent = (fields[1].GetUInt32() == uint32(0));
|
||||
std::string banTime = permanent ? handler->GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
|
||||
|
||||
Reference in New Issue
Block a user