45 owner->GetTransOffsetZ(), offset.X, offset.Y, offset.Z, TransportPetFollowTolerance))
51 D::_addUnitStateMove(owner);
57 init.DisableTransportPathTransformations();
58 init.MoveTo(offset.X, offset.Y, offset.Z,
false,
true);
59 init.SetWalk(((D*)
this)->EnableWalking());
61 init.SetFacing(
i_target.getTarget());
67 if (updateDestination || !i_path)
72 i_target->GetContactPoint(owner, x, y, z);
87 dist = i_target->GetCombatReach();
88 size = i_target->GetCombatReach() - i_target->GetObjectSize();
92 dist = i_offset + 1.0f;
93 size = owner->GetObjectSize();
96 if (i_target->IsWithinDistInMap(owner, dist))
100 i_target->GetClosePoint(x, y, z, size, i_offset, i_angle);
106 G3D::Vector3 end = i_path->GetEndPosition();
116 bool forceDest = (owner->GetTypeId() ==
TypeID::TYPEID_UNIT && owner->ToCreature()->IsPet()
119 bool result = i_path->CalculatePath(x, y, z, forceDest);
123 i_recalculateTravel =
true;
127 D::_addUnitStateMove(owner);
128 i_targetReached =
false;
129 i_recalculateTravel =
false;
133 init.MovebyPath(i_path->GetPath());
134 init.SetWalk(((D*)
this)->EnableWalking());
138 init.SetFacing(i_target.getTarget());
149 if (!owner || !owner->IsAlive())
154 D::_clearUnitStateMove(owner);
161 if (!owner->IsStopped())
167 if (
static_cast<D*
>(
this)->_lostTarget(owner))
169 D::_clearUnitStateMove(owner);
173 bool targetMoved =
false;
180 G3D::Vector3 dest = owner->movespline->FinalDestination();
183 targetMoved = !
i_target->IsWithinDist3d(dest.x, dest.y, dest.z, allowed_dist);
185 targetMoved = !
i_target->IsWithinDist2d(dest.x, dest.y, allowed_dist);
191 if (owner->movespline->Finalized())
193 static_cast<D*
>(
this)->MovementInform(owner);
195 owner->SetInFront(
i_target.getTarget());
200 static_cast<D*
>(
this)->_reachTarget(owner);