Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources

This commit is contained in:
ariel- committed 2018-03-28 04:41:59 -03:00
1 parent 7fff6c424f
commit 5ff847159c
1243 files changed
+29780 -36517

No files matched your search

+27 -22
View File
@@ -22,14 +22,21 @@ Comment: All character related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "AccountMgr.h"
#include "CharacterCache.h"
#include "Chat.h"
#include "DatabaseEnv.h"
#include "DBCStores.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "PlayerDump.h"
#include "Player.h"
#include "PlayerDump.h"
#include "RBAC.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
#include "World.h"
#include "WorldSession.h"
class character_commandscript : public CommandScript
{
@@ -57,7 +64,7 @@ public:
{ "changefaction", rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGEFACTION, true, &HandleCharacterChangeFactionCommand, "", },
{ "changerace", rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGERACE, true, &HandleCharacterChangeRaceCommand, "", },
{ "changeaccount", rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGEACCOUNT, true, &HandleCharacterChangeAccountCommand, "", },
{ "deleted", rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED, true, NULL, "", characterDeletedCommandTable },
{ "deleted", rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED, true, nullptr, "", characterDeletedCommandTable },
{ "erase", rbac::RBAC_PERM_COMMAND_CHARACTER_ERASE, true, &HandleCharacterEraseCommand, "", },
{ "level", rbac::RBAC_PERM_COMMAND_CHARACTER_LEVEL, true, &HandleCharacterLevelCommand, "", },
{ "rename", rbac::RBAC_PERM_COMMAND_CHARACTER_RENAME, true, &HandleCharacterRenameCommand, "", },
@@ -67,9 +74,9 @@ public:
static std::vector<ChatCommand> commandTable =
{
{ "character", rbac::RBAC_PERM_COMMAND_CHARACTER, true, NULL, "", characterCommandTable },
{ "character", rbac::RBAC_PERM_COMMAND_CHARACTER, true, nullptr, "", characterCommandTable },
{ "levelup", rbac::RBAC_PERM_COMMAND_LEVELUP, false, &HandleLevelUpCommand, "" },
{ "pdump", rbac::RBAC_PERM_COMMAND_PDUMP, true, NULL, "", pdumpCommandTable },
{ "pdump", rbac::RBAC_PERM_COMMAND_PDUMP, true, nullptr, "", pdumpCommandTable },
};
return commandTable;
}
@@ -269,11 +276,9 @@ public:
char const* knownStr = handler->GetTrinityString(LANG_KNOWN);
// Search in CharTitles.dbc
for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++)
for (CharTitlesEntry const* titleInfo : sCharTitlesStore)
{
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
if (titleInfo && target->HasTitle(titleInfo))
if (target->HasTitle(titleInfo))
{
std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale;
if (name.empty())
@@ -288,9 +293,9 @@ public:
// send title in "id (idx:idx) - [namedlink locale]" format
if (handler->GetSession())
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, localeNames[loc], knownStr, activeStr);
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, titleInfo->ID, titleInfo->bit_index, titleInfo->ID, titleNameStr, localeNames[loc], knownStr, activeStr);
else
handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, name.c_str(), localeNames[loc], knownStr, activeStr);
handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, titleInfo->ID, titleInfo->bit_index, name.c_str(), localeNames[loc], knownStr, activeStr);
}
}
@@ -306,7 +311,7 @@ public:
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
return false;
char const* newNameStr = strtok(NULL, " ");
char const* newNameStr = strtok(nullptr, " ");
if (newNameStr)
{
@@ -324,7 +329,7 @@ public:
else
{
// check offline security
if (handler->HasLowerSecurity(NULL, targetGuid))
if (handler->HasLowerSecurity(nullptr, targetGuid))
return false;
sCharacterCache->GetCharacterNameByGuid(targetGuid, playerOldName);
@@ -410,7 +415,7 @@ public:
else
{
// check offline security
if (handler->HasLowerSecurity(NULL, targetGuid))
if (handler->HasLowerSecurity(nullptr, targetGuid))
return false;
std::string oldNameLink = handler->playerLink(targetName);
@@ -457,7 +462,7 @@ public:
newlevel = STRONG_MAX_LEVEL;
HandleCharacterLevel(target, targetGuid, oldlevel, newlevel, handler);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) // including player == NULL
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) // including player == nullptr
{
std::string nameLink = handler->playerLink(targetName);
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, nameLink.c_str(), newlevel);
@@ -892,7 +897,7 @@ public:
if (levelStr && isalpha(levelStr[0]))
{
nameStr = levelStr;
levelStr = NULL; // current level will be used
levelStr = nullptr; // current level will be used
}
Player* target;
@@ -913,7 +918,7 @@ public:
HandleCharacterLevel(target, targetGuid, oldlevel, newlevel, handler);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) // including chr == NULL
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) // including chr == nullptr
{
std::string nameLink = handler->playerLink(targetName);
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, nameLink.c_str(), newlevel);
@@ -931,7 +936,7 @@ public:
if (!fileStr)
return false;
char* accountStr = strtok(NULL, " ");
char* accountStr = strtok(nullptr, " ");
if (!accountStr)
return false;
@@ -962,8 +967,8 @@ public:
return false;
}
char* guidStr = NULL;
char* nameStr = strtok(NULL, " ");
char* guidStr = nullptr;
char* nameStr = strtok(nullptr, " ");
std::string name;
if (nameStr)
@@ -984,7 +989,7 @@ public:
return false;
}
guidStr = strtok(NULL, " ");
guidStr = strtok(nullptr, " ");
}
ObjectGuid::LowType guid = 0;
@@ -1039,7 +1044,7 @@ public:
return false;
char* fileStr = strtok((char*)args, " ");
char* playerStr = strtok(NULL, " ");
char* playerStr = strtok(nullptr, " ");
if (!fileStr || !playerStr)
return false;