refactor(src/server/game): optimise imports (#20541)

This commit is contained in:
Francesco Borzì
2024-11-13 11:37:20 +01:00
committed by GitHub
parent b2ddd10369
commit a9f0f371e5
45 changed files with 44 additions and 35 deletions
@@ -22,6 +22,7 @@
#include "Duration.h" #include "Duration.h"
#include "Log.h" #include "Log.h"
#include "MotdMgr.h" #include "MotdMgr.h"
#include "QueryResult.h"
#include "SRP6.h" #include "SRP6.h"
#include "Util.h" #include "Util.h"
#include "World.h" #include "World.h"
@@ -18,9 +18,7 @@
#ifndef ACORE_SMARTSCRIPT_H #ifndef ACORE_SMARTSCRIPT_H
#define ACORE_SMARTSCRIPT_H #define ACORE_SMARTSCRIPT_H
#include "Common.h"
#include "Creature.h" #include "Creature.h"
#include "CreatureAI.h"
#include "GridNotifiers.h" #include "GridNotifiers.h"
#include "SmartScriptMgr.h" #include "SmartScriptMgr.h"
#include "Spell.h" #include "Spell.h"
@@ -20,12 +20,11 @@
#include "Common.h" #include "Common.h"
#include "Creature.h" #include "Creature.h"
#include "CreatureAI.h"
#include "DBCStores.h" #include "DBCStores.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Optional.h" #include "Optional.h"
#include "Spell.h"
#include "SpellMgr.h" #include "SpellMgr.h"
#include "Unit.h"
#include <limits> #include <limits>
typedef uint32 SAIBool; typedef uint32 SAIBool;
@@ -20,7 +20,6 @@
#include "Battlefield.h" #include "Battlefield.h"
#include "Log.h" #include "Log.h"
#include "ObjectAccessor.h"
#include "World.h" #include "World.h"
class Group; class Group;
@@ -19,9 +19,10 @@
#define __BATTLEGROUNDQUEUE_H #define __BATTLEGROUNDQUEUE_H
#include "Battleground.h" #include "Battleground.h"
#include "Common.h"
#include "DBCEnums.h" #include "DBCEnums.h"
#include "EventProcessor.h" #include "EventProcessor.h"
#include "ObjectGuid.h"
#include "SharedDefines.h"
#include <array> #include <array>
constexpr auto COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME = 10; constexpr auto COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME = 10;
-1
View File
@@ -18,7 +18,6 @@
#ifndef _CHANNEL_H #ifndef _CHANNEL_H
#define _CHANNEL_H #define _CHANNEL_H
#include "Common.h"
#include "WorldPacket.h" #include "WorldPacket.h"
#include "WorldSession.h" #include "WorldSession.h"
#include <string> #include <string>
+1
View File
@@ -23,6 +23,7 @@
#include "SharedDefines.h" #include "SharedDefines.h"
#include "SpellInfo.h" #include "SpellInfo.h"
#include "SpellMgr.h" #include "SpellMgr.h"
#include "World.h"
using namespace Acore::Hyperlinks; using namespace Acore::Hyperlinks;
@@ -18,8 +18,6 @@
#ifndef _LFGQUEUE_H #ifndef _LFGQUEUE_H
#define _LFGQUEUE_H #define _LFGQUEUE_H
#include <utility>
#include "LFG.h" #include "LFG.h"
namespace lfg namespace lfg
@@ -22,10 +22,8 @@
#include "CharmInfo.h" #include "CharmInfo.h"
#include "Common.h" #include "Common.h"
#include "CreatureData.h" #include "CreatureData.h"
#include "DatabaseEnv.h"
#include "LootMgr.h" #include "LootMgr.h"
#include "Unit.h" #include "Unit.h"
#include "World.h"
#include <list> #include <list>
class SpellInfo; class SpellInfo;
@@ -21,6 +21,7 @@
#include "Log.h" #include "Log.h"
#include "MoveSplineInit.h" #include "MoveSplineInit.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "QueryResult.h"
#include "WaypointMgr.h" #include "WaypointMgr.h"
FormationMgr::~FormationMgr() FormationMgr::~FormationMgr()
@@ -19,6 +19,7 @@
#define _FORMATIONS_H #define _FORMATIONS_H
#include "Define.h" #include "Define.h"
#include "ObjectGuid.h"
#include "Unit.h" #include "Unit.h"
#include <map> #include <map>
#include <unordered_map> #include <unordered_map>
@@ -20,8 +20,9 @@
#include "Common.h" #include "Common.h"
#include "NPCHandler.h" #include "NPCHandler.h"
#include "Object.h" #include "ObjectGuid.h"
#include "QuestDef.h" #include "QuestDef.h"
#include <map>
class WorldSession; class WorldSession;
class ObjectGuid; class ObjectGuid;
@@ -19,7 +19,6 @@
#define AZEROTHCORE_GAMEOBJECT_H #define AZEROTHCORE_GAMEOBJECT_H
#include "Common.h" #include "Common.h"
#include "DatabaseEnv.h"
#include "G3D/Quat.h" #include "G3D/Quat.h"
#include "GameObjectData.h" #include "GameObjectData.h"
#include "LootMgr.h" #include "LootMgr.h"
@@ -19,9 +19,9 @@
#define GAMEOBJECTDATA_H #define GAMEOBJECTDATA_H
#include "SharedDefines.h" #include "SharedDefines.h"
#include "WorldPacket.h" #include <array>
#include <string>
#include <vector> #include <vector>
#include <string>
#define MAX_GAMEOBJECT_QUEST_ITEMS 6 #define MAX_GAMEOBJECT_QUEST_ITEMS 6
#define MAX_GO_STATE 3 #define MAX_GO_STATE 3
@@ -20,6 +20,7 @@
#include "DatabaseEnv.h" #include "DatabaseEnv.h"
#include "Log.h" #include "Log.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "QueryResult.h"
#include "Util.h" #include "Util.h"
#include <cmath> #include <cmath>
#include <functional> #include <functional>
@@ -19,6 +19,7 @@
#include "ByteBuffer.h" #include "ByteBuffer.h"
#include "Geometry.h" #include "Geometry.h"
#include "GridDefines.h" #include "GridDefines.h"
#include "Random.h"
#include <G3D/g3dmath.h> #include <G3D/g3dmath.h>
#include <sstream> #include <sstream>
@@ -19,7 +19,9 @@
#define CinematicMgr_h__ #define CinematicMgr_h__
#include "Define.h" #include "Define.h"
#include "Object.h" #include "Position.h"
#include "TemporarySummon.h"
#include <vector>
constexpr auto CINEMATIC_UPDATEDIFF = 500; constexpr auto CINEMATIC_UPDATEDIFF = 500;
constexpr auto CINEMATIC_LOOKAHEAD = 2000; constexpr auto CINEMATIC_LOOKAHEAD = 2000;
+2 -1
View File
@@ -18,7 +18,8 @@
#ifndef _CHARMINFO_H #ifndef _CHARMINFO_H
#define _CHARMINFO_H #define _CHARMINFO_H
#include "Object.h" #include "Define.h"
#include "ObjectGuid.h"
#define MAX_SPELL_CHARM 4 #define MAX_SPELL_CHARM 4
#define MAX_SPELL_VEHICLE 6 #define MAX_SPELL_VEHICLE 6
-1
View File
@@ -24,7 +24,6 @@
#include "Grid.h" #include "Grid.h"
#include "GridReference.h" #include "GridReference.h"
#include "Timer.h" #include "Timer.h"
#include "Util.h"
template template
< <
-1
View File
@@ -22,7 +22,6 @@
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "Optional.h" #include "Optional.h"
#include "Player.h" #include "Player.h"
#include "WorldPacket.h"
#include <set> #include <set>
#include <unordered_map> #include <unordered_map>
+1
View File
@@ -19,6 +19,7 @@
#include "DatabaseEnv.h" #include "DatabaseEnv.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "PreparedStatement.h" #include "PreparedStatement.h"
#include "QueryResult.h"
LootItemStorage::LootItemStorage() LootItemStorage::LootItemStorage()
{ {
+1
View File
@@ -31,6 +31,7 @@
#include "MapInstanced.h" #include "MapInstanced.h"
#include "Metric.h" #include "Metric.h"
#include "MiscPackets.h" #include "MiscPackets.h"
#include "MMapFactory.h"
#include "Object.h" #include "Object.h"
#include "ObjectAccessor.h" #include "ObjectAccessor.h"
#include "ObjectGridLoader.h" #include "ObjectGridLoader.h"
+1
View File
@@ -19,6 +19,7 @@
#include "InstanceScript.h" #include "InstanceScript.h"
#include "MapMgr.h" #include "MapMgr.h"
#include "MoveSpline.h" #include "MoveSpline.h"
#include "QueryResult.h"
#include "Transport.h" #include "Transport.h"
TransportTemplate::~TransportTemplate() TransportTemplate::~TransportTemplate()
+1 -1
View File
@@ -18,7 +18,7 @@
#ifndef __DYNAMICVISIBILITY_H #ifndef __DYNAMICVISIBILITY_H
#define __DYNAMICVISIBILITY_H #define __DYNAMICVISIBILITY_H
#include "Common.h" #include "Define.h"
struct VisibilitySettingData struct VisibilitySettingData
{ {
+3 -1
View File
@@ -19,7 +19,9 @@
#define ACORE_MOTIONMASTER_H #define ACORE_MOTIONMASTER_H
#include "Common.h" #include "Common.h"
#include "Object.h" #include "ObjectGuid.h"
#include "PathGenerator.h"
#include "Position.h"
#include "SharedDefines.h" #include "SharedDefines.h"
#include "Spline/MoveSpline.h" #include "Spline/MoveSpline.h"
#include <optional> #include <optional>
@@ -18,7 +18,9 @@
#ifndef ACORE_FLEEINGMOVEMENTGENERATOR_H #ifndef ACORE_FLEEINGMOVEMENTGENERATOR_H
#define ACORE_FLEEINGMOVEMENTGENERATOR_H #define ACORE_FLEEINGMOVEMENTGENERATOR_H
#include "Creature.h"
#include "MovementGenerator.h" #include "MovementGenerator.h"
#include "Timer.h"
template<class T> template<class T>
class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator<T> > class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
@@ -20,7 +20,6 @@
#include "DetourNavMesh.h" #include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h" #include "DetourNavMeshQuery.h"
#include "MMapFactory.h"
#include "MMapMgr.h" #include "MMapMgr.h"
#include "MapDefines.h" #include "MapDefines.h"
#include "MoveSplineInitArgs.h" #include "MoveSplineInitArgs.h"
@@ -18,7 +18,7 @@
#ifndef ACORE_POINTMOVEMENTGENERATOR_H #ifndef ACORE_POINTMOVEMENTGENERATOR_H
#define ACORE_POINTMOVEMENTGENERATOR_H #define ACORE_POINTMOVEMENTGENERATOR_H
#include "FollowerReference.h" #include "Creature.h"
#include "MovementGenerator.h" #include "MovementGenerator.h"
template<class T> template<class T>
@@ -25,6 +25,7 @@
#include "ObjectAccessor.h" #include "ObjectAccessor.h"
#include "Spell.h" #include "Spell.h"
#include "Util.h" #include "Util.h"
#include "World.h"
template<class T> template<class T>
RandomMovementGenerator<T>::~RandomMovementGenerator() { } RandomMovementGenerator<T>::~RandomMovementGenerator() { }
@@ -20,6 +20,7 @@
#include "MovementGenerator.h" #include "MovementGenerator.h"
#include "PathGenerator.h" #include "PathGenerator.h"
#include "Timer.h"
#define RANDOM_POINTS_NUMBER 12 #define RANDOM_POINTS_NUMBER 12
#define RANDOM_LINKS_COUNT 7 #define RANDOM_LINKS_COUNT 7
@@ -18,7 +18,7 @@
#ifndef ACORE_WAYPOINTMANAGER_H #ifndef ACORE_WAYPOINTMANAGER_H
#define ACORE_WAYPOINTMANAGER_H #define ACORE_WAYPOINTMANAGER_H
#include "Common.h" #include "Define.h"
#include <optional> #include <optional>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
+1
View File
@@ -20,6 +20,7 @@
#include "Log.h" #include "Log.h"
#include "MapMgr.h" #include "MapMgr.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "QueryResult.h"
#include "Transport.h" #include "Transport.h"
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
+1 -2
View File
@@ -18,10 +18,9 @@
#ifndef __ACORE_REPUTATION_MGR_H #ifndef __ACORE_REPUTATION_MGR_H
#define __ACORE_REPUTATION_MGR_H #define __ACORE_REPUTATION_MGR_H
#include "Common.h" #include "DatabaseEnvFwd.h"
#include "DBCStructure.h" #include "DBCStructure.h"
#include "Language.h" #include "Language.h"
#include "QueryResult.h"
#include "SharedDefines.h" #include "SharedDefines.h"
#include <map> #include <map>
-2
View File
@@ -20,14 +20,12 @@
#include "GridNotifiers.h" #include "GridNotifiers.h"
#include "Map.h" #include "Map.h"
#include "MapMgr.h" #include "MapMgr.h"
#include "MapRefMgr.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "Pet.h" #include "Pet.h"
#include "ScriptMgr.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h" #include "ScriptedCreature.h"
#include "Transport.h" #include "Transport.h"
#include "WaypointMgr.h" #include "WaypointMgr.h"
#include "World.h"
/// Put scripts in the execution queue /// Put scripts in the execution queue
void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target) void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target)
@@ -18,6 +18,7 @@
#ifndef SCRIPT_OBJECT_GLOBAL_SCRIPT_H_ #ifndef SCRIPT_OBJECT_GLOBAL_SCRIPT_H_
#define SCRIPT_OBJECT_GLOBAL_SCRIPT_H_ #define SCRIPT_OBJECT_GLOBAL_SCRIPT_H_
#include "DatabaseEnvFwd.h"
#include "DBCEnums.h" #include "DBCEnums.h"
#include "ObjectGuid.h" #include "ObjectGuid.h"
#include "ScriptObject.h" #include "ScriptObject.h"
@@ -20,6 +20,7 @@
#include "ScriptObject.h" #include "ScriptObject.h"
#include <vector> #include <vector>
#include <memory> // NOTE: this import is NEEDED (even though some IDEs report it as unused)
enum ServerHook enum ServerHook
{ {
+1 -1
View File
@@ -18,8 +18,8 @@
#ifndef _SCRIPT_OBJECT_H_ #ifndef _SCRIPT_OBJECT_H_
#define _SCRIPT_OBJECT_H_ #define _SCRIPT_OBJECT_H_
#include "DatabaseEnvFwd.h"
#include "ScriptObjectFwd.h" #include "ScriptObjectFwd.h"
#include <string>
//#include "Duration.h" //#include "Duration.h"
//#include "LFG.h" //#include "LFG.h"
+3 -1
View File
@@ -18,11 +18,13 @@
#ifndef __SPELL_H #ifndef __SPELL_H
#define __SPELL_H #define __SPELL_H
#include "ConditionMgr.h"
#include "GridDefines.h" #include "GridDefines.h"
#include "ObjectMgr.h" #include "LootMgr.h"
#include "PathGenerator.h" #include "PathGenerator.h"
#include "SharedDefines.h" #include "SharedDefines.h"
#include "SpellInfo.h" #include "SpellInfo.h"
#include "Unit.h"
class Unit; class Unit;
class Player; class Player;
-1
View File
@@ -21,7 +21,6 @@
#include "Define.h" #include "Define.h"
#include "Duration.h" #include "Duration.h"
#include <array> #include <array>
#include <string>
constexpr auto AVG_DIFF_COUNT = 500; constexpr auto AVG_DIFF_COUNT = 500;
@@ -19,6 +19,7 @@
#include "DBCStores.h" #include "DBCStores.h"
#include "Database/DatabaseEnv.h" #include "Database/DatabaseEnv.h"
#include "Log.h" #include "Log.h"
#include "QueryResult.h"
#include "SpellMgr.h" #include "SpellMgr.h"
#include "World.h" #include "World.h"
-1
View File
@@ -19,7 +19,6 @@
#define _PLAYER_DUMP_H #define _PLAYER_DUMP_H
#include "ObjectGuid.h" #include "ObjectGuid.h"
#include <map>
#include <set> #include <set>
enum DumpTableType enum DumpTableType
@@ -18,6 +18,7 @@
#include "WardenCheckMgr.h" #include "WardenCheckMgr.h"
#include "Database/DatabaseEnv.h" #include "Database/DatabaseEnv.h"
#include "Log.h" #include "Log.h"
#include "QueryResult.h"
#include "Util.h" #include "Util.h"
#include "Warden.h" #include "Warden.h"
#include "WorldSession.h" #include "WorldSession.h"
-1
View File
@@ -26,7 +26,6 @@
#include "Player.h" #include "Player.h"
#include "Weather.h" #include "Weather.h"
#include "WorldSession.h" #include "WorldSession.h"
#include <memory>
namespace WeatherMgr namespace WeatherMgr
{ {
+1 -1
View File
@@ -22,10 +22,10 @@
#ifndef __WORLD_H #ifndef __WORLD_H
#define __WORLD_H #define __WORLD_H
#include "DatabaseEnvFwd.h"
#include "IWorld.h" #include "IWorld.h"
#include "LockedQueue.h" #include "LockedQueue.h"
#include "ObjectGuid.h" #include "ObjectGuid.h"
#include "QueryResult.h"
#include "SharedDefines.h" #include "SharedDefines.h"
#include "Timer.h" #include "Timer.h"
#include <atomic> #include <atomic>
+1
View File
@@ -34,6 +34,7 @@
#include "Language.h" #include "Language.h"
#include "MapMgr.h" #include "MapMgr.h"
#include "MiscPackets.h" #include "MiscPackets.h"
#include "MMapFactory.h"
#include "MovementGenerator.h" #include "MovementGenerator.h"
#include "ObjectAccessor.h" #include "ObjectAccessor.h"
#include "Pet.h" #include "Pet.h"