summaryrefslogtreecommitdiff
path: root/src/scripts/Commands/cs_event.cpp
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2016-08-20 09:49:37 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-08-20 09:49:37 +0200
commit1b1767e9f4c20d1e20541968de98d00814f63247 (patch)
treeee95040cf29644aff151f9aebdf3bfd9e18ae08d /src/scripts/Commands/cs_event.cpp
parentd7fdf7c940317aebcbbeeaf156469e1571e01498 (diff)
Fix commands and starting to use nullptr instead of NULL
Diffstat (limited to 'src/scripts/Commands/cs_event.cpp')
-rw-r--r--src/scripts/Commands/cs_event.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/scripts/Commands/cs_event.cpp b/src/scripts/Commands/cs_event.cpp
index 2738d9c7ed..596750f5a8 100644
--- a/src/scripts/Commands/cs_event.cpp
+++ b/src/scripts/Commands/cs_event.cpp
@@ -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);