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

+14 -7
View File
@@ -22,11 +22,15 @@ Comment: All quest related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "DatabaseEnv.h"
#include "DBCStores.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
#include "RBAC.h"
#include "World.h"
class quest_commandscript : public CommandScript
{
@@ -44,12 +48,12 @@ public:
};
static std::vector<ChatCommand> commandTable =
{
{ "quest", rbac::RBAC_PERM_COMMAND_QUEST, false, NULL, "", questCommandTable },
{ "quest", rbac::RBAC_PERM_COMMAND_QUEST, false, nullptr, "", questCommandTable },
};
return commandTable;
}
static bool HandleQuestAdd(ChatHandler* handler, const char* args)
static bool HandleQuestAdd(ChatHandler* handler, char const* args)
{
Player* player = handler->getSelectedPlayerOrSelf();
if (!player)
@@ -78,7 +82,10 @@ public:
// check item starting quest (it can work incorrectly if added without item in inventory)
ItemTemplateContainer const* itc = sObjectMgr->GetItemTemplateStore();
ItemTemplateContainer::const_iterator result = find_if (itc->begin(), itc->end(), Finder<uint32, ItemTemplate>(entry, &ItemTemplate::StartQuest));
ItemTemplateContainer::const_iterator result = std::find_if(itc->begin(), itc->end(), [quest](ItemTemplateContainer::value_type const& value)
{
return value.second.StartQuest == quest->GetQuestId();
});
if (result != itc->end())
{
@@ -89,12 +96,12 @@ public:
// ok, normal (creature/GO starting) quest
if (player->CanAddQuest(quest, true))
player->AddQuestAndCheckCompletion(quest, NULL);
player->AddQuestAndCheckCompletion(quest, nullptr);
return true;
}
static bool HandleQuestRemove(ChatHandler* handler, const char* args)
static bool HandleQuestRemove(ChatHandler* handler, char const* args)
{
Player* player = handler->getSelectedPlayer();
if (!player)
@@ -157,7 +164,7 @@ public:
}
}
static bool HandleQuestComplete(ChatHandler* handler, const char* args)
static bool HandleQuestComplete(ChatHandler* handler, char const* args)
{
Player* player = handler->getSelectedPlayerOrSelf();
if (!player)