aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Movement')
-rw-r--r--src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp
index 21ae1a4abd7..218454f1c29 100644
--- a/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/FlightPathMovementGenerator.cpp
@@ -52,9 +52,9 @@ MovementGeneratorType FlightPathMovementGenerator::GetMovementGeneratorType() co
bool FlightPathMovementGenerator::GetResetPosition(Unit* /*owner*/, float& x, float& y, float& z)
{
TaxiPathNodeEntry const* node = _path[_currentNode];
- x = node->LocX;
- y = node->LocY;
- z = node->LocZ;
+ x = node->Loc.X;
+ y = node->Loc.Y;
+ z = node->Loc.Z;
return true;
}
@@ -88,7 +88,7 @@ void FlightPathMovementGenerator::DoReset(Player* owner)
init.Path().push_back(G3D::Vector3(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ()));
for (uint32 i = currentNodeId; i != end; ++i)
{
- G3D::Vector3 vertice(_path[i]->LocX, _path[i]->LocY, _path[i]->LocZ);
+ G3D::Vector3 vertice(_path[i]->Loc.X, _path[i]->Loc.Y, _path[i]->Loc.Z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
@@ -168,8 +168,8 @@ void FlightPathMovementGenerator::DoFinalize(Player* owner, bool active, bool/*
// When the player reaches the last flight point, teleport to destination taxi node location
if (TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(taxiNodeId))
{
- owner->SetFallInformation(0, node->z);
- owner->TeleportTo(node->map_id, node->x, node->y, node->z, owner->GetOrientation());
+ owner->SetFallInformation(0, node->Pos.Z);
+ owner->TeleportTo(node->ContinentID, node->Pos.X, node->Pos.Y, node->Pos.Z, owner->GetOrientation());
}
}
@@ -181,10 +181,10 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
if (_currentNode >= _path.size())
return _path.size();
- uint32 curMapId = _path[_currentNode]->MapID;
+ uint32 curMapId = _path[_currentNode]->ContinentID;
for (uint32 itr = _currentNode; itr < _path.size(); ++itr)
{
- if (_path[itr]->MapID != curMapId)
+ if (_path[itr]->ContinentID != curMapId)
return itr;
}
@@ -193,7 +193,7 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
bool IsNodeIncludedInShortenedPath(TaxiPathNodeEntry const* p1, TaxiPathNodeEntry const* p2)
{
- return p1->MapID != p2->MapID || std::pow(p1->LocX - p2->LocX, 2) + std::pow(p1->LocY - p2->LocY, 2) > SKIP_SPLINE_POINT_DISTANCE_SQ;
+ return p1->ContinentID != p2->ContinentID || std::pow(p1->Loc.X - p2->Loc.X, 2) + std::pow(p1->Loc.Y - p2->Loc.Y, 2) > SKIP_SPLINE_POINT_DISTANCE_SQ;
}
void FlightPathMovementGenerator::LoadPath(Player* owner)
@@ -242,10 +242,10 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
if (_path.empty() || _currentNode >= _path.size())
return;
- uint32 map0 = _path[_currentNode]->MapID;
+ uint32 map0 = _path[_currentNode]->ContinentID;
for (size_t i = _currentNode + 1; i < _path.size(); ++i)
{
- if (_path[i]->MapID != map0)
+ if (_path[i]->ContinentID != map0)
{
_currentNode = i;
return;
@@ -272,13 +272,13 @@ void FlightPathMovementGenerator::InitEndGridInfo()
*/
uint32 nodeCount = _path.size(); //! Number of nodes in path.
ASSERT(nodeCount, "FlightPathMovementGenerator::InitEndGridInfo() called with empty _path");
- _endMapId = _path[nodeCount - 1]->MapID; //! MapId of last node
+ _endMapId = _path[nodeCount - 1]->ContinentID; //! MapId of last node
if (nodeCount < 3)
_preloadTargetNode = 0;
else
_preloadTargetNode = nodeCount - 3;
- _endGridX = _path[nodeCount - 1]->LocX;
- _endGridY = _path[nodeCount - 1]->LocY;
+ _endGridX = _path[nodeCount - 1]->Loc.X;
+ _endGridY = _path[nodeCount - 1]->Loc.Y;
}
void FlightPathMovementGenerator::PreloadEndGrid()