mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
feat(Core/Time): remove inherited ACE Time (#3455)
Co-authored-by: Viste <viste02@gmail.com>
This commit is contained in:
@@ -460,7 +460,7 @@ public:
|
||||
{
|
||||
time_t timeBan = time_t(fields2[0].GetUInt32());
|
||||
tm tmBan;
|
||||
ACE_OS::localtime_r(&timeBan, &tmBan);
|
||||
localtime_r(&timeBan, &tmBan);
|
||||
|
||||
if (fields2[0].GetUInt32() == fields2[1].GetUInt32())
|
||||
{
|
||||
@@ -472,7 +472,7 @@ public:
|
||||
{
|
||||
time_t timeUnban = time_t(fields2[1].GetUInt32());
|
||||
tm tmUnban;
|
||||
ACE_OS::localtime_r(&timeUnban, &tmUnban);
|
||||
localtime_r(&timeUnban, &tmUnban);
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
accountName.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
@@ -549,7 +549,7 @@ public:
|
||||
{
|
||||
time_t timeBan = time_t(banFields[0].GetUInt32());
|
||||
tm tmBan;
|
||||
ACE_OS::localtime_r(&timeBan, &tmBan);
|
||||
localtime_r(&timeBan, &tmBan);
|
||||
|
||||
if (banFields[0].GetUInt32() == banFields[1].GetUInt32())
|
||||
{
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
{
|
||||
time_t timeUnban = time_t(banFields[1].GetUInt32());
|
||||
tm tmUnban;
|
||||
ACE_OS::localtime_r(&timeUnban, &tmUnban);
|
||||
localtime_r(&timeUnban, &tmUnban);
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
char_name.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
@@ -630,7 +630,7 @@ public:
|
||||
Field* fields = result->Fetch();
|
||||
time_t timeBan = time_t(fields[1].GetUInt32());
|
||||
tm tmBan;
|
||||
ACE_OS::localtime_r(&timeBan, &tmBan);
|
||||
localtime_r(&timeBan, &tmBan);
|
||||
if (fields[1].GetUInt32() == fields[2].GetUInt32())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
@@ -641,7 +641,7 @@ public:
|
||||
{
|
||||
time_t timeUnban = time_t(fields[2].GetUInt32());
|
||||
tm tmUnban;
|
||||
ACE_OS::localtime_r(&timeUnban, &tmUnban);
|
||||
localtime_r(&timeUnban, &tmUnban);
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
fields[0].GetCString(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
char createdDateStr[20];
|
||||
time_t createdDate = guild->GetCreatedDate();
|
||||
tm localTm;
|
||||
ACE_OS::localtime_r(&createdDate, &localTm);
|
||||
localtime_r(&createdDate, &localTm);
|
||||
strftime(createdDateStr, 20, "%Y-%m-%d %H:%M:%S", &localTm);
|
||||
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date
|
||||
|
||||
@@ -2370,7 +2370,7 @@ public:
|
||||
char buffer[80];
|
||||
|
||||
// set it to string
|
||||
ACE_OS::localtime_r(&sqlTime, &timeInfo);
|
||||
localtime_r(&sqlTime, &timeInfo);
|
||||
strftime(buffer, sizeof(buffer), "%Y-%m-%d %I:%M%p", &timeInfo);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, buffer, fields[1].GetUInt32(), fields[2].GetCString(), fields[3].GetCString());
|
||||
|
||||
@@ -846,7 +846,7 @@ public:
|
||||
{
|
||||
time_t curtime = time(nullptr);
|
||||
tm strDate;
|
||||
ACE_OS::localtime_r(&curtime, &strDate);
|
||||
localtime_r(&curtime, &strDate);
|
||||
|
||||
if (strDate.tm_min == 0 || strDate.tm_min == 30)
|
||||
return true;
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
{
|
||||
time_t curtime = time(nullptr);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
localtime_r(&curtime, &strdate);
|
||||
|
||||
if (!preWarning && strdate.tm_hour == 13 && strdate.tm_min == 55)
|
||||
{
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
{
|
||||
time_t curtime = time(nullptr);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
localtime_r(&curtime, &strdate);
|
||||
if (!startWarning && strdate.tm_hour == 14 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
|
||||
Reference in New Issue
Block a user