diff --git a/CMakeLists.txt b/CMakeLists.txt index 4494a8e6743..cea50c3ed59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -324,13 +324,13 @@ if(NOT BUILD_GAME_SERVER AND BUILD_SCRIPTDEV) message(STATUS "BUILD_SCRIPTDEV forced to OFF due to BUILD_GAME_SERVER is not set") endif() -if(NOT BUILD_GAME_SERVER AND BUILD_PLAYERBOT) - set(BUILD_PLAYERBOT OFF) - message(STATUS "BUILD_PLAYERBOT forced to OFF due to BUILD_GAME_SERVER is not set") +if(NOT BUILD_GAME_SERVER AND BUILD_DEPRECATED_PLAYERBOT) + set(BUILD_DEPRECATED_PLAYERBOT OFF) + message(STATUS "BUILD_DEPRECATED_PLAYERBOT forced to OFF due to BUILD_GAME_SERVER is not set") endif() if(PCH) - if(${CMAKE_VERSION} VERSION_LESS "3.16") + if(${CMAKE_VERSION} VERSION_LESS "3.16") message("PCH is not supported by your CMake version") message("Please consider to switch to CMake 3.16") message("PCH is forced to OFF") diff --git a/cmake/options.cmake b/cmake/options.cmake index 4c7e333f9cb..a7b45265950 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -1,18 +1,18 @@ -option(DEBUG "Include additional debug-code in core" OFF) -option(WARNINGS "Show all warnings during compile" OFF) -option(POSTGRESQL "Use PostgreSQL" OFF) -option(PCH "Use precompiled headers" ON) -option(BUILD_GAME_SERVER "Build game server" ON) -option(BUILD_LOGIN_SERVER "Build login server" ON) -option(BUILD_EXTRACTORS "Build map/dbc/vmap/mmap extractors" OFF) -option(BUILD_SCRIPTDEV "Build ScriptDev. (OFF Speedup build)" ON) -option(BUILD_PLAYERBOT "Build Playerbot mod" OFF) -option(BUILD_AHBOT "Build Auction House Bot mod" OFF) -option(BUILD_METRICS "Build Metrics, generate data for Grafana" OFF) -option(BUILD_RECASTDEMOMOD "Build map/vmap/mmap viewer" OFF) -option(BUILD_GIT_ID "Build git_id" OFF) -option(BUILD_DOCS "Build documentation with doxygen" OFF) -option(CMAKE_INTERPROCEDURAL_OPTIMIZATION "Enable link-time optimizations" OFF) +option(DEBUG "Include additional debug-code in core" OFF) +option(WARNINGS "Show all warnings during compile" OFF) +option(POSTGRESQL "Use PostgreSQL" OFF) +option(PCH "Use precompiled headers" ON) +option(BUILD_GAME_SERVER "Build game server" ON) +option(BUILD_LOGIN_SERVER "Build login server" ON) +option(BUILD_EXTRACTORS "Build map/dbc/vmap/mmap extractors" OFF) +option(BUILD_SCRIPTDEV "Build ScriptDev. (OFF Speedup build)" ON) +option(BUILD_AHBOT "Build Auction House Bot mod" OFF) +option(BUILD_METRICS "Build Metrics, generate data for Grafana" OFF) +option(BUILD_RECASTDEMOMOD "Build map/vmap/mmap viewer" OFF) +option(BUILD_GIT_ID "Build git_id" OFF) +option(BUILD_DOCS "Build documentation with doxygen" OFF) +option(CMAKE_INTERPROCEDURAL_OPTIMIZATION "Enable link-time optimizations" OFF) +option(BUILD_DEPRECATED_PLAYERBOT "Build previous version of Playerbot mod" OFF) set(DEV_BINARY_DIR ${CMAKE_BINARY_DIR} CACHE STRING "Executable directory on Windows") # TODO: options that should be checked/created: @@ -33,14 +33,15 @@ message(STATUS BUILD_GAME_SERVER Build game server (core server) BUILD_LOGIN_SERVER Build login server (auth server) BUILD_EXTRACTORS Build map/dbc/vmap/mmap extractor - BUILD_SCRIPTDEV Build scriptdev. (Disable it to speedup build in dev mode by not including scripts) - BUILD_PLAYERBOT Build Playerbot mod BUILD_AHBOT Build Auction House Bot mod BUILD_METRICS Build Metrics, generate data for Grafana BUILD_RECASTDEMOMOD Build map/vmap/mmap viewer BUILD_GIT_ID Build git_id BUILD_DOCS Build documentation with doxygen CMAKE_INTERPROCEDURAL_OPTIMIZATION Enable link-time optimizations + BUILD_DEPRECATED_PLAYERBOT Build Playerbot mod (deprecated) + BUILD_SCRIPTDEV Build scriptdev. (Disable it to speedup build + in dev mode by not including scripts) DEV_BINARY_DIR Target directory for executables on Windows only diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index 1db7f3fea40..83103f69689 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -61,10 +61,10 @@ else() message(STATUS "Build METRICs : No (default)") endif() -if(BUILD_PLAYERBOT) - message(STATUS "Build Playerbot : Yes") +if(BUILD_DEPRECATED_PLAYERBOT) + message(STATUS "Build OLD Playerbot : Yes") else() - message(STATUS "Build Playerbot : No (default)") + message(STATUS "Build OLD Playerbot : No (default)") endif() if(BUILD_EXTRACTORS) diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index 3dca10a49cf..abb56176d49 100644 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -40,7 +40,7 @@ if(NOT BUILD_SCRIPTDEV) endforeach() endif() -if(NOT BUILD_PLAYERBOT) +if(NOT BUILD_DEPRECATED_PLAYERBOT) # exclude Playerbot folder set (EXCLUDE_DIR "PlayerBot/") foreach (TMP_PATH ${LIBRARY_SRCS}) @@ -122,9 +122,9 @@ if (BUILD_METRICS) add_definitions(-DBUILD_METRICS) endif() -# Define BUILD_PLAYERBOT if need -if (BUILD_PLAYERBOT) - add_definitions(-DBUILD_PLAYERBOT) +# Define BUILD_DEPRECATED_PLAYERBOT if need +if (BUILD_DEPRECATED_PLAYERBOT) + add_definitions(-DBUILD_DEPRECATED_PLAYERBOT) endif() if (MSVC) diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index afcc354b043..e1e1614bb86 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -1082,7 +1082,7 @@ ChatCommand* ChatHandler::getCommandTable() { "mmap", SEC_GAMEMASTER, false, nullptr, "", mmapCommandTable }, { "worldstate", SEC_ADMINISTRATOR, false, nullptr, "", worldStateTable }, { "loot", SEC_GAMEMASTER, true, nullptr, "", lootCommandTable }, -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT { "bot", SEC_PLAYER, false, &ChatHandler::HandlePlayerbotCommand, "", nullptr }, #endif diff --git a/src/game/Chat/Chat.h b/src/game/Chat/Chat.h index 408b2d01ebe..28f41d90e54 100644 --- a/src/game/Chat/Chat.h +++ b/src/game/Chat/Chat.h @@ -796,7 +796,7 @@ class ChatHandler bool HandleWaterwalkCommand(char* args); bool HandleQuitCommand(char* args); bool HandleShowGearScoreCommand(char* args); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT bool HandlePlayerbotCommand(char* args); #endif diff --git a/src/game/Chat/ChatHandler.cpp b/src/game/Chat/ChatHandler.cpp index 50918f30d5b..ac0a0d2d7c3 100644 --- a/src/game/Chat/ChatHandler.cpp +++ b/src/game/Chat/ChatHandler.cpp @@ -39,7 +39,7 @@ bool WorldSession::CheckChatMessage(std::string& msg, bool addon/* = false*/) { -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // bot check can be avoided if (_player->GetPlayerbotAI()) return true; diff --git a/src/game/Entities/CharacterHandler.cpp b/src/game/Entities/CharacterHandler.cpp index a0bfee10cac..2fb9866b226 100644 --- a/src/game/Entities/CharacterHandler.cpp +++ b/src/game/Entities/CharacterHandler.cpp @@ -41,7 +41,7 @@ #include "AI/ScriptDevAI/ScriptDevAIMgr.h" #include "Anticheat/Anticheat.hpp" -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT #include "PlayerBot/Base/PlayerbotMgr.h" #endif @@ -138,7 +138,7 @@ class CharacterHandler if (WorldSession* session = sWorld.FindSession(((LoginQueryHolder*)holder)->GetAccountId())) session->HandlePlayerLogin((LoginQueryHolder*)holder); } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // This callback is different from the normal HandlePlayerLoginCallback in that it // sets up the bot's world session and also stores the pointer to the bot player in the master's // world session m_playerBots map @@ -643,7 +643,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recv_data) CharacterDatabase.DelayQueryHolder(&chrHandler, &CharacterHandler::HandlePlayerLoginCallback, holder); } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Can't easily reuse HandlePlayerLoginOpcode for logging in bots because it assumes // a WorldSession exists for the bot. The WorldSession for a bot is created after the character is loaded. void PlayerbotMgr::LoginPlayerBot(ObjectGuid playerGuid) diff --git a/src/game/Entities/Creature.h b/src/game/Entities/Creature.h index afee4423973..0f07a150347 100644 --- a/src/game/Entities/Creature.h +++ b/src/game/Entities/Creature.h @@ -574,7 +574,7 @@ class Creature : public Unit bool IsTemporarySummon() const { return m_subtype == CREATURE_SUBTYPE_TEMPORARY_SUMMON; } bool IsCritter() const { return m_creatureInfo->CreatureType == CREATURE_TYPE_CRITTER; } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Adds functionality to load/unload bots from NPC, also need to apply SQL scripts void LoadBotMenu(Player* pPlayer); #endif diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index cdbe8715229..3bb949e2ff3 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -70,7 +70,7 @@ #include "World/WorldState.h" #include "Anticheat/Anticheat.hpp" -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT #include "PlayerBot/Base/PlayerbotAI.h" #include "PlayerBot/Base/PlayerbotMgr.h" #include "Config/Config.h" @@ -92,7 +92,7 @@ #define SKILL_PERM_BONUS(x) int16(PAIR32_HIPART(x)) #define MAKE_SKILL_BONUS(t, p) MAKE_PAIR32(t,p) -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT extern Config botConfig; #endif @@ -499,7 +499,7 @@ void TradeData::SetAccepted(bool state, bool crosssend /*= false*/) //== Player ==================================================== Player::Player(WorldSession* session): Unit(), m_taxiTracker(*this), m_mover(this), m_camera(this), m_achievementMgr(this), m_reputationMgr(this), m_launched(false) { -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT m_playerbotAI = 0; m_playerbotMgr = 0; #endif @@ -735,7 +735,7 @@ Player::~Player() delete m_declinedname; delete m_runes; -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (m_playerbotAI) { delete m_playerbotAI; @@ -1721,7 +1721,7 @@ void Player::Update(const uint32 diff) if (IsHasDelayedTeleport() && !m_semaphoreTeleport_Near) TeleportTo(m_teleport_dest, m_teleport_options); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (m_playerbotAI) m_playerbotAI->UpdateAI(diff); else if (m_playerbotMgr) @@ -2050,7 +2050,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati MapEntry const* mEntry = sMapStore.LookupEntry(mapid); // Validity checked in IsValidMapCoord -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // If this user has bots, tell them to stop following master // so they don't try to follow the master after the master teleports if (GetPlayerbotMgr()) @@ -2989,7 +2989,7 @@ void Player::GiveLevel(uint32 level) MailDraft(mailReward->mailTemplateId).SendMailTo(this, MailSender(MAIL_CREATURE, mailReward->senderEntry)); GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (m_playerbotAI) m_playerbotAI->GiveLevel(level); #endif @@ -13414,7 +13414,7 @@ void Player::PrepareGossipMenu(WorldObject* pSource, uint32 menuId, bool forceQu break; // no checks case GOSSIP_OPTION_BOT: { -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (botConfig.GetBoolDefault("PlayerbotAI.DisableBots", false) && !pCreature->isInnkeeper()) { ChatHandler(this).PSendSysMessage("|cffff0000Playerbot system is currently disabled!"); @@ -13713,7 +13713,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me GetSession()->SendBattleGroundList(guid, bgTypeId); break; } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT case GOSSIP_OPTION_BOT: { // DEBUG_LOG("GOSSIP_OPTION_BOT"); diff --git a/src/game/Entities/Player.h b/src/game/Entities/Player.h index aacd0f38704..b6f86443a86 100644 --- a/src/game/Entities/Player.h +++ b/src/game/Entities/Player.h @@ -60,7 +60,7 @@ class Spell; class Item; struct FactionTemplateEntry; -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT #include "PlayerBot/Base/PlayerbotMgr.h" #include "PlayerBot/Base/PlayerbotAI.h" #endif @@ -1562,7 +1562,7 @@ class Player : public Unit void AddTimedQuest(uint32 quest_id) { m_timedquests.insert(quest_id); } void RemoveTimedQuest(uint32 quest_id) { m_timedquests.erase(quest_id); } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT PlayerTalentMap GetTalents(uint8 spec) { return m_talents[spec]; } void chompAndTrim(std::string& str); bool getNextQuestId(const std::string& pString, unsigned int& pStartPos, unsigned int& pId); @@ -2506,7 +2506,7 @@ class Player : public Unit void SendMessageToPlayer(std::string const& message) const; // debugging purposes -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // A Player can either have a playerbotMgr (to manage its bots), or have playerbotAI (if it is a bot), or // neither. Code that enables bots must create the playerbotMgr and set it using SetPlayerbotMgr. void SetPlayerbotAI(PlayerbotAI* ai) { assert(!m_playerbotAI && !m_playerbotMgr); m_playerbotAI = ai; } @@ -2872,7 +2872,7 @@ class Player : public Unit MapReference m_mapRef; std::unique_ptr m_playerMenu; -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT PlayerbotAI* m_playerbotAI; PlayerbotMgr* m_playerbotMgr; #endif diff --git a/src/game/Groups/Group.cpp b/src/game/Groups/Group.cpp index 29fbc05f2a9..410be331074 100644 --- a/src/game/Groups/Group.cpp +++ b/src/game/Groups/Group.cpp @@ -33,7 +33,7 @@ #include "Maps/MapManager.h" #include "Maps/MapPersistentStateMgr.h" #include "Spells/SpellAuras.h" -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT #include "PlayerBot/Base/PlayerbotMgr.h" #include "Config/Config.h" extern Config botConfig; @@ -406,7 +406,7 @@ bool Group::AddMember(ObjectGuid guid, const char* name) uint32 Group::RemoveMember(ObjectGuid guid, uint8 method) { Player* player = sObjectMgr.GetPlayer(guid); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // if master leaves group, all bots leave group if (!botConfig.GetBoolDefault("PlayerbotAI.DisableBots", false)) { diff --git a/src/game/Quests/QuestHandler.cpp b/src/game/Quests/QuestHandler.cpp index 3bf83ca277f..d476945e9f7 100644 --- a/src/game/Quests/QuestHandler.cpp +++ b/src/game/Quests/QuestHandler.cpp @@ -31,7 +31,7 @@ #include "Groups/Group.h" #include "Tools/Formulas.h" -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT #include "PlayerBot/Base/PlayerbotAI.h" #endif @@ -629,12 +629,12 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket) continue; } -#ifndef BUILD_PLAYERBOT +#ifndef BUILD_DEPRECATED_PLAYERBOT pPlayer->GetPlayerMenu()->SendQuestGiverQuestDetails(pQuest, _player->GetObjectGuid(), true); #endif pPlayer->SetDividerGuid(_player->GetObjectGuid()); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (pPlayer->GetPlayerbotAI()) pPlayer->GetPlayerbotAI()->AcceptQuest(pQuest, _player); else diff --git a/src/game/Server/WorldSession.cpp b/src/game/Server/WorldSession.cpp index 019aaeb5681..a579ff56c22 100644 --- a/src/game/Server/WorldSession.cpp +++ b/src/game/Server/WorldSession.cpp @@ -49,7 +49,7 @@ #include #include -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT #include "PlayerBot/Base/PlayerbotMgr.h" #include "PlayerBot/Base/PlayerbotAI.h" #endif @@ -201,7 +201,7 @@ void WorldSession::SetExpansion(uint8 expansion) /// Send a packet to the client void WorldSession::SendPacket(WorldPacket const& packet) const { -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Send packet to bot AI if (GetPlayer()) { @@ -390,7 +390,7 @@ bool WorldSession::Update(uint32 /*diff*/) // lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (_player && _player->GetPlayerbotMgr()) _player->GetPlayerbotMgr()->HandleMasterIncomingPacket(*packet); #endif @@ -445,7 +445,7 @@ bool WorldSession::Update(uint32 /*diff*/) } } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Process player bot packets // The PlayerbotAI class adds to the packet queue to simulate a real player // since Playerbots are known to the World obj only by its master's WorldSession object @@ -588,7 +588,7 @@ void WorldSession::LogoutPlayer() if (_player) { -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Log out all player bots owned by this toon if (_player->GetPlayerbotMgr()) _player->GetPlayerbotMgr()->LogoutAllBots(true); @@ -662,7 +662,7 @@ void WorldSession::LogoutPlayer() // No SQL injection as AccountID is uint32 static SqlStatementID id; -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (!_player->GetPlayerbotAI()) { // Unmodded core code below @@ -719,7 +719,7 @@ void WorldSession::LogoutPlayer() // GM ticket notification sTicketMgr.OnPlayerOnlineState(*_player, false); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Remember player GUID for update SQL below uint32 guid = _player->GetGUIDLow(); #endif @@ -751,7 +751,7 @@ void WorldSession::LogoutPlayer() static SqlStatementID updChars; -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT // Set for only character instead of accountid // Different characters can be alive as bots SqlStatement stmt = CharacterDatabase.CreateStatement(updChars, "UPDATE characters SET online = 0 WHERE guid = ?"); @@ -795,7 +795,7 @@ void WorldSession::KickPlayer(bool save, bool inPlace) return; } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (!_player) return; @@ -1287,7 +1287,7 @@ void WorldSession::SetDelayedAnticheat(std::unique_ptrGetRemoteAddress() : "disconnected/bot"; } #else @@ -317,7 +317,7 @@ class WorldSession void SetDelayedAnticheat(std::unique_ptr&& anticheat); SessionAnticheatInterface* GetAnticheat() const { return m_anticheat.get(); } -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT void SetNoAnticheat(); #endif diff --git a/src/game/Spells/SpellHandler.cpp b/src/game/Spells/SpellHandler.cpp index 160be4aeba1..4883985fe82 100644 --- a/src/game/Spells/SpellHandler.cpp +++ b/src/game/Spells/SpellHandler.cpp @@ -441,7 +441,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) // client provided targets SpellCastTargets targets; -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT recvPacket >> targets.ReadForCaster(caster); #else recvPacket >> targets.ReadForCaster(_player); diff --git a/src/game/World/World.cpp b/src/game/World/World.cpp index b24567d155b..0fd6f114370 100644 --- a/src/game/World/World.cpp +++ b/src/game/World/World.cpp @@ -1539,7 +1539,7 @@ void World::SetInitialWorldSettings() #endif // BUILD_METRICS -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT PlayerbotMgr::SetInitialWorldSettings(); #endif sLog.outString("---------------------------------------"); diff --git a/src/mangosd/CMakeLists.txt b/src/mangosd/CMakeLists.txt index 92c139d7be7..bef0d6dbf1e 100644 --- a/src/mangosd/CMakeLists.txt +++ b/src/mangosd/CMakeLists.txt @@ -91,7 +91,7 @@ if(WIN32) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/game/Anticheat/module/warden_modules/ $/warden_modules DEPENDS ${EXECUTABLE_NAME}) - if(BUILD_PLAYERBOT) + if(BUILD_DEPRECATED_PLAYERBOT) add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different \"${CMAKE_SOURCE_DIR}/src/game/PlayerBot/playerbot.conf.dist.in\" \"$/playerbot.conf.dist\") endif() @@ -123,9 +123,9 @@ install(TARGETS ${EXECUTABLE_NAME} DESTINATION ${BIN_DIR}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mangosd.conf.dist.in ${CMAKE_CURRENT_BINARY_DIR}/mangosd.conf.dist) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mangosd.conf.dist DESTINATION ${CONF_DIR}) -# Define BUILD_PLAYERBOT if need -if (BUILD_PLAYERBOT) - add_definitions(-DBUILD_PLAYERBOT) +# Define BUILD_DEPRECATED_PLAYERBOT if need +if (BUILD_DEPRECATED_PLAYERBOT) + add_definitions(-DBUILD_DEPRECATED_PLAYERBOT) configure_file(${CMAKE_SOURCE_DIR}/src/game/PlayerBot/playerbot.conf.dist.in ${CMAKE_CURRENT_BINARY_DIR}/playerbot.conf.dist) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/playerbot.conf.dist DESTINATION ${CONF_DIR}) endif() diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index 47f0586bd73..949f9dd056d 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -74,7 +74,7 @@ int main(int argc, char* argv[]) desc.add_options() ("ahbot,a", boost::program_options::value(&auctionBotConfig), "ahbot configuration file") ("config,c", boost::program_options::value(&configFile)->default_value(_MANGOSD_CONFIG), "configuration file") -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT ("playerbot,p", boost::program_options::value(&playerBotConfig)->default_value(_D_PLAYERBOT_CONFIG), "playerbot configuration file") #endif ("help,h", "prints usage") @@ -116,7 +116,7 @@ int main(int argc, char* argv[]) if (vm.count("ahbot")) sAuctionHouseBot.SetConfigFileName(auctionBotConfig); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (vm.count("playerbot")) _PLAYERBOT_CONFIG = playerBotConfig; #endif diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp index 305e1600491..9f3fc38c82d 100644 --- a/src/shared/Database/Database.cpp +++ b/src/shared/Database/Database.cpp @@ -495,7 +495,7 @@ bool Database::CheckRequiredField(char const* table_name, char const* required_n sLog.outErrorDb(" [B] You need: --> `%s.sql`", req_sql_update_name); sLog.outErrorDb(); sLog.outErrorDb("You must apply all updates after [A] to [B] to use mangos with this database."); -#ifdef BUILD_PLAYERBOT +#ifdef BUILD_DEPRECATED_PLAYERBOT if (reqName.find("playerbot") != std::string::npos) { sLog.outErrorDb("These updates are included in the [sql/PlayerBot] folder.");