Fix commands and starting to use nullptr instead of NULL

This commit is contained in:
Yehonal
2016-08-20 09:49:37 +02:00
parent d7fdf7c940
commit 1b1767e9f4
32 changed files with 394 additions and 479 deletions

View File

@@ -29,13 +29,11 @@ public:
{ "activelist", SEC_GAMEMASTER, true, &HandleEventActiveListCommand, "" },
{ "start", SEC_GAMEMASTER, true, &HandleEventStartCommand, "" },
{ "stop", SEC_GAMEMASTER, true, &HandleEventStopCommand, "" },
{ "", SEC_GAMEMASTER, true, &HandleEventInfoCommand, "" },
{ NULL, 0, false, NULL, "" }
{ "", SEC_GAMEMASTER, true, &HandleEventInfoCommand, "" }
};
static std::vector<ChatCommand> commandTable =
{
{ "event", SEC_GAMEMASTER, false, NULL, "", eventCommandTable },
{ NULL, 0, false, NULL, "" }
{ "event", SEC_GAMEMASTER, false, nullptr, "", eventCommandTable }
};
return commandTable;
}
@@ -106,8 +104,8 @@ public:
std::string endTimeStr = TimeToTimestampStr(eventData.end);
uint32 delay = sGameEventMgr->NextCheck(eventId);
time_t nextTime = time(NULL) + delay;
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL) + delay) : "-";
time_t nextTime = time(nullptr) + delay;
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(nullptr) + delay) : "-";
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE, true);
std::string lengthStr = secsToTimeString(eventData.length * MINUTE, true);