Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -22,16 +22,20 @@ Comment: All role based access control related commands (including account relat
|
||||
Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Config.h"
|
||||
#include "Chat.h"
|
||||
#include "Config.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "RBAC.h"
|
||||
#include "Realm.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
struct RBACCommandData
|
||||
{
|
||||
RBACCommandData(): id(0), realmId(0), rbac(NULL), needDelete(false) { }
|
||||
RBACCommandData(): id(0), realmId(0), rbac(nullptr), needDelete(false) { }
|
||||
~RBACCommandData()
|
||||
{
|
||||
if (needDelete)
|
||||
@@ -61,13 +65,13 @@ public:
|
||||
|
||||
static std::vector<ChatCommand> rbacCommandTable =
|
||||
{
|
||||
{ "account", rbac::RBAC_PERM_COMMAND_RBAC_ACC, true, NULL, "", rbacAccountCommandTable },
|
||||
{ "account", rbac::RBAC_PERM_COMMAND_RBAC_ACC, true, nullptr, "", rbacAccountCommandTable },
|
||||
{ "list", rbac::RBAC_PERM_COMMAND_RBAC_LIST, true, &HandleRBACListPermissionsCommand, "" },
|
||||
};
|
||||
|
||||
static std::vector<ChatCommand> commandTable =
|
||||
{
|
||||
{ "rbac", rbac::RBAC_PERM_COMMAND_RBAC, true, NULL, "", rbacCommandTable },
|
||||
{ "rbac", rbac::RBAC_PERM_COMMAND_RBAC, true, nullptr, "", rbacCommandTable },
|
||||
};
|
||||
|
||||
return commandTable;
|
||||
@@ -76,18 +80,18 @@ public:
|
||||
static RBACCommandData* ReadParams(ChatHandler* handler, char const* args, bool checkParams = true)
|
||||
{
|
||||
if (!args)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
char* param1 = strtok((char*)args, " ");
|
||||
char* param2 = strtok(NULL, " ");
|
||||
char* param3 = strtok(NULL, " ");
|
||||
char* param2 = strtok(nullptr, " ");
|
||||
char* param3 = strtok(nullptr, " ");
|
||||
|
||||
int32 realmId = -1;
|
||||
uint32 accountId = 0;
|
||||
std::string accountName;
|
||||
uint32 id = 0;
|
||||
RBACCommandData* data = NULL;
|
||||
rbac::RBACData* rdata = NULL;
|
||||
RBACCommandData* data = nullptr;
|
||||
rbac::RBACData* rdata = nullptr;
|
||||
bool useSelectedPlayer = false;
|
||||
|
||||
if (checkParams)
|
||||
@@ -112,14 +116,14 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, id);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (realmId < -1 || !realmId)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_REALM, realmId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
else if (!param1)
|
||||
@@ -129,7 +133,7 @@ public:
|
||||
{
|
||||
Player* player = handler->getSelectedPlayer();
|
||||
if (!player)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
rdata = player->GetSession()->GetRBACData();
|
||||
accountId = rdata->GetId();
|
||||
@@ -146,12 +150,12 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (checkParams && handler->HasLowerSecurityAccount(NULL, accountId, true))
|
||||
return NULL;
|
||||
if (checkParams && handler->HasLowerSecurityAccount(nullptr, accountId, true))
|
||||
return nullptr;
|
||||
|
||||
data = new RBACCommandData();
|
||||
|
||||
|
||||
Reference in new issue
Block a user