Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/server/apps/worldserver/RemoteAccess/RASession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "Duration.h"
#include "Log.h"
#include "MotdMgr.h"
#include "QueryResult.h"
#include "SRP6.h"
#include "Util.h"
#include "World.h"
Expand Down
2 changes: 0 additions & 2 deletions src/server/game/AI/SmartScripts/SmartScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#ifndef ACORE_SMARTSCRIPT_H
#define ACORE_SMARTSCRIPT_H

#include "Common.h"
#include "Creature.h"
#include "CreatureAI.h"
#include "GridNotifiers.h"
#include "SmartScriptMgr.h"
#include "Spell.h"
Expand Down
5 changes: 2 additions & 3 deletions src/server/game/AI/SmartScripts/SmartScriptMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@

#include "Common.h"
#include "Creature.h"
#include "CreatureAI.h"
#include "DBCStores.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Optional.h"
#include "Spell.h"
#include "SpellMgr.h"
#include "Unit.h"
#include <limits>

typedef uint32 SAIBool;
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Battlefield/Zones/BattlefieldWG.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "Battlefield.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "World.h"

class Group;
Expand Down
3 changes: 2 additions & 1 deletion src/server/game/Battlegrounds/BattlegroundQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#define __BATTLEGROUNDQUEUE_H

#include "Battleground.h"
#include "Common.h"
#include "DBCEnums.h"
#include "EventProcessor.h"
#include "ObjectGuid.h"
#include "SharedDefines.h"
#include <array>

constexpr auto COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME = 10;
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Chat/Channels/Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef _CHANNEL_H
#define _CHANNEL_H

#include "Common.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Chat/Hyperlinks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "SharedDefines.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
#include "World.h"

using namespace Acore::Hyperlinks;

Expand Down
2 changes: 0 additions & 2 deletions src/server/game/DungeonFinding/LFGQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#ifndef _LFGQUEUE_H
#define _LFGQUEUE_H

#include <utility>

#include "LFG.h"

namespace lfg
Expand Down
2 changes: 0 additions & 2 deletions src/server/game/Entities/Creature/Creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
#include "CharmInfo.h"
#include "Common.h"
#include "CreatureData.h"
#include "DatabaseEnv.h"
#include "LootMgr.h"
#include "Unit.h"
#include "World.h"
#include <list>

class SpellInfo;
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Entities/Creature/CreatureGroups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "Log.h"
#include "MoveSplineInit.h"
#include "ObjectMgr.h"
#include "QueryResult.h"
#include "WaypointMgr.h"

FormationMgr::~FormationMgr()
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Entities/Creature/CreatureGroups.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define _FORMATIONS_H

#include "Define.h"
#include "ObjectGuid.h"
#include "Unit.h"
#include <map>
#include <unordered_map>
Expand Down
3 changes: 2 additions & 1 deletion src/server/game/Entities/Creature/GossipDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@

#include "Common.h"
#include "NPCHandler.h"
#include "Object.h"
#include "ObjectGuid.h"
#include "QuestDef.h"
#include <map>

class WorldSession;
class ObjectGuid;
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Entities/GameObject/GameObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#define AZEROTHCORE_GAMEOBJECT_H

#include "Common.h"
#include "DatabaseEnv.h"
#include "G3D/Quat.h"
#include "GameObjectData.h"
#include "LootMgr.h"
Expand Down
4 changes: 2 additions & 2 deletions src/server/game/Entities/GameObject/GameObjectData.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#define GAMEOBJECTDATA_H

#include "SharedDefines.h"
#include "WorldPacket.h"
#include <string>
#include <array>
#include <vector>
#include <string>

#define MAX_GAMEOBJECT_QUEST_ITEMS 6
#define MAX_GO_STATE 3
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "DatabaseEnv.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "QueryResult.h"
#include "Util.h"
#include <cmath>
#include <functional>
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Entities/Object/Position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "ByteBuffer.h"
#include "Geometry.h"
#include "GridDefines.h"
#include "Random.h"
#include <G3D/g3dmath.h>
#include <sstream>

Expand Down
4 changes: 3 additions & 1 deletion src/server/game/Entities/Player/CinematicMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#define CinematicMgr_h__

#include "Define.h"
#include "Object.h"
#include "Position.h"
#include "TemporarySummon.h"
#include <vector>

constexpr auto CINEMATIC_UPDATEDIFF = 500;
constexpr auto CINEMATIC_LOOKAHEAD = 2000;
Expand Down
3 changes: 2 additions & 1 deletion src/server/game/Entities/Unit/CharmInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#ifndef _CHARMINFO_H
#define _CHARMINFO_H

#include "Object.h"
#include "Define.h"
#include "ObjectGuid.h"

#define MAX_SPELL_CHARM 4
#define MAX_SPELL_VEHICLE 6
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Grids/NGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "Grid.h"
#include "GridReference.h"
#include "Timer.h"
#include "Util.h"

template
<
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Guilds/Guild.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "ObjectMgr.h"
#include "Optional.h"
#include "Player.h"
#include "WorldPacket.h"
#include <set>
#include <unordered_map>

Expand Down
1 change: 1 addition & 0 deletions src/server/game/Loot/LootItemStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "DatabaseEnv.h"
#include "ObjectMgr.h"
#include "PreparedStatement.h"
#include "QueryResult.h"

