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

@@ -32,13 +32,11 @@ public:
{ "del", SEC_ADMINISTRATOR, true, &HandleTeleDelCommand, "" },
{ "name", SEC_GAMEMASTER, true, &HandleTeleNameCommand, "" },
{ "group", SEC_GAMEMASTER, false, &HandleTeleGroupCommand, "" },
{ "", SEC_GAMEMASTER, false, &HandleTeleCommand, "" },
{ NULL, 0, false, NULL, "" }
{ "", SEC_GAMEMASTER, false, &HandleTeleCommand, "" }
};
static std::vector<ChatCommand> commandTable =
{
{ "tele", SEC_GAMEMASTER, false, NULL, "", teleCommandTable },
{ NULL, 0, false, NULL, "" }
{ "tele", SEC_GAMEMASTER, false, nullptr, "", teleCommandTable }
};
return commandTable;
}
@@ -187,7 +185,7 @@ public:
else
{
// check offline security
if (handler->HasLowerSecurity(NULL, target_guid))
if (handler->HasLowerSecurity(nullptr, target_guid))
return false;
std::string nameLink = handler->playerLink(target_name);
@@ -245,7 +243,7 @@ public:
return false;
}
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
for (GroupReference* itr = grp->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* player = itr->GetSource();