mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 13:09:50 -04:00
Core/Game: Include cleanup part 5
* ObjectMgr.h * Player.h * Unit.h * G3D should no longer propagate everywhere from Spline/MotionMaster
This commit is contained in:
@@ -17,35 +17,37 @@
|
||||
*/
|
||||
|
||||
#include "Object.h"
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
#include "World.h"
|
||||
#include "Creature.h"
|
||||
#include "Player.h"
|
||||
#include "Vehicle.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Util.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Transport.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "AreaTriggerTemplate.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "CinematicMgr.h"
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "InstanceScenario.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MovementPackets.h"
|
||||
#include "MovementTypedefs.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Player.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Totem.h"
|
||||
#include "MovementPackets.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "Unit.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "InstanceScenario.h"
|
||||
#include "AreaTriggerTemplate.h"
|
||||
#include "UpdateData.h"
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "Util.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include <G3D/Vector3.h>
|
||||
|
||||
Object::Object()
|
||||
{
|
||||
@@ -258,7 +260,7 @@ void Object::SendUpdateToPlayer(Player* player)
|
||||
else
|
||||
BuildCreateUpdateBlockForPlayer(&upd, player);
|
||||
upd.BuildPacket(&packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target) const
|
||||
@@ -569,15 +571,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
|
||||
if (hasAreaTriggerSpline)
|
||||
{
|
||||
std::vector<G3D::Vector3> const& splinePoints = areaTrigger->GetSpline().getPoints();
|
||||
|
||||
*data << uint32(areaTrigger->GetTimeToTarget());
|
||||
*data << uint32(areaTrigger->GetElapsedTimeForMovement());
|
||||
|
||||
data->WriteBits(splinePoints.size(), 16);
|
||||
|
||||
for (G3D::Vector3 const& spline : splinePoints)
|
||||
*data << spline.x << spline.y << spline.z;
|
||||
WorldPackets::Movement::CommonMovement::WriteCreateObjectAreaTriggerSpline(areaTrigger->GetSpline(), *data);
|
||||
}
|
||||
|
||||
if (hasTargetRollPitchYaw)
|
||||
@@ -624,11 +621,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << float(areaTriggerTemplate->PolygonDatas.Height);
|
||||
*data << float(areaTriggerTemplate->PolygonDatas.HeightTarget);
|
||||
|
||||
for (G3D::Vector2 const& vertice : areaTriggerTemplate->PolygonVertices)
|
||||
*data << vertice.x << vertice.y;
|
||||
for (TaggedPosition<Position::XY> const& vertice : areaTriggerTemplate->PolygonVertices)
|
||||
*data << vertice;
|
||||
|
||||
for (G3D::Vector2 const& vertice : areaTriggerTemplate->PolygonVerticesTarget)
|
||||
*data << vertice.x << vertice.y;
|
||||
for (TaggedPosition<Position::XY> const& vertice : areaTriggerTemplate->PolygonVerticesTarget)
|
||||
*data << vertice;
|
||||
}
|
||||
|
||||
if (hasAreaTriggerCylinder)
|
||||
|
||||
Reference in New Issue
Block a user