LootItemStorage::LootItemStorage()
{
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Maps/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "MapInstanced.h"
#include "Metric.h"
#include "MiscPackets.h"
#include "MMapFactory.h"
#include "Object.h"
#include "ObjectAccessor.h"
#include "ObjectGridLoader.h"
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Maps/TransportMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "InstanceScript.h"
#include "MapMgr.h"
#include "MoveSpline.h"
#include "QueryResult.h"
#include "Transport.h"

TransportTemplate::~TransportTemplate()
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Misc/DynamicVisibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef __DYNAMICVISIBILITY_H
#define __DYNAMICVISIBILITY_H

#include "Common.h"
#include "Define.h"

struct VisibilitySettingData
{
Expand Down
4 changes: 3 additions & 1 deletion src/server/game/Movement/MotionMaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#define ACORE_MOTIONMASTER_H

#include "Common.h"
#include "Object.h"
#include "ObjectGuid.h"
#include "PathGenerator.h"
#include "Position.h"
#include "SharedDefines.h"
#include "Spline/MoveSpline.h"
#include <optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#ifndef ACORE_FLEEINGMOVEMENTGENERATOR_H
#define ACORE_FLEEINGMOVEMENTGENERATOR_H

#include "Creature.h"
#include "MovementGenerator.h"
#include "Timer.h"

template<class T>
class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h"
#include "MMapFactory.h"
#include "MMapMgr.h"
#include "MapDefines.h"
#include "MoveSplineInitArgs.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef ACORE_POINTMOVEMENTGENERATOR_H
#define ACORE_POINTMOVEMENTGENERATOR_H

#include "FollowerReference.h"
#include "Creature.h"
#include "MovementGenerator.h"

template<class T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "ObjectAccessor.h"
#include "Spell.h"
#include "Util.h"
#include "World.h"

template<class T>
RandomMovementGenerator<T>::~RandomMovementGenerator() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "MovementGenerator.h"
#include "PathGenerator.h"
#include "Timer.h"

#define RANDOM_POINTS_NUMBER 12
#define RANDOM_LINKS_COUNT 7
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Movement/Waypoints/WaypointMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef ACORE_WAYPOINTMANAGER_H
#define ACORE_WAYPOINTMANAGER_H

#include "Common.h"
#include "Define.h"
#include <optional>
#include <unordered_map>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Pools/PoolMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "Log.h"
#include "MapMgr.h"
#include "ObjectMgr.h"
#include "QueryResult.h"
#include "Transport.h"

////////////////////////////////////////////////////////////
Expand Down
3 changes: 1 addition & 2 deletions src/server/game/Reputation/ReputationMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#ifndef __ACORE_REPUTATION_MGR_H
#define __ACORE_REPUTATION_MGR_H

#include "Common.h"
#include "DatabaseEnvFwd.h"
#include "DBCStructure.h"
#include "Language.h"
#include "QueryResult.h"
#include "SharedDefines.h"
#include <map>

Expand Down
2 changes: 0 additions & 2 deletions src/server/game/Scripting/MapScripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
#include "GridNotifiers.h"
#include "Map.h"
#include "MapMgr.h"
#include "MapRefMgr.h"
#include "ObjectMgr.h"
#include "Pet.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "Transport.h"
#include "WaypointMgr.h"
#include "World.h"

/// Put scripts in the execution queue
void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target)
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Scripting/ScriptDefines/GlobalScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef SCRIPT_OBJECT_GLOBAL_SCRIPT_H_
#define SCRIPT_OBJECT_GLOBAL_SCRIPT_H_

#include "DatabaseEnvFwd.h"
#include "DBCEnums.h"
#include "ObjectGuid.h"
#include "ScriptObject.h"
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Scripting/ScriptDefines/ServerScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "ScriptObject.h"
#include <vector>
#include <memory> // NOTE: this import is NEEDED (even though some IDEs report it as unused)

enum ServerHook
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Scripting/ScriptObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#ifndef _SCRIPT_OBJECT_H_
#define _SCRIPT_OBJECT_H_

#include "DatabaseEnvFwd.h"
#include "ScriptObjectFwd.h"
#include <string>

//#include "Duration.h"
//#include "LFG.h"
Expand Down
4 changes: 3 additions & 1 deletion src/server/game/Spells/Spell.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
#ifndef __SPELL_H
#define __SPELL_H

#include "ConditionMgr.h"
#include "GridDefines.h"
#include "ObjectMgr.h"
#include "LootMgr.h"
#include "PathGenerator.h"
#include "SharedDefines.h"
#include "SpellInfo.h"
#include "Unit.h"

class Unit;
class Player;
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Time/UpdateTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "Define.h"
#include "Duration.h"
#include <array>
#include <string>

constexpr auto AVG_DIFF_COUNT = 500;

Expand Down
1 change: 1 addition & 0 deletions src/server/game/Tools/CharacterDatabaseCleaner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "DBCStores.h"
#include "Database/DatabaseEnv.h"
#include "Log.h"
#include "QueryResult.h"
#include "SpellMgr.h"
#include "World.h"

Expand Down
1 change: 0 additions & 1 deletion src/server/game/Tools/PlayerDump.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#define _PLAYER_DUMP_H

#include "ObjectGuid.h"
#include <map>
#include <set>

enum DumpTableType
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Warden/WardenCheckMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "WardenCheckMgr.h"
#include "Database/DatabaseEnv.h"
#include "Log.h"
#include "QueryResult.h"
#include "Util.h"
#include "Warden.h"
#include "WorldSession.h"
Expand Down
Loading
Loading