diff --git a/contrib/mmap/CMakeLists.txt b/contrib/mmap/CMakeLists.txt index beef61383f..b4a7dea7f1 100644 --- a/contrib/mmap/CMakeLists.txt +++ b/contrib/mmap/CMakeLists.txt @@ -117,11 +117,6 @@ if (BUILD_EXTRACTORS) add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILES_LIST_TO_COPY} \"$\") endif() - - # Define ENABLE_PLAYERBOTS if need - if (BUILD_PLAYERBOTS) - add_definitions(-DENABLE_PLAYERBOTS) - endif() install(TARGETS ${EXECUTABLE_NAME} DESTINATION ${BIN_DIR}/tools) install(PROGRAMS "${CMAKE_SOURCE_DIR}/contrib/extractor_scripts/MoveMapGen.sh" DESTINATION ${BIN_DIR}/tools) diff --git a/contrib/mmap/src/MapBuilder.cpp b/contrib/mmap/src/MapBuilder.cpp index 1ddb943f8c..253ec8d89c 100644 --- a/contrib/mmap/src/MapBuilder.cpp +++ b/contrib/mmap/src/MapBuilder.cpp @@ -31,7 +31,6 @@ using namespace VMAP; -#ifdef ENABLE_MANGOSBOTS void rcModAlmostUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int /*nv*/, const int* tris, int nt, @@ -61,7 +60,6 @@ void rcModAlmostUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAng } } } -#endif void from_json(const json& j, rcConfig& config) { @@ -1029,9 +1027,10 @@ namespace MMAP unsigned char* triFlags = new unsigned char[tTriCount]; memset(triFlags, NAV_AREA_GROUND, tTriCount * sizeof(unsigned char)); rcClearUnwalkableTriangles(m_rcContext, tileCfg.walkableSlopeAngle, tVerts, tVertCount, tTris, tTriCount, triFlags); -#ifdef ENABLE_MANGOSBOTS + + // mark almost unwalkable triangles with steep flag rcModAlmostUnwalkableTriangles(m_rcContext, 50.0f, tVerts, tVertCount, tTris, tTriCount, triFlags); -#endif + rcRasterizeTriangles(m_rcContext, tVerts, tVertCount, tTris, triFlags, tTriCount, *tile.solid, tileCfg.walkableClimb); delete[] triFlags; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ab34a5b856..b4aa55f3f0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,41 +21,43 @@ if(BUILD_GAME_SERVER OR BUILD_LOGIN_SERVER OR BUILD_EXTRACTORS) add_subdirectory(shared) endif() -if(BUILD_GAME_SERVER) - add_subdirectory(game) - add_subdirectory(mangosd) -endif() - -if(BUILD_LOGIN_SERVER) - add_subdirectory(realmd) -endif() - # Playerbots module if(BUILD_PLAYERBOTS) include(FetchContent) FetchContent_Declare( - playerbots + PlayerBots + SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/modules/PlayerBots" GIT_REPOSITORY "https://github.com/cmangos/playerbots.git" - GIT_TAG "master" + GIT_TAG "master" ) - if(NOT playerbots_POPULATED) - message(STATUS "Fetching Playerbots module...") - - FetchContent_Populate(playerbots) - - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/Bots) - file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/modules/Bots) - endif() - - file(COPY ${playerbots_SOURCE_DIR}/. DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/modules/Bots) - message(STATUS "Playerbots module fetched and populated in ${CMAKE_CURRENT_SOURCE_DIR}/modules/Bots") + FetchContent_GetProperties(PlayerBots) + if (NOT playerbots_POPULATED) + FetchContent_Populate(PlayerBots) + message(STATUS "Playerbots module source dir: ${playerbots_SOURCE_DIR}") + else() + message(STATUS "Playerbots module already populated: ${playerbots_POPULATED}") endif() - add_subdirectory(modules/Bots) + #target_include_directories(Bots PUBLIC ${playerbots_SOURCE_DIR}) + message(STATUS "Playerbots module source dir: ${playerbots_SOURCE_DIR}") + message(STATUS "Playerbots module binary dir: ${playerbots_BINARY_DIR}") + message(STATUS "Playerbots module populated: ${playerbots_POPULATED}") + + add_subdirectory(${playerbots_SOURCE_DIR}) + else() - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/Bots) - file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/modules/Bots) - endif() + # if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/PlayerBots) + # file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/modules/PlayerBots) + # endif() +endif() + +if(BUILD_GAME_SERVER) + add_subdirectory(game) + add_subdirectory(mangosd) +endif() + +if(BUILD_LOGIN_SERVER) + add_subdirectory(realmd) endif() \ No newline at end of file diff --git a/src/game/AI/CreatureAISelector.cpp b/src/game/AI/CreatureAISelector.cpp index 909a6a9eb3..f57f5fdded 100644 --- a/src/game/AI/CreatureAISelector.cpp +++ b/src/game/AI/CreatureAISelector.cpp @@ -25,7 +25,7 @@ #include "AI/ScriptDevAI/ScriptDevAIMgr.h" #include "Entities/Pet.h" #include "Entities/Player.h" -#include "Log.h" +#include "Log/Log.h" #include "BaseAI/PetAI.h" #include "BaseAI/PossessedAI.h" #include "AI/PlayerAI/PlayerAI.h" diff --git a/src/game/AI/ScriptDevAI/base/TimerAI.cpp b/src/game/AI/ScriptDevAI/base/TimerAI.cpp index b42935c415..2913ab63bb 100644 --- a/src/game/AI/ScriptDevAI/base/TimerAI.cpp +++ b/src/game/AI/ScriptDevAI/base/TimerAI.cpp @@ -16,7 +16,7 @@ #include "TimerAI.h" #include "Chat/Chat.h" -#include "Log.h" +#include "Log/Log.h" #include Timer::Timer(uint32 id, std::function functor, uint32 timerMin, uint32 timerMax, TimerCombat combatSetting, bool disabled) diff --git a/src/game/Addons/AddonHandler.cpp b/src/game/Addons/AddonHandler.cpp index 1d75c6c041..71caaeb268 100644 --- a/src/game/Addons/AddonHandler.cpp +++ b/src/game/Addons/AddonHandler.cpp @@ -21,7 +21,7 @@ #include "Addons/AddonHandler.h" #include "Database/DatabaseEnv.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Policies/Singleton.h" INSTANTIATE_SINGLETON_1(AddonHandler); diff --git a/src/game/Anticheat/module/AddonHandler.cpp b/src/game/Anticheat/module/AddonHandler.cpp index d918be9e19..229c53089a 100644 --- a/src/game/Anticheat/module/AddonHandler.cpp +++ b/src/game/Anticheat/module/AddonHandler.cpp @@ -8,7 +8,7 @@ #include "libanticheat.hpp" #include "config.hpp" #include "Server/WorldPacket.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/Util.h" #include "Database/DatabaseEnv.h" diff --git a/src/game/Anticheat/module/Antispam/antispammgr.cpp b/src/game/Anticheat/module/Antispam/antispammgr.cpp index 6edf2e3785..b7fb1a05b7 100644 --- a/src/game/Anticheat/module/Antispam/antispammgr.cpp +++ b/src/game/Anticheat/module/Antispam/antispammgr.cpp @@ -11,7 +11,7 @@ #include "Server/WorldSession.h" #include "World/World.h" #include "Accounts/AccountMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Database/DatabaseEnv.h" #include "Policies/Singleton.h" diff --git a/src/game/Anticheat/module/Movement/movement.cpp b/src/game/Anticheat/module/Movement/movement.cpp index 571fadfcdc..6505b27830 100644 --- a/src/game/Anticheat/module/Movement/movement.cpp +++ b/src/game/Anticheat/module/Movement/movement.cpp @@ -22,7 +22,7 @@ #include "World/World.h" #include "Tools/Language.h" #include "Movement/MoveSpline.h" -#include "Log.h" +#include "Log/Log.h" namespace { diff --git a/src/game/Anticheat/module/Warden/warden.cpp b/src/game/Anticheat/module/Warden/warden.cpp index a48df0450a..3377ccd945 100644 --- a/src/game/Anticheat/module/Warden/warden.cpp +++ b/src/game/Anticheat/module/Warden/warden.cpp @@ -14,7 +14,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "World/World.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Util/ByteBuffer.h" #include "Database/DatabaseEnv.h" diff --git a/src/game/Anticheat/module/Warden/wardenmac.cpp b/src/game/Anticheat/module/Warden/wardenmac.cpp index b351ce5766..a34c3f0199 100644 --- a/src/game/Anticheat/module/Warden/wardenmac.cpp +++ b/src/game/Anticheat/module/Warden/wardenmac.cpp @@ -13,7 +13,7 @@ #include "Auth/CryptoHash.h" #include "World/World.h" #include "../config.hpp" -#include "Log.h" +#include "Log/Log.h" #include #include diff --git a/src/game/Anticheat/module/Warden/wardenmodulemgr.cpp b/src/game/Anticheat/module/Warden/wardenmodulemgr.cpp index 6c11fca4aa..37e44ddb33 100644 --- a/src/game/Anticheat/module/Warden/wardenmodulemgr.cpp +++ b/src/game/Anticheat/module/Warden/wardenmodulemgr.cpp @@ -12,7 +12,7 @@ #include "Platform/Define.h" #include "Policies/Singleton.h" #include "Util/Util.h" -#include "Log.h" +#include "Log/Log.h" #include #include diff --git a/src/game/Anticheat/module/Warden/wardenwin.cpp b/src/game/Anticheat/module/Warden/wardenwin.cpp index a52ba7e91f..08cb0a43d8 100644 --- a/src/game/Anticheat/module/Warden/wardenwin.cpp +++ b/src/game/Anticheat/module/Warden/wardenwin.cpp @@ -23,7 +23,7 @@ #include "Util/ByteBuffer.h" #include "Database/DatabaseEnv.h" #include "Entities/Player.h" -#include "Log.h" +#include "Log/Log.h" #include #include diff --git a/src/game/Anticheat/module/libanticheat.cpp b/src/game/Anticheat/module/libanticheat.cpp index 8e6c5ada14..d53d97d31f 100644 --- a/src/game/Anticheat/module/libanticheat.cpp +++ b/src/game/Anticheat/module/libanticheat.cpp @@ -21,7 +21,7 @@ #include "Chat/Chat.h" #include "Tools/Language.h" #include "Globals/ObjectMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Antispam/antispammgr.hpp" #include "Antispam/antispam.hpp" diff --git a/src/game/AuctionHouse/AuctionHouseHandler.cpp b/src/game/AuctionHouse/AuctionHouseHandler.cpp index b173f9735b..6d8182d8df 100644 --- a/src/game/AuctionHouse/AuctionHouseHandler.cpp +++ b/src/game/AuctionHouse/AuctionHouseHandler.cpp @@ -19,7 +19,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Entities/ObjectGuid.h" diff --git a/src/game/AuctionHouse/AuctionHouseMgr.cpp b/src/game/AuctionHouse/AuctionHouseMgr.cpp index 8edac7369c..bf787b36df 100644 --- a/src/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouse/AuctionHouseMgr.cpp @@ -25,7 +25,7 @@ #include "Accounts/AccountMgr.h" #include "Entities/Item.h" #include "Tools/Language.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectMgr.h" #include "Entities/ObjectGuid.h" #include "Entities/Player.h" diff --git a/src/game/AuctionHouseBot/AuctionHouseBot.cpp b/src/game/AuctionHouseBot/AuctionHouseBot.cpp index a138d17503..060313e091 100644 --- a/src/game/AuctionHouseBot/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot/AuctionHouseBot.cpp @@ -18,7 +18,7 @@ #include "AuctionHouseBot.h" #include "Globals/ObjectMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Policies/Singleton.h" #include "Util/ProgressBar.h" #include "SystemConfig.h" diff --git a/src/game/BattleGround/BattleGround.cpp b/src/game/BattleGround/BattleGround.cpp index 88c94736c0..78b0d16c73 100644 --- a/src/game/BattleGround/BattleGround.cpp +++ b/src/game/BattleGround/BattleGround.cpp @@ -1465,7 +1465,6 @@ uint32 BattleGround::GetSingleCreatureGuid(uint8 event1, uint8 event2) return ObjectGuid(); } -#ifdef ENABLE_PLAYERBOTS /** Function returns a gameobject guid from event map @@ -1482,7 +1481,6 @@ uint32 BattleGround::GetSingleGameObjectGuid(uint8 event1, uint8 event2) return ObjectGuid(); } -#endif /** Method that handles gameobject load from DB event map diff --git a/src/game/BattleGround/BattleGround.h b/src/game/BattleGround/BattleGround.h index 74b1dafc68..57e63a822c 100644 --- a/src/game/BattleGround/BattleGround.h +++ b/src/game/BattleGround/BattleGround.h @@ -507,10 +507,8 @@ class BattleGround // Get creature guid from event uint32 GetSingleCreatureGuid(uint8 /*event1*/, uint8 /*event2*/); -#ifdef ENABLE_PLAYERBOTS // Get gameobject guid from event uint32 GetSingleGameObjectGuid(uint8 /*event1*/, uint8 /*event2*/); -#endif // Handle door events void OpenDoorEvent(uint8 /*event1*/, uint8 event2 = 0); diff --git a/src/game/BattleGround/BattleGroundHandler.cpp b/src/game/BattleGround/BattleGroundHandler.cpp index 53bc444405..28d63b1a8c 100644 --- a/src/game/BattleGround/BattleGroundHandler.cpp +++ b/src/game/BattleGround/BattleGroundHandler.cpp @@ -19,7 +19,7 @@ #include "Common.h" #include "Server/WorldPacket.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" #include "Globals/ObjectMgr.h" #include "Server/WorldSession.h" diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index 5fa96831cb..54c0ff7f8b 100644 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -124,66 +124,9 @@ target_include_directories(${LIBRARY_NAME} ) if(BUILD_PLAYERBOTS) - include_directories( - ${CMAKE_SOURCE_DIR}/src/game - ${CMAKE_SOURCE_DIR}/src/game/AI - ${CMAKE_SOURCE_DIR}/src/game/Accounts - ${CMAKE_SOURCE_DIR}/src/game/Addons - ${CMAKE_SOURCE_DIR}/src/game/Arena - ${CMAKE_SOURCE_DIR}/src/game/AuctionHouse - ${CMAKE_SOURCE_DIR}/src/game/BattleGround - ${CMAKE_SOURCE_DIR}/src/game/Chat - ${CMAKE_SOURCE_DIR}/src/game/ChatCommands - ${CMAKE_SOURCE_DIR}/src/game/Combat - ${CMAKE_SOURCE_DIR}/src/game/DBScripts - ${CMAKE_SOURCE_DIR}/src/game/Entities - ${CMAKE_SOURCE_DIR}/src/game/GMTickets - ${CMAKE_SOURCE_DIR}/src/game/GameEvents - ${CMAKE_SOURCE_DIR}/src/game/Globals - ${CMAKE_SOURCE_DIR}/src/game/Grids - ${CMAKE_SOURCE_DIR}/src/game/Groups - ${CMAKE_SOURCE_DIR}/src/game/Guilds - ${CMAKE_SOURCE_DIR}/src/game/LFG - ${CMAKE_SOURCE_DIR}/src/game/Loot - ${CMAKE_SOURCE_DIR}/src/game/Mails - ${CMAKE_SOURCE_DIR}/src/game/Maps - ${CMAKE_SOURCE_DIR}/src/game/MotionGenerators - ${CMAKE_SOURCE_DIR}/src/game/Movement - ${CMAKE_SOURCE_DIR}/src/game/Object - ${CMAKE_SOURCE_DIR}/src/game/OutdoorPvP - ${CMAKE_SOURCE_DIR}/src/game/Pools - ${CMAKE_SOURCE_DIR}/src/game/Quests - ${CMAKE_SOURCE_DIR}/src/game/References - ${CMAKE_SOURCE_DIR}/src/game/Reputation - ${CMAKE_SOURCE_DIR}/src/game/Server - ${CMAKE_SOURCE_DIR}/src/game/Server - ${CMAKE_SOURCE_DIR}/src/game/Skills - ${CMAKE_SOURCE_DIR}/src/game/Social - ${CMAKE_SOURCE_DIR}/src/game/Spells - ${CMAKE_SOURCE_DIR}/src/game/Tools - ${CMAKE_SOURCE_DIR}/src/game/Trade - ${CMAKE_SOURCE_DIR}/src/game/VoiceChat - ${CMAKE_SOURCE_DIR}/src/game/Warden - ${CMAKE_SOURCE_DIR}/src/game/Weather - ${CMAKE_SOURCE_DIR}/src/game/World - ${CMAKE_SOURCE_DIR}/src/game/WorldHandlers - ${CMAKE_SOURCE_DIR}/src/game/movement - ${CMAKE_SOURCE_DIR}/src/game/vmap - ${CMAKE_SOURCE_DIR}/src/shared - ${CMAKE_SOURCE_DIR}/src/shared/Auth - ${CMAKE_SOURCE_DIR}/src/shared/Config - ${CMAKE_SOURCE_DIR}/src/shared/Common - ${CMAKE_SOURCE_DIR}/src/shared/Database - ${CMAKE_SOURCE_DIR}/src/shared/DataStores - ${CMAKE_SOURCE_DIR}/src/shared/Utilities - ${CMAKE_SOURCE_DIR}/src/shared/Log - ${CMAKE_SOURCE_DIR}/src/shared/Threading - ${CMAKE_SOURCE_DIR}/src/modules/Bots/playerbot - ${CMAKE_SOURCE_DIR}/src/modules/Bots/ahbot - ) - - target_link_libraries(${LIBRARY_NAME} PUBLIC Bots) - add_dependencies(${LIBRARY_NAME} Bots) + target_link_libraries(${LIBRARY_NAME} PUBLIC playerbots) + target_include_directories(${LIBRARY_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/src/modules/PlayerBots) + add_dependencies(${LIBRARY_NAME} playerbots) endif() if(UNIX) diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index 36cd55e0fb..f09513a6c1 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -22,7 +22,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Globals/ObjectAccessor.h" @@ -36,9 +36,9 @@ #include "GameEvents/GameEventMgr.h" #ifdef ENABLE_PLAYERBOTS -#include "AhBot.h" -#include "playerbot.h" -#include "PlayerbotAIConfig.h" +#include "ahbot/AhBot.h" +#include "playerbot/playerbot.h" +#include "playerbot/PlayerbotAIConfig.h" #endif #include diff --git a/src/game/Chat/Chat.h b/src/game/Chat/Chat.h index 1690eb9171..f99cc6d452 100644 --- a/src/game/Chat/Chat.h +++ b/src/game/Chat/Chat.h @@ -101,9 +101,7 @@ class ChatHandler bool HasSentErrorMessage() const { return sentErrorMessage;} -#ifdef ENABLE_PLAYERBOTS WorldSession* GetSession() { return m_session; } -#endif /** * \brief Prepare SMSG_GM_MESSAGECHAT/SMSG_MESSAGECHAT diff --git a/src/game/Chat/ChatHandler.cpp b/src/game/Chat/ChatHandler.cpp index 3b4b95b38d..e822f73e75 100644 --- a/src/game/Chat/ChatHandler.cpp +++ b/src/game/Chat/ChatHandler.cpp @@ -17,7 +17,7 @@ */ #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "World/World.h" @@ -38,8 +38,8 @@ #include "Anticheat/Anticheat.hpp" #ifdef ENABLE_PLAYERBOTS -#include "playerbot.h" -#include "RandomPlayerbotMgr.h" +#include "playerbot/playerbot.h" +#include "playerbot/RandomPlayerbotMgr.h" #endif bool WorldSession::CheckChatMessage(std::string& msg, bool addon/* = false*/) diff --git a/src/game/Chat/Level1.cpp b/src/game/Chat/Level1.cpp index 1789a8c0f9..681e4a0b8a 100644 --- a/src/game/Chat/Level1.cpp +++ b/src/game/Chat/Level1.cpp @@ -27,7 +27,7 @@ #include "Server/Opcodes.h" #include "Chat/Chat.h" #include "Chat/ChannelMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectAccessor.h" #include "Tools/Language.h" #include "Grids/CellImpl.h" diff --git a/src/game/Chat/Level3.cpp b/src/game/Chat/Level3.cpp index d865b07895..7ed97a31a2 100644 --- a/src/game/Chat/Level3.cpp +++ b/src/game/Chat/Level3.cpp @@ -27,7 +27,7 @@ #include "Entities/Player.h" #include "Entities/GameObject.h" #include "Chat/Chat.h" -#include "Log.h" +#include "Log/Log.h" #include "Guilds/Guild.h" #include "Guilds/GuildMgr.h" #include "Globals/ObjectAccessor.h" diff --git a/src/game/Chat/debugcmds.cpp b/src/game/Chat/debugcmds.cpp index bfc10a6286..062f6ee07b 100644 --- a/src/game/Chat/debugcmds.cpp +++ b/src/game/Chat/debugcmds.cpp @@ -22,7 +22,7 @@ #include "Entities/Player.h" #include "Server/Opcodes.h" #include "Chat/Chat.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Unit.h" #include "Entities/GossipDef.h" #include "Tools/Language.h" diff --git a/src/game/Cinematics/M2Stores.cpp b/src/game/Cinematics/M2Stores.cpp index 1774a7d198..a7a3d58822 100644 --- a/src/game/Cinematics/M2Stores.cpp +++ b/src/game/Cinematics/M2Stores.cpp @@ -20,7 +20,7 @@ #include "M2Structure.h" #include "M2Stores.h" #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include #include diff --git a/src/game/Combat/CombatHandler.cpp b/src/game/Combat/CombatHandler.cpp index 2bc575209f..1413422948 100644 --- a/src/game/Combat/CombatHandler.cpp +++ b/src/game/Combat/CombatHandler.cpp @@ -17,7 +17,7 @@ */ #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Entities/ObjectGuid.h" diff --git a/src/game/Combat/DuelHandler.cpp b/src/game/Combat/DuelHandler.cpp index 695011756b..24cc939a71 100644 --- a/src/game/Combat/DuelHandler.cpp +++ b/src/game/Combat/DuelHandler.cpp @@ -19,7 +19,7 @@ #include "Common.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) diff --git a/src/game/DBScripts/ScriptMgr.cpp b/src/game/DBScripts/ScriptMgr.cpp index db1000e21a..57a650430a 100644 --- a/src/game/DBScripts/ScriptMgr.cpp +++ b/src/game/DBScripts/ScriptMgr.cpp @@ -18,7 +18,7 @@ #include "DBScripts/ScriptMgr.h" #include "Policies/Singleton.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/ProgressBar.h" #include "Globals/ObjectMgr.h" #include "Globals/ObjectAccessor.h" diff --git a/src/game/Entities/Camera.cpp b/src/game/Entities/Camera.cpp index c8ce5d44c4..0a62d85319 100644 --- a/src/game/Entities/Camera.cpp +++ b/src/game/Entities/Camera.cpp @@ -19,7 +19,7 @@ #include "Entities/Camera.h" #include "Grids/GridNotifiersImpl.h" #include "Grids/CellImpl.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/Errors.h" #include "Entities/Player.h" diff --git a/src/game/Entities/CharacterHandler.cpp b/src/game/Entities/CharacterHandler.cpp index a98c64db74..093a68479f 100644 --- a/src/game/Entities/CharacterHandler.cpp +++ b/src/game/Entities/CharacterHandler.cpp @@ -22,7 +22,7 @@ #include "Globals/SharedDefines.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Entities/Player.h" @@ -46,8 +46,8 @@ #endif #ifdef ENABLE_PLAYERBOTS -#include "playerbot.h" -#include "PlayerbotAIConfig.h" +#include "playerbot/playerbot.h" +#include "playerbot/PlayerbotAIConfig.h" #endif // config option SkipCinematics supported values diff --git a/src/game/Entities/Creature.cpp b/src/game/Entities/Creature.cpp index 203a5e7c9f..6c0e4f57de 100644 --- a/src/game/Entities/Creature.cpp +++ b/src/game/Entities/Creature.cpp @@ -30,7 +30,7 @@ #include "GameEvents/GameEventMgr.h" #include "Pools/PoolManager.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Loot/LootMgr.h" #include "Maps/MapManager.h" #include "AI/BaseAI/CreatureAI.h" diff --git a/src/game/Entities/EntitiesMgr.h b/src/game/Entities/EntitiesMgr.h index 07eb7eec59..5e4888fc2f 100644 --- a/src/game/Entities/EntitiesMgr.h +++ b/src/game/Entities/EntitiesMgr.h @@ -45,9 +45,7 @@ typedef std::unordered_set WorldObjectUnSet; typedef std::list UnitList; typedef std::list CreatureList; typedef std::list GameObjectList; -#ifdef ENABLE_PLAYERBOTS typedef std::list DynamicObjectList; -#endif typedef std::list CorpseList; typedef std::list PlayerList; typedef std::unordered_set PlayerSet; diff --git a/src/game/Entities/ItemEnchantmentMgr.cpp b/src/game/Entities/ItemEnchantmentMgr.cpp index 9ba1677723..33571694dd 100644 --- a/src/game/Entities/ItemEnchantmentMgr.cpp +++ b/src/game/Entities/ItemEnchantmentMgr.cpp @@ -18,7 +18,7 @@ #include "Entities/ItemEnchantmentMgr.h" #include "Database/DatabaseEnv.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectMgr.h" #include "Util/ProgressBar.h" #include "Util/Util.h" diff --git a/src/game/Entities/ItemHandler.cpp b/src/game/Entities/ItemHandler.cpp index f9a9c6a080..126891174c 100644 --- a/src/game/Entities/ItemHandler.cpp +++ b/src/game/Entities/ItemHandler.cpp @@ -20,7 +20,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectMgr.h" #include "Entities/Player.h" #include "Entities/Item.h" diff --git a/src/game/Entities/MiscHandler.cpp b/src/game/Entities/MiscHandler.cpp index 9c915a4cf1..3f03e09233 100644 --- a/src/game/Entities/MiscHandler.cpp +++ b/src/game/Entities/MiscHandler.cpp @@ -25,7 +25,7 @@ #include "Database/DatabaseImpl.h" #include "Server/WorldPacket.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" #include "World/World.h" #include "Guilds/GuildMgr.h" diff --git a/src/game/Entities/NPCHandler.cpp b/src/game/Entities/NPCHandler.cpp index 95405a1656..32ce337278 100644 --- a/src/game/Entities/NPCHandler.cpp +++ b/src/game/Entities/NPCHandler.cpp @@ -22,7 +22,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" #include "Entities/Player.h" diff --git a/src/game/Entities/Object.cpp b/src/game/Entities/Object.cpp index 339f2117ae..c91e2a6641 100644 --- a/src/game/Entities/Object.cpp +++ b/src/game/Entities/Object.cpp @@ -20,7 +20,7 @@ #include "Globals/SharedDefines.h" #include "Server/WorldPacket.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Entities/Creature.h" #include "Entities/Player.h" @@ -2465,12 +2465,13 @@ struct WorldObjectChangeAccumulator { // send self fields changes in another way, otherwise // with new camera system when player's camera too far from player, camera wouldn't receive packets and changes from player - if (i_object.isType(TYPEMASK_PLAYER)) + if (i_object.IsPlayer()) { + Player* plr = static_cast(&i_object); #ifdef ENABLE_PLAYERBOTS - if (((Player*)&i_object)->isRealPlayer()) + if (plr->isRealPlayer()) #endif - i_object.BuildUpdateDataForPlayer((Player*)&i_object, i_updateDatas); + i_object.BuildUpdateDataForPlayer(plr, i_updateDatas); } } diff --git a/src/game/Entities/Pet.cpp b/src/game/Entities/Pet.cpp index 141c9ee755..e1d755b427 100644 --- a/src/game/Entities/Pet.cpp +++ b/src/game/Entities/Pet.cpp @@ -18,7 +18,7 @@ #include "Entities/Pet.h" #include "Database/DatabaseEnv.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/WorldPacket.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" diff --git a/src/game/Entities/PetHandler.cpp b/src/game/Entities/PetHandler.cpp index f49a5ff357..81d554ce4f 100644 --- a/src/game/Entities/PetHandler.cpp +++ b/src/game/Entities/PetHandler.cpp @@ -21,7 +21,7 @@ #include "Server/WorldSession.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Spells/Spell.h" #include "AI/BaseAI/CreatureAI.h" diff --git a/src/game/Entities/PetitionsHandler.cpp b/src/game/Entities/PetitionsHandler.cpp index 00300d34b5..bace327608 100644 --- a/src/game/Entities/PetitionsHandler.cpp +++ b/src/game/Entities/PetitionsHandler.cpp @@ -22,7 +22,7 @@ #include "Server/WorldSession.h" #include "World/World.h" #include "Globals/ObjectMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Guilds/Guild.h" #include "Guilds/GuildMgr.h" diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index a11979fa46..4d68ba08fa 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -19,7 +19,7 @@ #include "Entities/Player.h" #include "Tools/Language.h" #include "Database/DatabaseEnv.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Spells/SpellMgr.h" #include "World/World.h" @@ -69,8 +69,8 @@ #endif #ifdef ENABLE_PLAYERBOTS -#include "playerbot.h" -#include "PlayerbotAIConfig.h" +#include "playerbot/playerbot.h" +#include "playerbot/PlayerbotAIConfig.h" #endif #include @@ -5753,7 +5753,7 @@ void Player::UpdateSpellTrainedSkills(uint32 spellId, bool apply) uint16 newSkillValue = 1; // World of Warcraft Client Patch 1.11.0 (2006-06-20) - // - Two-Handed Axes/Maces (Enhancement Talent) - Skill levels gained + // - Two-Handed Axes/Maces (Enhancement Talent) - Skill levels gained // with these two weapons will now be retained if you decide to unspend // this talent point and return to it later. if (pSkill->categoryId == SKILL_CATEGORY_WEAPON) @@ -5793,7 +5793,7 @@ void Player::UpdateSpellTrainedSkills(uint32 spellId, bool apply) default: // World of Warcraft Client Patch 1.11.0 (2006-06-20) - // - Two-Handed Axes/Maces (Enhancement Talent) - Skill levels gained + // - Two-Handed Axes/Maces (Enhancement Talent) - Skill levels gained // with these two weapons will now be retained if you decide to unspend // this talent point and return to it later. if (pSkill->categoryId == SKILL_CATEGORY_WEAPON) @@ -8251,7 +8251,6 @@ Item* Player::GetItemByPos(uint8 bag, uint8 slot) const return nullptr; } -#ifdef ENABLE_PLAYERBOTS Item* Player::GetItemByEntry(uint32 item) const { for (int i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) @@ -8278,7 +8277,6 @@ Item* Player::GetItemByEntry(uint32 item) const return nullptr; } -#endif Item* Player::GetWeaponForAttack(WeaponAttackType attackType, bool nonbroken, bool useable) const { @@ -12656,7 +12654,7 @@ void Player::RewardQuest(Quest const* pQuest, uint32 reward, Object* questGiver, bool handled = false; #ifdef ENABLE_PLAYERBOTS - if (this != questGiver) + if (this != questGiver) { #endif switch (questGiver->GetTypeId()) @@ -14083,54 +14081,6 @@ void Player::_LoadIntoDataField(const char* data, uint32 startOffset, uint32 cou } } -#ifdef ENABLE_PLAYERBOTS -bool Player::MinimalLoadFromDB(QueryResult* result, uint32 guid) -{ - bool delete_result = true; - if (!result) - { - // 0 1 2 3 4 5 6 7 - auto results = CharacterDatabase.PQuery("SELECT name, position_x, position_y, position_z, map, totaltime, leveltime, at_login FROM characters WHERE guid = '%u'", guid); - if (!result) - return false; - } - else - { - delete_result = false; - } - - Field* fields = result->Fetch(); - - // overwrite possible wrong/corrupted guid - Object::_Create(0, guid, 0, HIGHGUID_PLAYER); - - m_name = fields[0].GetString(); - - Relocate(fields[1].GetFloat(), fields[2].GetFloat(), fields[3].GetFloat()); - SetLocationMapId(fields[4].GetUInt32()); - - m_Played_time[PLAYED_TIME_TOTAL] = fields[5].GetUInt32(); - m_Played_time[PLAYED_TIME_LEVEL] = fields[6].GetUInt32(); - - m_atLoginFlags = fields[7].GetUInt32(); - - if (delete_result) - { - for (int i = 0; i < PLAYER_SLOTS_COUNT; ++i) - { - m_items[i] = NULL; - } - } - - if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) - { - m_deathState = DEAD; - } - - return true; -} -#endif - bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder) { // 0 1 2 3 4 5 6 7 8 9 10 11 @@ -16783,7 +16733,7 @@ void Player::PossessSpellInitialize() charmInfo->BuildActionBar(data); data << uint8(0); // spells count - + charm->CharmCooldownInitialize(data); GetSession()->SendPacket(data); @@ -19623,7 +19573,7 @@ void Player::_LoadSkills(std::unique_ptr queryResult) { if (entry->flags & SKILL_FLAG_DISPLAY_AS_MONO) max = GetSkillMaxForLevel(); - + value = max; } diff --git a/src/game/Entities/Player.h b/src/game/Entities/Player.h index 1521fc5715..0006d93837 100644 --- a/src/game/Entities/Player.h +++ b/src/game/Entities/Player.h @@ -1076,9 +1076,8 @@ class Player : public Unit Item* GetItemByGuid(ObjectGuid guid) const; Item* GetItemByPos(uint16 pos) const; Item* GetItemByPos(uint8 bag, uint8 slot) const; -#ifdef ENABLE_PLAYERBOTS Item* GetItemByEntry(uint32 item) const; -#endif + Item* GetWeaponForAttack(WeaponAttackType attackType) const { return GetWeaponForAttack(attackType, false, false); } Item* GetWeaponForAttack(WeaponAttackType attackType, bool nonbroken, bool useable) const; Item* GetShield(bool useable = false) const; @@ -1361,10 +1360,6 @@ class Player : public Unit /*** LOAD SYSTEM ***/ /*********************************************************/ -#ifdef ENABLE_PLAYERBOTS - bool MinimalLoadFromDB(QueryResult* result, uint32 guid); -#endif - bool LoadFromDB(ObjectGuid guid, SqlQueryHolder* holder); static uint32 GetZoneIdFromDB(ObjectGuid guid); diff --git a/src/game/Entities/QueryHandler.cpp b/src/game/Entities/QueryHandler.cpp index f175cd13d1..757c38cf03 100644 --- a/src/game/Entities/QueryHandler.cpp +++ b/src/game/Entities/QueryHandler.cpp @@ -23,7 +23,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Entities/ObjectGuid.h" diff --git a/src/game/Entities/SkillHandler.cpp b/src/game/Entities/SkillHandler.cpp index bcdd3c752c..efecd51c11 100644 --- a/src/game/Entities/SkillHandler.cpp +++ b/src/game/Entities/SkillHandler.cpp @@ -18,7 +18,7 @@ #include "Common.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" diff --git a/src/game/Entities/TemporarySpawn.cpp b/src/game/Entities/TemporarySpawn.cpp index dd4d1a91cb..5ae62adfaa 100644 --- a/src/game/Entities/TemporarySpawn.cpp +++ b/src/game/Entities/TemporarySpawn.cpp @@ -17,7 +17,7 @@ */ #include "Entities/TemporarySpawn.h" -#include "Log.h" +#include "Log/Log.h" #include "AI/BaseAI/CreatureAI.h" TemporarySpawn::TemporarySpawn(ObjectGuid summoner) : diff --git a/src/game/Entities/Totem.cpp b/src/game/Entities/Totem.cpp index cfb0da7771..0dfaafccc6 100644 --- a/src/game/Entities/Totem.cpp +++ b/src/game/Entities/Totem.cpp @@ -17,7 +17,7 @@ */ #include "Entities/Totem.h" -#include "Log.h" +#include "Log/Log.h" #include "Groups/Group.h" #include "Entities/Player.h" #include "Globals/ObjectMgr.h" diff --git a/src/game/Entities/Unit.cpp b/src/game/Entities/Unit.cpp index 0724d884a0..cadae95900 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -17,7 +17,7 @@ */ #include "Entities/Unit.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" diff --git a/src/game/Entities/UpdateData.cpp b/src/game/Entities/UpdateData.cpp index 514c082eed..9f21715d09 100644 --- a/src/game/Entities/UpdateData.cpp +++ b/src/game/Entities/UpdateData.cpp @@ -22,7 +22,7 @@ #include "Entities/UpdateData.h" #include "Util/ByteBuffer.h" #include "Server/WorldPacket.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "World/World.h" #include "Entities/ObjectGuid.h" diff --git a/src/game/Entities/UpdateFields.cpp b/src/game/Entities/UpdateFields.cpp index 7e7770b127..703279c2bc 100644 --- a/src/game/Entities/UpdateFields.cpp +++ b/src/game/Entities/UpdateFields.cpp @@ -18,7 +18,7 @@ #include "UpdateFields.h" -#include "Log.h" +#include "Log/Log.h" #include "ObjectGuid.h" #include #include diff --git a/src/game/GMTickets/GMTicketHandler.cpp b/src/game/GMTickets/GMTicketHandler.cpp index 60fe0a4486..393955019c 100644 --- a/src/game/GMTickets/GMTicketHandler.cpp +++ b/src/game/GMTickets/GMTicketHandler.cpp @@ -19,7 +19,7 @@ #include "Common.h" #include "Tools/Language.h" #include "Server/WorldPacket.h" -#include "Log.h" +#include "Log/Log.h" #include "GMTickets/GMTicketMgr.h" #include "Globals/ObjectAccessor.h" #include "Entities/Player.h" diff --git a/src/game/GameEvents/GameEventMgr.cpp b/src/game/GameEvents/GameEventMgr.cpp index 0493697e7b..d2a30e4eff 100644 --- a/src/game/GameEvents/GameEventMgr.cpp +++ b/src/game/GameEvents/GameEventMgr.cpp @@ -23,7 +23,7 @@ #include "Pools/PoolManager.h" #include "Util/ProgressBar.h" #include "Tools/Language.h" -#include "Log.h" +#include "Log/Log.h" #include "Maps/MapManager.h" #include "BattleGround/BattleGroundMgr.h" #include "Mails/MassMailMgr.h" diff --git a/src/game/Globals/ObjectMgr.cpp b/src/game/Globals/ObjectMgr.cpp index 2c0c1f489d..97228d9ba9 100644 --- a/src/game/Globals/ObjectMgr.cpp +++ b/src/game/Globals/ObjectMgr.cpp @@ -21,7 +21,7 @@ #include "Policies/Singleton.h" #include "Server/SQLStorages.h" -#include "Log.h" +#include "Log/Log.h" #include "Maps/MapManager.h" #include "Entities/ObjectGuid.h" #include "AI/ScriptDevAI/ScriptDevAIMgr.h" diff --git a/src/game/Globals/UnitCondition.cpp b/src/game/Globals/UnitCondition.cpp index 13300e2be7..be0272ccb1 100644 --- a/src/game/Globals/UnitCondition.cpp +++ b/src/game/Globals/UnitCondition.cpp @@ -24,7 +24,7 @@ #include "MotionGenerators/MovementGenerator.h" #include "Spells/SpellAuras.h" #include "Util/ProgressBar.h" -#include "Log.h" +#include "Log/Log.h" std::shared_ptr> UnitConditionMgr::Load() { diff --git a/src/game/Grids/GridNotifiers.h b/src/game/Grids/GridNotifiers.h index 70dc577f30..a0b22c3c3d 100644 --- a/src/game/Grids/GridNotifiers.h +++ b/src/game/Grids/GridNotifiers.h @@ -319,7 +319,6 @@ namespace MaNGOS template void Visit(GridRefManager&) {} }; -#ifdef ENABLE_PLAYERBOTS template struct DynamicObjectListSearcher { @@ -332,7 +331,6 @@ namespace MaNGOS template void Visit(GridRefManager&) {} }; -#endif // Unit searchers @@ -692,7 +690,7 @@ namespace MaNGOS // prevent clone this object AllGameObjectEntriesListInObjectRangeCheck(AllGameObjectEntriesListInObjectRangeCheck const&); }; - + // combine with above somehow? fuck class AllGameObjectsMatchingOneEntryInRange { @@ -981,7 +979,7 @@ namespace MaNGOS // ignore totems if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem()) return false; - + return u->IsAlive() && i_obj->CanAttackSpell(u) && i_obj->IsWithinDistInMap(u, i_range) && i_obj->IsWithinLOSInMap(u); } private: @@ -1005,7 +1003,7 @@ namespace MaNGOS SpellEntry const* i_spellInfo; float i_range; }; - + class AnyFriendlyUnitInObjectRangeCheck { public: diff --git a/src/game/Grids/GridNotifiersImpl.h b/src/game/Grids/GridNotifiersImpl.h index 96ce855bdf..629163d394 100644 --- a/src/game/Grids/GridNotifiersImpl.h +++ b/src/game/Grids/GridNotifiersImpl.h @@ -480,8 +480,6 @@ void MaNGOS::GameObjectListSearcher::Visit(GameObjectMapType& m) i_objects.push_back(itr->getSource()); } -#ifdef ENABLE_PLAYERBOTS - // Dynamicobject searchers template @@ -492,8 +490,6 @@ void MaNGOS::DynamicObjectListSearcher::Visit(DynamicObjectMapType& m) i_objects.push_back(itr->getSource()); } -#endif - // Unit searchers template diff --git a/src/game/Grids/GridStates.cpp b/src/game/Grids/GridStates.cpp index 9fc42f4ed9..8637147e9a 100644 --- a/src/game/Grids/GridStates.cpp +++ b/src/game/Grids/GridStates.cpp @@ -17,7 +17,7 @@ */ #include "Grids/GridStates.h" -#include "Log.h" +#include "Log/Log.h" void InvalidState::Update(Map&, NGridType&, GridInfo&, const uint32& /*x*/, const uint32& /*y*/, const uint32&) const diff --git a/src/game/Groups/Group.h b/src/game/Groups/Group.h index 8e5d186469..a751b2b188 100644 --- a/src/game/Groups/Group.h +++ b/src/game/Groups/Group.h @@ -289,9 +289,7 @@ class Group void CalculateLFGRoles(LFGGroupQueueInfo& data); bool FillPremadeLFG(ObjectGuid const& plrGuid, Classes playerClass, LfgRoles requiredRole, uint32& InitRoles, uint32& DpsCount, std::list& processed); -#ifdef ENABLE_PLAYERBOTS ObjectGuid GetTargetIcon(int index) { return m_targetIcons[index]; } -#endif protected: bool _addMember(ObjectGuid guid, const char* name, bool isAssistant = false); diff --git a/src/game/Groups/GroupHandler.cpp b/src/game/Groups/GroupHandler.cpp index 59e6fbb990..3ea4ea91bc 100644 --- a/src/game/Groups/GroupHandler.cpp +++ b/src/game/Groups/GroupHandler.cpp @@ -19,7 +19,7 @@ #include "Common.h" #include "Database/DatabaseEnv.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "World/World.h" diff --git a/src/game/Guilds/GuildHandler.cpp b/src/game/Guilds/GuildHandler.cpp index 2b0d0fb58a..61fc878489 100644 --- a/src/game/Guilds/GuildHandler.cpp +++ b/src/game/Guilds/GuildHandler.cpp @@ -21,7 +21,7 @@ #include "Server/WorldSession.h" #include "World/World.h" #include "Globals/ObjectMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Guilds/Guild.h" #include "Guilds/GuildMgr.h" diff --git a/src/game/Guilds/GuildMgr.cpp b/src/game/Guilds/GuildMgr.cpp index 1dc51f34eb..24fd1b6df3 100644 --- a/src/game/Guilds/GuildMgr.cpp +++ b/src/game/Guilds/GuildMgr.cpp @@ -18,7 +18,7 @@ #include "Guilds/GuildMgr.h" #include "Guilds/Guild.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/ObjectGuid.h" #include "Database/DatabaseEnv.h" #include "Policies/Singleton.h" diff --git a/src/game/LFG/LFGHandler.cpp b/src/game/LFG/LFGHandler.cpp index 36b97901f8..4d0c195373 100644 --- a/src/game/LFG/LFGHandler.cpp +++ b/src/game/LFG/LFGHandler.cpp @@ -19,7 +19,7 @@ #include "Common.h" #include "Server/WorldPacket.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" #include "Globals/ObjectMgr.h" #include "Server/WorldSession.h" diff --git a/src/game/LFG/LFGQueue.cpp b/src/game/LFG/LFGQueue.cpp index bd39af1dc5..43419ca2b4 100644 --- a/src/game/LFG/LFGQueue.cpp +++ b/src/game/LFG/LFGQueue.cpp @@ -572,4 +572,4 @@ MeetingStoneSet LFGQueue::GetDungeonsForPlayer(Player* player) } return list; } -#endif +#endif \ No newline at end of file diff --git a/src/game/Loot/LootHandler.cpp b/src/game/Loot/LootHandler.cpp index 95b010284c..3f8e233666 100644 --- a/src/game/Loot/LootHandler.cpp +++ b/src/game/Loot/LootHandler.cpp @@ -18,7 +18,7 @@ #include "Common.h" #include "Server/WorldPacket.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" #include "Globals/ObjectAccessor.h" #include "Entities/ObjectGuid.h" diff --git a/src/game/Loot/LootMgr.cpp b/src/game/Loot/LootMgr.cpp index 6dff17efa2..5d3f1933e6 100644 --- a/src/game/Loot/LootMgr.cpp +++ b/src/game/Loot/LootMgr.cpp @@ -17,7 +17,7 @@ */ #include "Loot/LootMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/ProgressBar.h" #include "World/World.h" #include "Util/Util.h" diff --git a/src/game/Mails/Mail.cpp b/src/game/Mails/Mail.cpp index 92d8e41412..fd7d00db59 100644 --- a/src/game/Mails/Mail.cpp +++ b/src/game/Mails/Mail.cpp @@ -27,7 +27,7 @@ #include "Mails/Mail.h" #include "Server/WorldSession.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Entities/ObjectGuid.h" diff --git a/src/game/Mails/MailHandler.cpp b/src/game/Mails/MailHandler.cpp index 74764a7fd4..c81606732b 100644 --- a/src/game/Mails/MailHandler.cpp +++ b/src/game/Mails/MailHandler.cpp @@ -27,7 +27,7 @@ #include "Mails/Mail.h" #include "Tools/Language.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/ObjectGuid.h" #include "Globals/ObjectMgr.h" #include "Entities/Item.h" diff --git a/src/game/Maps/GridMap.cpp b/src/game/Maps/GridMap.cpp index dc91c587a2..f0b5e50bc5 100644 --- a/src/game/Maps/GridMap.cpp +++ b/src/game/Maps/GridMap.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "Log.h" +#include "Log/Log.h" #include "Grids/CellImpl.h" #include "GridDefines.h" #include "Maps/Map.h" diff --git a/src/game/Maps/Map.cpp b/src/game/Maps/Map.cpp index cd988a59e3..cb8e4a2dfd 100644 --- a/src/game/Maps/Map.cpp +++ b/src/game/Maps/Map.cpp @@ -20,7 +20,7 @@ #include "Maps/MapManager.h" #include "Entities/Player.h" #include "Grids/GridNotifiers.h" -#include "Log.h" +#include "Log/Log.h" #include "Grids/ObjectGridLoader.h" #include "Grids/CellImpl.h" #include "GridDefines.h" @@ -47,7 +47,7 @@ #include #ifdef ENABLE_PLAYERBOTS -#include "playerbot.h" +#include "playerbot/playerbot.h" #endif Map::~Map() diff --git a/src/game/Maps/MapManager.cpp b/src/game/Maps/MapManager.cpp index b42f4f02ba..b57d30a65b 100644 --- a/src/game/Maps/MapManager.cpp +++ b/src/game/Maps/MapManager.cpp @@ -20,7 +20,7 @@ #include "Maps/MapPersistentStateMgr.h" #include "Policies/Singleton.h" #include "Database/DatabaseEnv.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Transports.h" #include "Maps/GridDefines.h" #include "World/World.h" diff --git a/src/game/Maps/MapPersistentStateMgr.cpp b/src/game/Maps/MapPersistentStateMgr.cpp index df7991d656..eec03ec0b4 100644 --- a/src/game/Maps/MapPersistentStateMgr.cpp +++ b/src/game/Maps/MapPersistentStateMgr.cpp @@ -20,7 +20,7 @@ #include "Server/SQLStorages.h" #include "Entities/Player.h" -#include "Log.h" +#include "Log/Log.h" #include "Grids/CellImpl.h" #include "Maps/Map.h" #include "Maps/MapManager.h" diff --git a/src/game/Maps/TaxiHandler.cpp b/src/game/Maps/TaxiHandler.cpp index b2da84225f..8dc422bfc4 100644 --- a/src/game/Maps/TaxiHandler.cpp +++ b/src/game/Maps/TaxiHandler.cpp @@ -21,7 +21,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectMgr.h" #include "Entities/Player.h" #include "MotionGenerators/Path.h" diff --git a/src/game/MotionGenerators/MotionMaster.cpp b/src/game/MotionGenerators/MotionMaster.cpp index 18b4502024..0032fb8735 100644 --- a/src/game/MotionGenerators/MotionMaster.cpp +++ b/src/game/MotionGenerators/MotionMaster.cpp @@ -35,7 +35,7 @@ #include "Entities/Player.h" #include "Entities/Pet.h" #include "Server/DBCStores.h" -#include "Log.h" +#include "Log/Log.h" #ifdef BUILD_METRICS #include "Metric/Metric.h" @@ -417,23 +417,12 @@ void MotionMaster::MovePointTOL(uint32 id, float x, float y, float z, bool takeO Mutate(new PointTOLMovementGenerator(id, x, y, z, takeOff, forcedMovement)); } -#ifdef ENABLE_PLAYERBOTS void MotionMaster::MovePath(std::vector& path, ForcedMovement forcedMovement, bool flying, bool cyclic) { return MovePath(path, 0, forcedMovement, flying, cyclic); } -#else -void MotionMaster::MovePath(std::vector& path, ForcedMovement forcedMovement, bool flying) -{ - return MovePath(path, 0, forcedMovement, flying); -} -#endif -#ifdef ENABLE_PLAYERBOTS void MotionMaster::MovePath(std::vector& path, float o, ForcedMovement forcedMovement, bool flying, bool cyclic) -#else -void MotionMaster::MovePath(std::vector& path, float o, ForcedMovement forcedMovement, bool flying) -#endif { if (path.empty()) return; @@ -446,11 +435,7 @@ void MotionMaster::MovePath(std::vector& path, float o, ForcedMove else DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follows a pre-calculated path to X: %f Y: %f Z: %f", m_owner->GetGuidStr().c_str(), x, y, z); -#ifdef ENABLE_PLAYERBOTS Mutate(new FixedPathMovementGenerator(path, o, forcedMovement, flying, 0.0f, 0, cyclic)); -#else - Mutate(new FixedPathMovementGenerator(path, o, forcedMovement, flying)); -#endif } void MotionMaster::MovePath(int32 pathId, WaypointPathOrigin wpOrigin /*= PATH_NO_PATH*/, ForcedMovement forcedMovement, bool flying, float speed, bool cyclic, ObjectGuid guid/* = ObjectGuid()*/) diff --git a/src/game/MotionGenerators/MotionMaster.h b/src/game/MotionGenerators/MotionMaster.h index 368f1fe4a4..4d57c92f3c 100644 --- a/src/game/MotionGenerators/MotionMaster.h +++ b/src/game/MotionGenerators/MotionMaster.h @@ -145,13 +145,10 @@ class MotionMaster : private std::stack void MovePoint(uint32 id, Position const& position, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, float speed = 0.f, bool generatePath = true, ObjectGuid guid = ObjectGuid(), uint32 relayId = 0); void MovePoint(uint32 id, float x, float y, float z, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, bool generatePath = true); void MovePointTOL(uint32 id, float x, float y, float z, bool takeOff, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE); -#ifdef ENABLE_PLAYERBOTS + void MovePath(std::vector& path, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, bool flying = false, bool cyclic = true); void MovePath(std::vector& path, float o, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, bool flying = false, bool cyclic = true); -#else - void MovePath(std::vector& path, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, bool flying = false); - void MovePath(std::vector& path, float o, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, bool flying = false); -#endif + // MovePath can not change speed or flying mid path due to how it works - if you wish to do that, split it into two paths void MovePath(int32 pathId = 0, WaypointPathOrigin wpOrigin = PATH_NO_PATH, ForcedMovement forcedMovement = FORCED_MOVEMENT_NONE, bool flying = false, float speed = 0.f, bool cyclic = false, ObjectGuid guid = ObjectGuid()); void MoveRetreat(float x, float y, float z, float o, uint32 delay); diff --git a/src/game/MotionGenerators/MoveMap.cpp b/src/game/MotionGenerators/MoveMap.cpp index 225108fab9..ac5dc35d51 100644 --- a/src/game/MotionGenerators/MoveMap.cpp +++ b/src/game/MotionGenerators/MoveMap.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Entities/Creature.h" #include "MoveMap.h" diff --git a/src/game/MotionGenerators/MovementHandler.cpp b/src/game/MotionGenerators/MovementHandler.cpp index 62fece1eb6..2ef6729094 100644 --- a/src/game/MotionGenerators/MovementHandler.cpp +++ b/src/game/MotionGenerators/MovementHandler.cpp @@ -20,7 +20,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "Entities/Player.h" #include "Movement/MoveSpline.h" #include "Maps/MapManager.h" diff --git a/src/game/MotionGenerators/PathFinder.cpp b/src/game/MotionGenerators/PathFinder.cpp index 8402d79946..a7ea39217f 100644 --- a/src/game/MotionGenerators/PathFinder.cpp +++ b/src/game/MotionGenerators/PathFinder.cpp @@ -20,7 +20,7 @@ #include "Maps/GridMap.h" #include "Entities/Creature.h" #include "PathFinder.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Entities/Transports.h" #include diff --git a/src/game/MotionGenerators/PathMovementGenerator.cpp b/src/game/MotionGenerators/PathMovementGenerator.cpp index f153166763..ca5474e8cd 100644 --- a/src/game/MotionGenerators/PathMovementGenerator.cpp +++ b/src/game/MotionGenerators/PathMovementGenerator.cpp @@ -26,13 +26,8 @@ #include -#ifdef ENABLE_PLAYERBOTS AbstractPathMovementGenerator::AbstractPathMovementGenerator(const Movement::PointsArray& path, float orientation, int32 offset/* = 0*/, bool cyclic/* = true*/) : m_pathIndex(offset), m_orientation(orientation), m_firstCycle(false), m_startPoint(0), m_speedChanged(false), m_cyclic(cyclic) -#else -AbstractPathMovementGenerator::AbstractPathMovementGenerator(const Movement::PointsArray& path, float orientation, int32 offset/* = 0*/) : - m_pathIndex(offset), m_orientation(orientation), m_firstCycle(false), m_startPoint(0), m_speedChanged(false) -#endif { for (size_t i = 0; i < path.size(); ++i) m_path[i] = { path[i].x, path[i].y, path[i].z, ((i + 1) == path.size() ? orientation : 0), 0, 0 }; diff --git a/src/game/MotionGenerators/PathMovementGenerator.h b/src/game/MotionGenerators/PathMovementGenerator.h index ff39803608..e9606fbbd3 100644 --- a/src/game/MotionGenerators/PathMovementGenerator.h +++ b/src/game/MotionGenerators/PathMovementGenerator.h @@ -29,11 +29,8 @@ class AbstractPathMovementGenerator : public MovementGenerator { public: -#ifdef ENABLE_PLAYERBOTS explicit AbstractPathMovementGenerator(const Movement::PointsArray& path, float orientation = 0, int32 offset = 0, bool cyclic = true); -#else - explicit AbstractPathMovementGenerator(const Movement::PointsArray& path, float orientation = 0, int32 offset = 0); -#endif + explicit AbstractPathMovementGenerator(const WaypointPath* path, int32 offset = 0, bool cyclic = false, ObjectGuid guid = ObjectGuid()); void Initialize(Unit& owner) override; @@ -65,17 +62,11 @@ class AbstractPathMovementGenerator : public MovementGenerator class FixedPathMovementGenerator : public AbstractPathMovementGenerator { public: -#ifdef ENABLE_PLAYERBOTS FixedPathMovementGenerator(const Movement::PointsArray& path, float orientation, uint32 forcedMovement, bool flying = false, float speed = 0, int32 offset = 0, bool cyclic = true) : AbstractPathMovementGenerator(path, orientation, offset, cyclic), m_flying(flying), m_speed(speed), m_forcedMovement(forcedMovement) {} FixedPathMovementGenerator(const Movement::PointsArray& path, uint32 forcedMovement, bool flying = false, float speed = 0, int32 offset = 0, bool cyclic = true) : FixedPathMovementGenerator(path, 0, forcedMovement, flying, speed, offset, cyclic) {} -#else - FixedPathMovementGenerator(const Movement::PointsArray& path, float orientation, uint32 forcedMovement, bool flying = false, float speed = 0, int32 offset = 0) : - AbstractPathMovementGenerator(path, orientation, offset), m_flying(flying), m_speed(speed), m_forcedMovement(forcedMovement) {} - FixedPathMovementGenerator(const Movement::PointsArray& path, uint32 forcedMovement, bool flying = false, float speed = 0, int32 offset = 0) : - FixedPathMovementGenerator(path, 0, forcedMovement, flying, speed, offset) {} -#endif + FixedPathMovementGenerator(Unit& unit, int32 pathId, WaypointPathOrigin wpOrigin, ForcedMovement forcedMovement, bool flying = false, float speed = 0, int32 offset = 0, bool cyclic = false, ObjectGuid guid = ObjectGuid()); FixedPathMovementGenerator(Creature& creature); diff --git a/src/game/Movement/MoveSpline.cpp b/src/game/Movement/MoveSpline.cpp index 9c0242be09..0bba158d8b 100644 --- a/src/game/Movement/MoveSpline.cpp +++ b/src/game/Movement/MoveSpline.cpp @@ -18,7 +18,7 @@ #include "MoveSpline.h" #include -#include "Log.h" +#include "Log/Log.h" #include "Entities/Unit.h" namespace Movement diff --git a/src/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/game/OutdoorPvP/OutdoorPvPMgr.cpp index 356d573d69..53453d512d 100644 --- a/src/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -20,7 +20,7 @@ #include "Policies/Singleton.h" #include "OutdoorPvP.h" #include "World/World.h" -#include "Log.h" +#include "Log/Log.h" #include "OutdoorPvPEP.h" #include "OutdoorPvPSI.h" diff --git a/src/game/PlayerBot/Base/PlayerbotAI.cpp b/src/game/PlayerBot/Base/PlayerbotAI.cpp index e9ce7f856b..8148a4773b 100644 --- a/src/game/PlayerBot/Base/PlayerbotAI.cpp +++ b/src/game/PlayerBot/Base/PlayerbotAI.cpp @@ -18,7 +18,7 @@ #include #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/WorldPacket.h" #include "Database/DatabaseEnv.h" #include "PlayerbotAI.h" diff --git a/src/game/Pools/PoolManager.cpp b/src/game/Pools/PoolManager.cpp index 145afe5dc9..98dfd6e32b 100644 --- a/src/game/Pools/PoolManager.cpp +++ b/src/game/Pools/PoolManager.cpp @@ -20,7 +20,7 @@ #include "Globals/ObjectMgr.h" #include "Entities/ObjectGuid.h" #include "Util/ProgressBar.h" -#include "Log.h" +#include "Log/Log.h" #include "Maps/MapPersistentStateMgr.h" #include "World/World.h" #include "Policies/Singleton.h" diff --git a/src/game/Quests/QuestHandler.cpp b/src/game/Quests/QuestHandler.cpp index a2abbd5748..a42858c600 100644 --- a/src/game/Quests/QuestHandler.cpp +++ b/src/game/Quests/QuestHandler.cpp @@ -17,7 +17,7 @@ */ #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" diff --git a/src/game/Server/AuthCrypt.cpp b/src/game/Server/AuthCrypt.cpp index 5a74658312..a77d5818c9 100644 --- a/src/game/Server/AuthCrypt.cpp +++ b/src/game/Server/AuthCrypt.cpp @@ -17,7 +17,7 @@ */ #include "AuthCrypt.h" -#include "Log.h" +#include "Log/Log.h" #include "Auth/BigNumber.h" AuthCrypt::AuthCrypt() : _initialized(false) {} diff --git a/src/game/Server/DBCStores.cpp b/src/game/Server/DBCStores.cpp index f92f65957e..0eeeb6987d 100644 --- a/src/game/Server/DBCStores.cpp +++ b/src/game/Server/DBCStores.cpp @@ -18,7 +18,7 @@ #include "Server/DBCStores.h" #include "Policies/Singleton.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/ProgressBar.h" #include "Util/Util.h" #include "Globals/Locales.h" diff --git a/src/game/Server/WorldSession.cpp b/src/game/Server/WorldSession.cpp index 6fb5d1d02b..979166a1e6 100644 --- a/src/game/Server/WorldSession.cpp +++ b/src/game/Server/WorldSession.cpp @@ -24,7 +24,7 @@ #include "Common.h" #include "Auth/CryptoHash.h" #include "Database/DatabaseEnv.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Server/WorldPacket.h" #include "Server/WorldSession.h" @@ -53,7 +53,7 @@ #endif #ifdef ENABLE_PLAYERBOTS -#include "playerbot.h" +#include "playerbot/playerbot.h" #endif // select opcodes appropriate for processing in Map::Update context for current session state diff --git a/src/game/Server/WorldSocket.cpp b/src/game/Server/WorldSocket.cpp index 8bf9abe3cb..95bce1b803 100644 --- a/src/game/Server/WorldSocket.cpp +++ b/src/game/Server/WorldSocket.cpp @@ -30,7 +30,7 @@ #include "Database/DatabaseEnv.h" #include "Auth/CryptoHash.h" #include "Server/WorldSession.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/DBCStores.h" #include "Util/CommonDefines.h" #include "Anticheat/Anticheat.hpp" diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 48d33caba7..7c7d055824 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -23,7 +23,7 @@ #include "Grids/GridNotifiers.h" #include "Grids/GridNotifiersImpl.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" @@ -48,7 +48,7 @@ #include "Entities/ObjectGuid.h" #ifdef ENABLE_PLAYERBOTS -#include "PlayerbotAI.h" +#include "playerbot/PlayerbotAI.h" #endif extern pEffect SpellEffects[MAX_SPELL_EFFECTS]; diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index 796ac0a8d3..a3069a20bd 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -21,7 +21,7 @@ #include "Server/WorldPacket.h" #include "Server/WorldSession.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" diff --git a/src/game/Spells/SpellEffects.cpp b/src/game/Spells/SpellEffects.cpp index c261102852..26582829fd 100644 --- a/src/game/Spells/SpellEffects.cpp +++ b/src/game/Spells/SpellEffects.cpp @@ -20,7 +20,7 @@ #include "Database/DatabaseEnv.h" #include "Server/WorldPacket.h" #include "Server/Opcodes.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" diff --git a/src/game/Spells/SpellHandler.cpp b/src/game/Spells/SpellHandler.cpp index 7707afcbb3..2f2e4d71f8 100644 --- a/src/game/Spells/SpellHandler.cpp +++ b/src/game/Spells/SpellHandler.cpp @@ -22,7 +22,7 @@ #include "Server/WorldSession.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Spells/Spell.h" #include "AI/ScriptDevAI/ScriptDevAIMgr.h" diff --git a/src/game/Spells/SpellTargets.cpp b/src/game/Spells/SpellTargets.cpp index 4627b219df..5f745699f3 100644 --- a/src/game/Spells/SpellTargets.cpp +++ b/src/game/Spells/SpellTargets.cpp @@ -21,7 +21,7 @@ #include "Spells/SpellMgr.h" #include "Server/DBCStructure.h" #include "Server/SQLStorages.h" -#include "Log.h" +#include "Log/Log.h" SpellTargetInfo::SpellTargetInfo(char const* name, SpellTargetImplicitType type, SpellTargetFilter filter, SpellTargetEnumerator enumerator, SpellTargetLOS los) : name(name), type(type), filter(filter), enumerator(enumerator), los(los) diff --git a/src/game/Spells/UnitAuraProcHandler.cpp b/src/game/Spells/UnitAuraProcHandler.cpp index dd7235d225..473833735b 100644 --- a/src/game/Spells/UnitAuraProcHandler.cpp +++ b/src/game/Spells/UnitAuraProcHandler.cpp @@ -17,7 +17,7 @@ */ #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Globals/ObjectMgr.h" #include "Spells/SpellMgr.h" #include "Entities/Player.h" diff --git a/src/game/Trade/TradeHandler.cpp b/src/game/Trade/TradeHandler.cpp index eb6c89f8df..fdbd37ac4b 100644 --- a/src/game/Trade/TradeHandler.cpp +++ b/src/game/Trade/TradeHandler.cpp @@ -21,7 +21,7 @@ #include "Server/WorldSession.h" #include "World/World.h" #include "Globals/ObjectAccessor.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Entities/Player.h" #include "Entities/Item.h" diff --git a/src/game/Weather/Weather.cpp b/src/game/Weather/Weather.cpp index 7f049481fd..157287496e 100644 --- a/src/game/Weather/Weather.cpp +++ b/src/game/Weather/Weather.cpp @@ -26,7 +26,7 @@ #include "Maps/Map.h" #include "World/World.h" #include "Server/WorldPacket.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/Util.h" #include "Util/ProgressBar.h" diff --git a/src/game/World/World.cpp b/src/game/World/World.cpp index 00d5d98aec..43ba36d73a 100644 --- a/src/game/World/World.cpp +++ b/src/game/World/World.cpp @@ -25,7 +25,7 @@ #include "Config/Config.h" #include "Platform/Define.h" #include "SystemConfig.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/Opcodes.h" #include "Server/WorldSession.h" #include "Server/WorldPacket.h" @@ -78,9 +78,9 @@ #endif #ifdef ENABLE_PLAYERBOTS -#include "AhBot.h" -#include "PlayerbotAIConfig.h" -#include "RandomPlayerbotMgr.h" +#include "ahbot/AhBot.h" +#include "playerbot/PlayerbotAIConfig.h" +#include "playerbot/RandomPlayerbotMgr.h" #endif #include diff --git a/src/game/pchdef.h b/src/game/pchdef.h index 4582bb6057..1b00f81995 100644 --- a/src/game/pchdef.h +++ b/src/game/pchdef.h @@ -27,7 +27,7 @@ #include #include #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Server/SQLStorages.h" #include "Server/DBCStructure.h" #include "Server/DBCStores.h" diff --git a/src/game/vmap/DynamicTree.cpp b/src/game/vmap/DynamicTree.cpp index 95b16534cd..0be5f1d0cf 100644 --- a/src/game/vmap/DynamicTree.cpp +++ b/src/game/vmap/DynamicTree.cpp @@ -17,7 +17,7 @@ */ #include "DynamicTree.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/Timer.h" #include "BIHWrap.h" #include "RegularGrid.h" diff --git a/src/game/vmap/VMapDefinitions.h b/src/game/vmap/VMapDefinitions.h index 28976687bb..c59f4d9e6d 100644 --- a/src/game/vmap/VMapDefinitions.h +++ b/src/game/vmap/VMapDefinitions.h @@ -33,7 +33,7 @@ namespace VMAP #ifndef NO_CORE_FUNCS #include "Util/Errors.h" -#include "Log.h" +#include "Log/Log.h" #define ERROR_LOG(...) sLog.outError(__VA_ARGS__); #elif defined MMAP_GENERATOR #include diff --git a/src/mangosd/CMakeLists.txt b/src/mangosd/CMakeLists.txt index 6d262bb9b0..89efe1756a 100644 --- a/src/mangosd/CMakeLists.txt +++ b/src/mangosd/CMakeLists.txt @@ -89,12 +89,17 @@ if(WIN32) add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/game/Anticheat/module/warden_modules/ $/warden_modules DEPENDS ${EXECUTABLE_NAME}) - + 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() + if(BUILD_PLAYERBOTS) + add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different \"${CMAKE_SOURCE_DIR}/src/modules/PlayerBots/playerbot/aiplayerbot.conf.dist.in\" \"$/playerbot.conf.dist\") + endif() + if(BUILD_AHBOT) add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different \"${CMAKE_SOURCE_DIR}/src/game/AuctionHouseBot/ahbot.conf.dist.in\" \"$/ahbot.conf.dist\") diff --git a/src/mangosd/CliRunnable.cpp b/src/mangosd/CliRunnable.cpp index 627c452f7a..8ba7b7d172 100644 --- a/src/mangosd/CliRunnable.cpp +++ b/src/mangosd/CliRunnable.cpp @@ -22,7 +22,7 @@ #include "Common.h" #include "Tools/Language.h" -#include "Log.h" +#include "Log/Log.h" #include "World/World.h" #include "Globals/ObjectMgr.h" #include "Server/WorldSession.h" diff --git a/src/mangosd/MaNGOSsoap.h b/src/mangosd/MaNGOSsoap.h index 9c20df215a..5774e862bb 100644 --- a/src/mangosd/MaNGOSsoap.h +++ b/src/mangosd/MaNGOSsoap.h @@ -22,7 +22,7 @@ #include "Common.h" #include "World/World.h" #include "Accounts/AccountMgr.h" -#include "Log.h" +#include "Log/Log.h" #include "soapH.h" #include "soapStub.h" diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index 4836d292f6..10be8aa018 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -24,7 +24,7 @@ #include "Database/DatabaseEnv.h" #include "Config/Config.h" #include "Util/ProgressBar.h" -#include "Log.h" +#include "Log/Log.h" #include "Master.h" #include "SystemConfig.h" #include "AuctionHouseBot/AuctionHouseBot.h" diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp index 740d4af605..41659f619d 100644 --- a/src/mangosd/Master.cpp +++ b/src/mangosd/Master.cpp @@ -25,7 +25,7 @@ #include "Server/WorldSocket.h" #include "WorldRunnable.h" #include "World/World.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/Timer.h" #include "SystemConfig.h" #include "CliRunnable.h" diff --git a/src/mangosd/RASocket.cpp b/src/mangosd/RASocket.cpp index 463a51d6b0..20b7fd328f 100644 --- a/src/mangosd/RASocket.cpp +++ b/src/mangosd/RASocket.cpp @@ -22,7 +22,7 @@ #include "Common.h" #include "Database/DatabaseEnv.h" -#include "Log.h" +#include "Log/Log.h" #include "RASocket.h" #include "World/World.h" #include "Config/Config.h" diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp index 2789b91a4c..f2f52db9bd 100644 --- a/src/realmd/AuthSocket.cpp +++ b/src/realmd/AuthSocket.cpp @@ -25,7 +25,7 @@ #include "Auth/base32.h" #include "Database/DatabaseEnv.h" #include "Config/Config.h" -#include "Log.h" +#include "Log/Log.h" #include "RealmList.h" #include "AuthSocket.h" #include "AuthCodes.h" diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp index ad8b29c925..f3ed57f07a 100644 --- a/src/realmd/Main.cpp +++ b/src/realmd/Main.cpp @@ -25,7 +25,7 @@ #include "RealmList.h" #include "Config/Config.h" -#include "Log.h" +#include "Log/Log.h" #include "AuthSocket.h" #include "SystemConfig.h" #include "revision.h" diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt index d77694dad9..1235ddf2aa 100644 --- a/src/shared/CMakeLists.txt +++ b/src/shared/CMakeLists.txt @@ -76,8 +76,8 @@ set(SRC_GRP_DATABASE_DBC ) set(SRC_GRP_LOG - Log.cpp - Log.h + Log/Log.cpp + Log/Log.h ) set(SRC_GRP_MT diff --git a/src/shared/Database/DatabaseEnv.h b/src/shared/Database/DatabaseEnv.h index 5cfd5cabeb..923ba0f05b 100644 --- a/src/shared/Database/DatabaseEnv.h +++ b/src/shared/Database/DatabaseEnv.h @@ -20,7 +20,6 @@ #define DATABASEENV_H #include "Common.h" -#include "Log.h" #include "Util/Errors.h" #include "Database/Field.h" diff --git a/src/shared/Database/SQLStorageImpl.h b/src/shared/Database/SQLStorageImpl.h index 273bc12eb5..f89852d960 100644 --- a/src/shared/Database/SQLStorageImpl.h +++ b/src/shared/Database/SQLStorageImpl.h @@ -20,7 +20,7 @@ #define SQLSTORAGE_IMPL_H #include "Util/ProgressBar.h" -#include "Log.h" +#include "Log/Log.h" #include "DBCFileLoader.h" template diff --git a/src/shared/Log.cpp b/src/shared/Log/Log.cpp similarity index 99% rename from src/shared/Log.cpp rename to src/shared/Log/Log.cpp index 7710676edc..551c973d6d 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log/Log.cpp @@ -17,7 +17,7 @@ */ #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Policies/Singleton.h" #include "Config/Config.h" #include "Util/Util.h" diff --git a/src/shared/Log.h b/src/shared/Log/Log.h similarity index 100% rename from src/shared/Log.h rename to src/shared/Log/Log.h diff --git a/src/shared/Network/Socket.cpp b/src/shared/Network/Socket.cpp index d992caa494..8ff39cb811 100644 --- a/src/shared/Network/Socket.cpp +++ b/src/shared/Network/Socket.cpp @@ -17,7 +17,7 @@ */ #include "Socket.hpp" -#include "Log.h" +#include "Log/Log.h" #include #include diff --git a/src/shared/Platform/ServiceWin32.cpp b/src/shared/Platform/ServiceWin32.cpp index ed56b4c87f..020556225a 100644 --- a/src/shared/Platform/ServiceWin32.cpp +++ b/src/shared/Platform/ServiceWin32.cpp @@ -19,7 +19,7 @@ #ifdef _WIN32 #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include #include #include diff --git a/src/shared/Util/ByteBuffer.cpp b/src/shared/Util/ByteBuffer.cpp index 3f856f1188..c4b739dd66 100644 --- a/src/shared/Util/ByteBuffer.cpp +++ b/src/shared/Util/ByteBuffer.cpp @@ -17,7 +17,7 @@ */ #include "ByteBuffer.h" -#include "Log.h" +#include "Log/Log.h" void ByteBufferException::PrintPosError() const { diff --git a/src/shared/pchdef.h b/src/shared/pchdef.h index 504f193fe2..586ee3ae31 100644 --- a/src/shared/pchdef.h +++ b/src/shared/pchdef.h @@ -26,7 +26,7 @@ #include #include #include "Common.h" -#include "Log.h" +#include "Log/Log.h" #include "Util/ByteBuffer.h" #include "Util/ProgressBar.h" #include "Server/WorldPacket.h"