From 328345ac1ab328fb382ec40ba6f5fa95b43a72c4 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 8 Mar 2009 13:05:56 -0600 Subject: [PATCH] [7403] much more unneeded includes removed Author: balrok --HG-- branch : trunk --- src/game/AggressorAI.cpp | 1 - src/game/ArenaTeamHandler.cpp | 1 - src/game/Bag.cpp | 2 -- src/game/BattleGround.cpp | 2 +- src/game/BattleGroundAB.cpp | 1 - src/game/BattleGroundAV.cpp | 8 ++------ src/game/BattleGroundBE.cpp | 2 -- src/game/BattleGroundEY.cpp | 1 - src/game/BattleGroundHandler.cpp | 1 - src/game/BattleGroundNA.cpp | 2 -- src/game/BattleGroundRL.cpp | 2 -- src/game/BattleGroundWS.cpp | 1 - src/game/Channel.h | 1 - src/game/CharacterHandler.cpp | 1 - src/game/Chat.cpp | 3 +-- src/game/ChatHandler.cpp | 1 - src/game/CombatHandler.cpp | 1 - src/game/Corpse.cpp | 3 --- src/game/Creature.cpp | 3 --- src/game/CreatureAIRegistry.cpp | 2 -- src/game/Debugcmds.cpp | 4 ---- src/game/DestinationHolderImp.h | 1 - src/game/DuelHandler.cpp | 2 -- src/game/DynamicObject.cpp | 5 ----- src/game/FleeingMovementGenerator.h | 1 - src/game/GameObject.cpp | 12 +++++------- src/game/GridNotifiers.cpp | 1 - src/game/GridStates.cpp | 1 - src/game/GroupHandler.cpp | 2 -- src/game/Guild.cpp | 1 - src/game/GuildHandler.cpp | 1 - src/game/HomeMovementGenerator.cpp | 2 -- src/game/IdleMovementGenerator.cpp | 2 +- src/game/InstanceSaveMgr.cpp | 3 --- src/game/ItemHandler.cpp | 1 - src/game/Level0.cpp | 3 --- src/game/Level2.cpp | 3 --- src/game/Level3.cpp | 1 - src/game/Map.cpp | 1 - src/game/MiscHandler.cpp | 2 -- src/game/MovementHandler.cpp | 1 - src/game/NPCHandler.cpp | 3 --- src/game/Object.cpp | 1 - src/game/ObjectAccessor.cpp | 2 -- src/game/ObjectGridLoader.cpp | 3 +-- src/game/ObjectMgr.cpp | 2 -- src/game/Pet.cpp | 2 -- src/game/PetHandler.cpp | 3 --- src/game/PetitionsHandler.cpp | 1 - src/game/Player.cpp | 2 -- src/game/PointMovementGenerator.cpp | 1 - src/game/PoolHandler.cpp | 2 -- src/game/QueryHandler.cpp | 1 - src/game/SkillDiscovery.cpp | 1 - src/game/SkillHandler.cpp | 2 -- src/game/SocialMgr.cpp | 1 - src/game/Spell.cpp | 1 - src/game/SpellAuras.cpp | 2 -- src/game/SpellEffects.cpp | 3 --- src/game/SpellHandler.cpp | 5 +---- src/game/TargetedMovementGenerator.cpp | 1 - src/game/TaxiHandler.cpp | 1 - src/game/TemporarySummon.cpp | 4 +--- src/game/ThreatManager.cpp | 1 - src/game/Totem.cpp | 1 - src/game/TotemAI.cpp | 2 -- src/game/Traveller.h | 5 ++--- src/game/Vehicle.cpp | 5 ----- src/game/VoiceChatHandler.cpp | 1 - src/game/Weather.cpp | 1 - src/game/WorldSession.cpp | 9 +++------ src/shared/revision_nr.h | 2 +- 72 files changed, 19 insertions(+), 141 deletions(-) diff --git a/src/game/AggressorAI.cpp b/src/game/AggressorAI.cpp index 2afe3442a2..a1120e8365 100644 --- a/src/game/AggressorAI.cpp +++ b/src/game/AggressorAI.cpp @@ -21,7 +21,6 @@ #include "AggressorAI.h" #include "Errors.h" #include "Creature.h" -#include "Player.h" #include "ObjectAccessor.h" #include "VMapFactory.h" #include "World.h" diff --git a/src/game/ArenaTeamHandler.cpp b/src/game/ArenaTeamHandler.cpp index e625ca41dc..cebdb71411 100644 --- a/src/game/ArenaTeamHandler.cpp +++ b/src/game/ArenaTeamHandler.cpp @@ -27,7 +27,6 @@ #include "ArenaTeam.h" #include "World.h" #include "SocialMgr.h" -#include "Language.h" void WorldSession::HandleInspectArenaStatsOpcode(WorldPacket & recv_data) { diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp index c3b83a39e2..06c2f6ade6 100644 --- a/src/game/Bag.cpp +++ b/src/game/Bag.cpp @@ -23,9 +23,7 @@ #include "ObjectMgr.h" #include "Database/DatabaseEnv.h" #include "Log.h" -#include "WorldPacket.h" #include "UpdateData.h" -#include "WorldSession.h" Bag::Bag( ): Item() { diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index a4c2cae5ca..316d82db62 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1690,4 +1690,4 @@ void BattleGround::SetBgRaid( uint32 TeamID, Group *bg_raid ) WorldSafeLocsEntry const* BattleGround::GetClosestGraveYard( Player* player ) { return objmgr.GetClosestGraveYard( player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam() ); -} \ No newline at end of file +} diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index fdf2de96c1..a5dc765103 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -25,7 +25,6 @@ #include "Creature.h" #include "Chat.h" #include "ObjectMgr.h" -#include "MapManager.h" #include "Language.h" #include "World.h" #include "Util.h" diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index 50f549ab4c..f02dc3b2e9 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -21,16 +21,12 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundAV.h" -#include "Creature.h" -#include "Chat.h" -#include "Object.h" -#include "ObjectMgr.h" -#include "ObjectAccessor.h" -#include "MapManager.h" #include "Language.h" #include "SpellAuras.h" #include "Formulas.h" #include "WorldPacket.h" +#include "ObjectMgr.h" +#include "GameObject.h" BattleGroundAV::BattleGroundAV() { diff --git a/src/game/BattleGroundBE.cpp b/src/game/BattleGroundBE.cpp index a96859a304..9e976ac733 100644 --- a/src/game/BattleGroundBE.cpp +++ b/src/game/BattleGroundBE.cpp @@ -22,9 +22,7 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundBE.h" -#include "Creature.h" #include "ObjectMgr.h" -#include "MapManager.h" #include "WorldPacket.h" #include "Language.h" diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 6d2ed689da..6d92b08672 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -25,7 +25,6 @@ #include "Creature.h" #include "Chat.h" #include "ObjectMgr.h" -#include "MapManager.h" #include "Language.h" #include "World.h" //music #include "WorldPacket.h" diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index 6824199bc1..ba687f5266 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -25,7 +25,6 @@ #include "Player.h" #include "ObjectMgr.h" #include "WorldSession.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "Object.h" #include "Chat.h" diff --git a/src/game/BattleGroundNA.cpp b/src/game/BattleGroundNA.cpp index 702c2cd8a0..70f44deac8 100644 --- a/src/game/BattleGroundNA.cpp +++ b/src/game/BattleGroundNA.cpp @@ -22,9 +22,7 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundNA.h" -#include "Creature.h" #include "ObjectMgr.h" -#include "MapManager.h" #include "WorldPacket.h" #include "Language.h" diff --git a/src/game/BattleGroundRL.cpp b/src/game/BattleGroundRL.cpp index 293b11041e..7ac6d4d1cd 100644 --- a/src/game/BattleGroundRL.cpp +++ b/src/game/BattleGroundRL.cpp @@ -22,9 +22,7 @@ #include "Player.h" #include "BattleGround.h" #include "BattleGroundRL.h" -#include "Creature.h" #include "ObjectMgr.h" -#include "MapManager.h" #include "Language.h" #include "WorldPacket.h" diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 57de590964..6aa16d3dff 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -25,7 +25,6 @@ #include "Creature.h" #include "GameObject.h" #include "Chat.h" -#include "MapManager.h" #include "ObjectMgr.h" #include "WorldPacket.h" #include "Language.h" diff --git a/src/game/Channel.h b/src/game/Channel.h index 1e2ecafdc8..866c2d4f8b 100644 --- a/src/game/Channel.h +++ b/src/game/Channel.h @@ -23,7 +23,6 @@ #include "Common.h" #include "WorldPacket.h" -#include "WorldSession.h" #include "Opcodes.h" #include "Player.h" diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index 00b37f1385..c0e9b02a69 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -31,7 +31,6 @@ #include "Guild.h" #include "UpdateMask.h" #include "Auth/md5.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "Group.h" #include "Database/DatabaseImpl.h" diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index bd338c8eb2..5f8556fbdb 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -30,7 +30,6 @@ #include "Player.h" #include "UpdateMask.h" #include "Chat.h" -#include "MapManager.h" #include "GridNotifiersImpl.h" #include "CellImpl.h" #include "AccountMgr.h" @@ -1354,7 +1353,7 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid TypeContainerVisitor, GridTypeMapContainer > object_checker(checker); CellLock cell_lock(cell, p); - cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(pl->GetMapId(), pl)); + cell_lock->Visit(cell_lock, object_checker, *pl->GetMap()); } return obj; diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp index 92489f8f51..0fc6500e73 100644 --- a/src/game/ChatHandler.cpp +++ b/src/game/ChatHandler.cpp @@ -30,7 +30,6 @@ #include "ChannelMgr.h" #include "Group.h" #include "Guild.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "ScriptCalls.h" #include "Player.h" diff --git a/src/game/CombatHandler.cpp b/src/game/CombatHandler.cpp index 0c8e5e6bde..878d8e3564 100644 --- a/src/game/CombatHandler.cpp +++ b/src/game/CombatHandler.cpp @@ -22,7 +22,6 @@ #include "Log.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "ObjectAccessor.h" #include "CreatureAI.h" #include "ObjectDefines.h" diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp index 553c44b3b3..63d156583a 100644 --- a/src/game/Corpse.cpp +++ b/src/game/Corpse.cpp @@ -22,12 +22,9 @@ #include "Corpse.h" #include "Player.h" #include "UpdateMask.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "Database/DatabaseEnv.h" #include "Opcodes.h" -#include "WorldSession.h" -#include "WorldPacket.h" #include "GossipDef.h" #include "World.h" diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 0f1b0dd0ef..04950f1cab 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -21,7 +21,6 @@ #include "Common.h" #include "Database/DatabaseEnv.h" #include "WorldPacket.h" -#include "WorldSession.h" #include "World.h" #include "ObjectMgr.h" #include "SpellMgr.h" @@ -37,7 +36,6 @@ #include "CreatureAI.h" #include "CreatureAISelector.h" #include "Formulas.h" -#include "SpellAuras.h" #include "WaypointMovementGenerator.h" #include "InstanceData.h" #include "BattleGroundMgr.h" @@ -2305,4 +2303,3 @@ const char* Creature::GetNameForLocaleIdx(int32 loc_idx) const return GetName(); } - diff --git a/src/game/CreatureAIRegistry.cpp b/src/game/CreatureAIRegistry.cpp index 2964508af8..3d7fe1848f 100644 --- a/src/game/CreatureAIRegistry.cpp +++ b/src/game/CreatureAIRegistry.cpp @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "CreatureAIRegistry.h" #include "NullCreatureAI.h" #include "ReactorAI.h" #include "AggressorAI.h" @@ -30,7 +29,6 @@ #include "RandomMovementGenerator.h" #include "CreatureAIImpl.h" #include "MovementGeneratorImpl.h" -#include "MapManager.h" #include "CreatureAIRegistry.h" #include "WaypointMovementGenerator.h" diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index 6033a49e5e..4323ef3897 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -21,17 +21,13 @@ #include "Common.h" #include "Database/DatabaseEnv.h" #include "WorldPacket.h" -#include "WorldSession.h" -#include "World.h" #include "Player.h" #include "Opcodes.h" #include "Chat.h" #include "Log.h" #include "Unit.h" -#include "ObjectAccessor.h" #include "GossipDef.h" #include "Language.h" -#include "MapManager.h" #include "BattleGroundMgr.h" #include #include "ObjectMgr.h" diff --git a/src/game/DestinationHolderImp.h b/src/game/DestinationHolderImp.h index c61dadba26..384ad9621a 100644 --- a/src/game/DestinationHolderImp.h +++ b/src/game/DestinationHolderImp.h @@ -21,7 +21,6 @@ #ifndef TRINITY_DESTINATIONHOLDERIMP_H #define TRINITY_DESTINATIONHOLDERIMP_H -#include "Creature.h" #include "MapManager.h" #include "DestinationHolder.h" diff --git a/src/game/DuelHandler.cpp b/src/game/DuelHandler.cpp index f0b7980821..aa6563a3f9 100644 --- a/src/game/DuelHandler.cpp +++ b/src/game/DuelHandler.cpp @@ -21,11 +21,9 @@ #include "Common.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "Log.h" #include "Opcodes.h" #include "UpdateData.h" -#include "MapManager.h" #include "Player.h" void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index 52ad9d61a4..ba90356873 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -19,16 +19,11 @@ */ #include "Common.h" -#include "GameObject.h" #include "UpdateMask.h" #include "Opcodes.h" -#include "WorldPacket.h" -#include "WorldSession.h" #include "World.h" #include "ObjectAccessor.h" #include "Database/DatabaseEnv.h" -#include "SpellAuras.h" -#include "MapManager.h" #include "GridNotifiers.h" #include "CellImpl.h" #include "GridNotifiersImpl.h" diff --git a/src/game/FleeingMovementGenerator.h b/src/game/FleeingMovementGenerator.h index ec110b62b9..a6957545d4 100644 --- a/src/game/FleeingMovementGenerator.h +++ b/src/game/FleeingMovementGenerator.h @@ -24,7 +24,6 @@ #include "MovementGenerator.h" #include "DestinationHolder.h" #include "Traveller.h" -#include "MapManager.h" template class TRINITY_DLL_SPEC FleeingMovementGenerator diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 2e0ebfb613..413cc9dda8 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -28,10 +28,8 @@ #include "UpdateMask.h" #include "Opcodes.h" #include "WorldPacket.h" -#include "WorldSession.h" #include "World.h" #include "Database/DatabaseEnv.h" -#include "MapManager.h" #include "LootMgr.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" @@ -337,13 +335,13 @@ void GameObject::Update(uint32 /*p_time*/) CellLock cell_lock(cell, p); TypeContainerVisitor, GridTypeMapContainer > grid_object_checker(checker); - cell_lock->Visit(cell_lock, grid_object_checker, *MapManager::Instance().GetMap(GetMapId(), this)); + cell_lock->Visit(cell_lock, grid_object_checker, *GetMap()); // or unfriendly player/pet if(!ok) { TypeContainerVisitor, WorldTypeMapContainer > world_object_checker(checker); - cell_lock->Visit(cell_lock, world_object_checker, *MapManager::Instance().GetMap(GetMapId(), this)); + cell_lock->Visit(cell_lock, world_object_checker, *GetMap()); } } else // environmental trap @@ -358,7 +356,7 @@ void GameObject::Update(uint32 /*p_time*/) CellLock cell_lock(cell, p); TypeContainerVisitor, WorldTypeMapContainer > world_object_checker(checker); - cell_lock->Visit(cell_lock, world_object_checker, *MapManager::Instance().GetMap(GetMapId(), this)); + cell_lock->Visit(cell_lock, world_object_checker, *GetMap()); ok = p_ok; } @@ -863,7 +861,7 @@ void GameObject::TriggeringLinkedGameObject( uint32 trapEntry, Unit* target) TypeContainerVisitor, GridTypeMapContainer > object_checker(checker); CellLock cell_lock(cell, p); - cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(GetMapId(), this)); + cell_lock->Visit(cell_lock, object_checker, *GetMap()); } // found correct GO @@ -885,7 +883,7 @@ GameObject* GameObject::LookupFishingHoleAround(float range) CellLock cell_lock(cell, p); TypeContainerVisitor, GridTypeMapContainer > grid_object_checker(checker); - cell_lock->Visit(cell_lock, grid_object_checker, *MapManager::Instance().GetMap(GetMapId(), this)); + cell_lock->Visit(cell_lock, grid_object_checker, *GetMap()); return ok; } diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp index 6b9b3bb472..2ab6f9a2bb 100644 --- a/src/game/GridNotifiers.cpp +++ b/src/game/GridNotifiers.cpp @@ -24,7 +24,6 @@ #include "UpdateData.h" #include "Item.h" #include "Map.h" -#include "MapManager.h" #include "Transports.h" #include "ObjectAccessor.h" diff --git a/src/game/GridStates.cpp b/src/game/GridStates.cpp index 92054e5948..fa1c0a2b53 100644 --- a/src/game/GridStates.cpp +++ b/src/game/GridStates.cpp @@ -20,7 +20,6 @@ #include "GridStates.h" #include "GridNotifiers.h" -#include "ObjectAccessor.h" #include "GameSystem/Grid.h" #include "Log.h" diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 892e8e017a..a3f719c640 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -28,8 +28,6 @@ #include "ObjectMgr.h" #include "Player.h" #include "Group.h" -#include "ObjectAccessor.h" -#include "MapManager.h" #include "SocialMgr.h" #include "Util.h" diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 5c773c14c8..2132a69fec 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -21,7 +21,6 @@ #include "Database/DatabaseEnv.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "MapManager.h" #include "Player.h" #include "Opcodes.h" #include "ObjectMgr.h" diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp index 1a8e5e54f1..5c4c18d64d 100644 --- a/src/game/GuildHandler.cpp +++ b/src/game/GuildHandler.cpp @@ -26,7 +26,6 @@ #include "Log.h" #include "Opcodes.h" #include "Guild.h" -#include "MapManager.h" #include "GossipDef.h" #include "SocialMgr.h" diff --git a/src/game/HomeMovementGenerator.cpp b/src/game/HomeMovementGenerator.cpp index 1a3adef941..0adacb5783 100644 --- a/src/game/HomeMovementGenerator.cpp +++ b/src/game/HomeMovementGenerator.cpp @@ -22,8 +22,6 @@ #include "Creature.h" #include "CreatureAI.h" #include "Traveller.h" -#include "MapManager.h" -#include "ObjectAccessor.h" #include "DestinationHolderImp.h" #include "WorldPacket.h" diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp index 10cca1d85f..56b4e88333 100644 --- a/src/game/IdleMovementGenerator.cpp +++ b/src/game/IdleMovementGenerator.cpp @@ -19,7 +19,7 @@ */ #include "IdleMovementGenerator.h" -#include "Creature.h" +#include "Unit.h" IdleMovementGenerator si_idleMovement; diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index bd1b1c610a..24f8cc254c 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -19,13 +19,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "InstanceSaveMgr.h" #include "Common.h" #include "Database/SQLStorage.h" #include "Player.h" #include "GridNotifiers.h" -#include "WorldSession.h" #include "Log.h" #include "GridStates.h" #include "CellImpl.h" @@ -37,7 +35,6 @@ #include "GridNotifiersImpl.h" #include "Config/ConfigEnv.h" #include "Transports.h" -#include "ObjectAccessor.h" #include "ObjectMgr.h" #include "World.h" #include "Group.h" diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index cde9eb7444..854ef9e1d2 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -21,7 +21,6 @@ #include "Common.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "Opcodes.h" #include "Log.h" #include "ObjectMgr.h" diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index e3c0c9f86f..a8bbbfb95a 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -20,13 +20,10 @@ #include "Common.h" #include "Database/DatabaseEnv.h" -#include "WorldPacket.h" -#include "WorldSession.h" #include "World.h" #include "Player.h" #include "Opcodes.h" #include "Chat.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "Language.h" #include "AccountMgr.h" diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 85b47e17da..0dd7221403 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -20,9 +20,6 @@ #include "Common.h" #include "Database/DatabaseEnv.h" -#include "WorldPacket.h" -#include "WorldSession.h" -#include "World.h" #include "ObjectMgr.h" #include "Player.h" #include "Item.h" diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index e505aebe1a..7b967693f6 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -36,7 +36,6 @@ #include "Guild.h" #include "ObjectAccessor.h" #include "MapManager.h" -#include "SpellAuras.h" #include "ScriptCalls.h" #include "Language.h" #include "GridNotifiersImpl.h" diff --git a/src/game/Map.cpp b/src/game/Map.cpp index ae09971008..c8fdd97312 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -21,7 +21,6 @@ #include "MapManager.h" #include "Player.h" #include "GridNotifiers.h" -#include "WorldSession.h" #include "Log.h" #include "GridStates.h" #include "CellImpl.h" diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 7f48f2c20b..d176c19baf 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -36,12 +36,10 @@ #include "Chat.h" #include "ScriptCalls.h" #include -#include "MapManager.h" #include "ObjectAccessor.h" #include "Object.h" #include "BattleGround.h" #include "OutdoorPvP.h" -#include "SpellAuras.h" #include "Pet.h" #include "SocialMgr.h" #include "CellImpl.h" diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index e9a3f7e90b..d8ce6c0a46 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -23,7 +23,6 @@ #include "WorldSession.h" #include "Opcodes.h" #include "Log.h" -#include "World.h" #include "Corpse.h" #include "Player.h" #include "MapManager.h" diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index 8ab1844fab..4cc24fb1e9 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -25,17 +25,14 @@ #include "WorldSession.h" #include "Opcodes.h" #include "Log.h" -#include "World.h" #include "ObjectMgr.h" #include "SpellMgr.h" #include "Player.h" #include "GossipDef.h" -#include "SpellAuras.h" #include "UpdateMask.h" #include "ScriptCalls.h" #include "ObjectAccessor.h" #include "Creature.h" -#include "MapManager.h" #include "Pet.h" #include "BattleGroundMgr.h" #include "BattleGround.h" diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 62f9c606b6..3cb5d31b6c 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -28,7 +28,6 @@ #include "Creature.h" #include "Player.h" #include "ObjectMgr.h" -#include "WorldSession.h" #include "UpdateData.h" #include "UpdateMask.h" #include "Util.h" diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index af365f5151..e89149a88e 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -25,8 +25,6 @@ #include "Creature.h" #include "GameObject.h" #include "DynamicObject.h" -#include "Corpse.h" -#include "WorldSession.h" #include "WorldPacket.h" #include "Item.h" #include "Corpse.h" diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp index 38083d0230..fbc422f973 100644 --- a/src/game/ObjectGridLoader.cpp +++ b/src/game/ObjectGridLoader.cpp @@ -21,7 +21,6 @@ #include "ObjectGridLoader.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" -#include "MapManager.h" #include "Creature.h" #include "GameObject.h" #include "DynamicObject.h" @@ -70,7 +69,7 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m) if(cur_cell.DiffGrid(resp_cell)) { - MapManager::Instance().GetMap(c->GetMapId(), c)->CreatureRespawnRelocation(c); + c->GetMap()->CreatureRespawnRelocation(c); // false result ignored: will be unload with other creatures at grid } } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index a3802a5eab..2c32c7ea90 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -30,7 +30,6 @@ #include "SpellMgr.h" #include "UpdateMask.h" #include "World.h" -#include "WorldSession.h" #include "Group.h" #include "Guild.h" #include "ArenaTeam.h" @@ -46,7 +45,6 @@ #include "Util.h" #include "WaypointManager.h" #include "InstanceData.h" //for condition_instance_data -#include "BattleGround.h" INSTANTIATE_SINGLETON_1(ObjectMgr); diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index fd7f88cfbd..652ee2e428 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -21,12 +21,10 @@ #include "Common.h" #include "Database/DatabaseEnv.h" #include "Log.h" -#include "WorldSession.h" #include "WorldPacket.h" #include "ObjectMgr.h" #include "SpellMgr.h" #include "Pet.h" -#include "MapManager.h" #include "Formulas.h" #include "SpellAuras.h" #include "CreatureAI.h" diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 0a506c2fbc..b5dbce8908 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -21,18 +21,15 @@ #include "Common.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "ObjectMgr.h" #include "SpellMgr.h" #include "Log.h" #include "Opcodes.h" #include "Spell.h" #include "ObjectAccessor.h" -#include "MapManager.h" #include "CreatureAI.h" #include "Util.h" #include "Pet.h" -#include "Language.h" void WorldSession::HandlePetAction( WorldPacket & recv_data ) { diff --git a/src/game/PetitionsHandler.cpp b/src/game/PetitionsHandler.cpp index 87a8d51259..df9761a7f5 100644 --- a/src/game/PetitionsHandler.cpp +++ b/src/game/PetitionsHandler.cpp @@ -28,7 +28,6 @@ #include "Opcodes.h" #include "Guild.h" #include "ArenaTeam.h" -#include "MapManager.h" #include "GossipDef.h" #include "SocialMgr.h" diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 99e4cf04b1..b73c548e56 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -23,7 +23,6 @@ #include "Database/DatabaseEnv.h" #include "Log.h" #include "Opcodes.h" -#include "ObjectMgr.h" #include "SpellMgr.h" #include "World.h" #include "WorldPacket.h" @@ -49,7 +48,6 @@ #include "Group.h" #include "Guild.h" #include "Pet.h" -#include "SpellAuras.h" #include "Util.h" #include "Transports.h" #include "Weather.h" diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index f3b1f2281f..70c2c4d966 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -22,7 +22,6 @@ #include "Errors.h" #include "Creature.h" #include "CreatureAI.h" -#include "MapManager.h" #include "DestinationHolderImp.h" //----- Point Movement Generator diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index 0f18aee054..bd47c7b6a8 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -17,10 +17,8 @@ */ #include "PoolHandler.h" -#include "World.h" #include "ObjectMgr.h" #include "ProgressBar.h" -#include "Language.h" #include "Log.h" #include "MapManager.h" #include "Policies/SingletonImp.h" diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index ac126a4514..1c23e8dc3a 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -31,7 +31,6 @@ #include "Player.h" #include "UpdateMask.h" #include "NPCHandler.h" -#include "ObjectAccessor.h" #include "Pet.h" #include "MapManager.h" diff --git a/src/game/SkillDiscovery.cpp b/src/game/SkillDiscovery.cpp index c6c85990e2..0fbaeb0fba 100644 --- a/src/game/SkillDiscovery.cpp +++ b/src/game/SkillDiscovery.cpp @@ -22,7 +22,6 @@ #include "Log.h" #include "ProgressBar.h" #include "Policies/SingletonImp.h" -#include "ObjectAccessor.h" #include "World.h" #include "Util.h" #include "SkillDiscovery.h" diff --git a/src/game/SkillHandler.cpp b/src/game/SkillHandler.cpp index fb00b13c68..154328af04 100644 --- a/src/game/SkillHandler.cpp +++ b/src/game/SkillHandler.cpp @@ -23,12 +23,10 @@ #include "Opcodes.h" #include "Log.h" #include "Player.h" -#include "World.h" #include "WorldPacket.h" #include "WorldSession.h" #include "ObjectAccessor.h" #include "UpdateMask.h" -#include "SpellAuras.h" void WorldSession::HandleLearnTalentOpcode( WorldPacket & recv_data ) { diff --git a/src/game/SocialMgr.cpp b/src/game/SocialMgr.cpp index b208cc5ece..86fb60cf5a 100644 --- a/src/game/SocialMgr.cpp +++ b/src/game/SocialMgr.cpp @@ -23,7 +23,6 @@ #include "Database/DatabaseEnv.h" #include "Opcodes.h" #include "WorldPacket.h" -#include "WorldSession.h" #include "Player.h" #include "ObjectMgr.h" #include "World.h" diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 36b2ccf6d4..625019ba70 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -35,7 +35,6 @@ #include "Unit.h" #include "Spell.h" #include "DynamicObject.h" -#include "SpellAuras.h" #include "Group.h" #include "UpdateData.h" #include "MapManager.h" diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 24f04ea143..6889870656 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -31,11 +31,9 @@ #include "Player.h" #include "Unit.h" #include "Spell.h" -#include "SpellAuras.h" #include "DynamicObject.h" #include "Group.h" #include "UpdateData.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "Policies/SingletonImp.h" #include "Totem.h" diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index a36cc22abd..1f143bacf8 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -19,10 +19,8 @@ */ #include "Common.h" -#include "SharedDefines.h" #include "Database/DatabaseEnv.h" #include "WorldPacket.h" -#include "WorldSession.h" #include "Opcodes.h" #include "Log.h" #include "UpdateMask.h" @@ -32,7 +30,6 @@ #include "Player.h" #include "SkillExtraItems.h" #include "Unit.h" -#include "CreatureAI.h" #include "Spell.h" #include "DynamicObject.h" #include "SpellAuras.h" diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 449025f034..1629af5a80 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -22,18 +22,15 @@ #include "Database/DBCStores.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "ObjectMgr.h" #include "SpellMgr.h" #include "Log.h" #include "Opcodes.h" #include "Spell.h" -#include "SpellAuras.h" -#include "BattleGround.h" -#include "MapManager.h" #include "ScriptCalls.h" #include "Totem.h" #include "TemporarySummon.h" +#include "SpellAuras.h" void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) { diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp index bb8486c8be..31b4dcab10 100644 --- a/src/game/TargetedMovementGenerator.cpp +++ b/src/game/TargetedMovementGenerator.cpp @@ -22,7 +22,6 @@ #include "TargetedMovementGenerator.h" #include "Errors.h" #include "Creature.h" -#include "MapManager.h" #include "DestinationHolderImp.h" #include "World.h" diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp index 289e141fdd..e233f7de07 100644 --- a/src/game/TaxiHandler.cpp +++ b/src/game/TaxiHandler.cpp @@ -24,7 +24,6 @@ #include "WorldSession.h" #include "Opcodes.h" #include "Log.h" -#include "World.h" #include "ObjectMgr.h" #include "Player.h" #include "UpdateMask.h" diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index f8daff972d..bd655ef144 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -19,8 +19,6 @@ */ #include "TemporarySummon.h" -#include "WorldPacket.h" -#include "MapManager.h" #include "Log.h" #include "ObjectAccessor.h" #include "CreatureAI.h" @@ -165,7 +163,7 @@ void TemporarySummon::Summon(TempSummonType type, uint32 lifetime) m_timer = lifetime; m_lifetime = lifetime; - MapManager::Instance().GetMap(GetMapId(), this)->Add((Creature*)this); + GetMap()->Add((Creature*)this); AIM_Initialize(); } diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp index 111da6bff4..60bb05b40b 100644 --- a/src/game/ThreatManager.cpp +++ b/src/game/ThreatManager.cpp @@ -23,7 +23,6 @@ #include "Creature.h" #include "CreatureAI.h" #include "Map.h" -#include "MapManager.h" #include "Player.h" #include "ObjectAccessor.h" #include "UnitEvents.h" diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index ae06be7918..25e2b2b2ad 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -20,7 +20,6 @@ #include "Totem.h" #include "WorldPacket.h" -#include "MapManager.h" #include "Log.h" #include "Group.h" #include "Player.h" diff --git a/src/game/TotemAI.cpp b/src/game/TotemAI.cpp index 7d9a6cfd05..a8a049f9dd 100644 --- a/src/game/TotemAI.cpp +++ b/src/game/TotemAI.cpp @@ -21,9 +21,7 @@ #include "TotemAI.h" #include "Totem.h" #include "Creature.h" -#include "Player.h" #include "Database/DBCStores.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "SpellMgr.h" diff --git a/src/game/Traveller.h b/src/game/Traveller.h index 89af68154e..c1bb6faa59 100644 --- a/src/game/Traveller.h +++ b/src/game/Traveller.h @@ -21,7 +21,6 @@ #ifndef TRINITY_TRAVELLER_H #define TRINITY_TRAVELLER_H -#include "MapManager.h" #include "Creature.h" #include "Player.h" #include @@ -89,7 +88,7 @@ inline float Traveller::Speed() template<> inline void Traveller::Relocation(float x, float y, float z, float orientation) { - MapManager::Instance().GetMap(i_traveller.GetMapId(), &i_traveller)->CreatureRelocation(&i_traveller, x, y, z, orientation); + i_traveller.GetMap()->CreatureRelocation(&i_traveller, x, y, z, orientation); } template<> @@ -143,7 +142,7 @@ inline float Traveller::GetMoveDestinationTo(float x, float y, float z) template<> inline void Traveller::Relocation(float x, float y, float z, float orientation) { - MapManager::Instance().GetMap(i_traveller.GetMapId(), &i_traveller)->PlayerRelocation(&i_traveller, x, y, z, orientation); + i_traveller.GetMap()->PlayerRelocation(&i_traveller, x, y, z, orientation); } template<> diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index b533609d76..cd24472d70 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -18,13 +18,8 @@ #include "Common.h" #include "Log.h" -#include "WorldSession.h" -#include "WorldPacket.h" #include "ObjectMgr.h" -#include "SpellMgr.h" #include "Vehicle.h" -#include "MapManager.h" -#include "SpellAuras.h" #include "Unit.h" #include "Util.h" diff --git a/src/game/VoiceChatHandler.cpp b/src/game/VoiceChatHandler.cpp index 4cf8649306..8e787549e3 100644 --- a/src/game/VoiceChatHandler.cpp +++ b/src/game/VoiceChatHandler.cpp @@ -21,7 +21,6 @@ #include "Common.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "World.h" #include "Opcodes.h" #include "Log.h" diff --git a/src/game/Weather.cpp b/src/game/Weather.cpp index add72da5cc..5d8d1fbd9b 100644 --- a/src/game/Weather.cpp +++ b/src/game/Weather.cpp @@ -24,7 +24,6 @@ #include "Weather.h" #include "WorldPacket.h" -#include "WorldSession.h" #include "Player.h" #include "World.h" #include "Log.h" diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 70a864229e..8e7c259592 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -22,12 +22,11 @@ \ingroup u2w */ -#include "WorldSocket.h" +#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it #include "Common.h" #include "Database/DatabaseEnv.h" #include "Log.h" #include "Opcodes.h" -#include "WorldSocket.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Player.h" @@ -35,12 +34,10 @@ #include "Group.h" #include "Guild.h" #include "World.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "BattleGroundMgr.h" #include "OutdoorPvPMgr.h" -#include "Language.h" // for CMSG_CANCEL_MOUNT_AURA handler -#include "Chat.h" +//#include "Language.h" // for CMSG_CANCEL_MOUNT_AURA handler #include "SocialMgr.h" /// WorldSession constructor @@ -377,7 +374,7 @@ void WorldSession::LogoutPlayer(bool Save) // the player may not be in the world when logging out // e.g if he got disconnected during a transfer to another map // calls to GetMap in this case may cause crashes - if(_player->IsInWorld()) MapManager::Instance().GetMap(_player->GetMapId(), _player)->Remove(_player, false); + if(_player->IsInWorld()) _player->GetMap()->Remove(_player, false); // RemoveFromWorld does cleanup that requires the player to be in the accessor ObjectAccessor::Instance().RemoveObject(_player); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 407f659f96..87863ccbe8 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7402" + #define REVISION_NR "7403" #endif // __REVISION_NR_H__