![]() |
TrinityCore
|
#include <WaypointMovementGenerator.h>
Inheritance diagram for WaypointMovementGenerator< Creature >:Public Member Functions | |
| WaypointMovementGenerator (uint32 pathId=0, bool repeating=true) | |
| WaypointMovementGenerator (WaypointPath &path, bool repeating=true) | |
| ~WaypointMovementGenerator () | |
| MovementGeneratorType | GetMovementGeneratorType () const override |
| void | UnitSpeedChanged () override |
| void | Pause (uint32 timer=0) override |
| void | Resume (uint32 overrideTimer=0) override |
| bool | GetResetPosition (Unit *, float &x, float &y, float &z) override |
| bool | DoInitialize (Creature *) |
| bool | DoReset (Creature *) |
| bool | DoUpdate (Creature *, uint32) |
| void | DoDeactivate (Creature *) |
| void | DoFinalize (Creature *, bool, bool) |
| std::string | GetDebugInfo () const override |
Public Member Functions inherited from MovementGeneratorMedium< Creature, WaypointMovementGenerator< Creature > > | |
| bool | Initialize (Unit *owner) override |
| bool | Reset (Unit *owner) override |
| bool | Update (Unit *owner, uint32 diff) override |
| void | Deactivate (Unit *owner) override |
| void | Finalize (Unit *owner, bool active, bool movementInform) override |
Public Member Functions inherited from MovementGenerator | |
| MovementGenerator () | |
| virtual | ~MovementGenerator () |
| void | AddFlag (uint16 const flag) |
| bool | HasFlag (uint16 const flag) const |
| void | RemoveFlag (uint16 const flag) |
Public Member Functions inherited from PathMovementBase< Entity, BasePath > | |
| PathMovementBase () | |
| virtual | ~PathMovementBase () |
| uint32 | GetCurrentNode () const |
Private Member Functions | |
| void | MovementInform (Creature *) |
| void | OnArrived (Creature *) |
| void | StartMove (Creature *, bool relaunch=false) |
| bool | ComputeNextNode () |
| bool | UpdateTimer (uint32 diff) |
Private Attributes | |
| TimeTracker | _nextMoveTime |
| uint32 | _pathId |
| bool | _repeating |
| bool | _loadedFromDB |
Additional Inherited Members | |
Public Attributes inherited from MovementGenerator | |
| uint8 | Priority |
| uint16 | Flags |
| uint32 | BaseUnitState |
Protected Attributes inherited from PathMovementBase< Entity, BasePath > | |
| BasePath | _path |
| uint32 | _currentNode |
Definition at line 33 of file WaypointMovementGenerator.h.
|
explicit |
Definition at line 31 of file WaypointMovementGenerator.cpp.
References MOTION_PRIORITY_NORMAL, MOVEMENTGENERATOR_FLAG_INITIALIZATION_PENDING, and UNIT_STATE_ROAMING.
|
explicit |
Definition at line 38 of file WaypointMovementGenerator.cpp.
References MOTION_PRIORITY_NORMAL, MOVEMENTGENERATOR_FLAG_INITIALIZATION_PENDING, and UNIT_STATE_ROAMING.
|
inline |
Definition at line 38 of file WaypointMovementGenerator.h.
|
private |
Definition at line 377 of file WaypointMovementGenerator.cpp.
| void WaypointMovementGenerator< Creature >::DoDeactivate | ( | Creature * | owner | ) |
Definition at line 213 of file WaypointMovementGenerator.cpp.
References Unit::ClearUnitState(), MOVEMENTGENERATOR_FLAG_DEACTIVATED, and UNIT_STATE_ROAMING_MOVE.
| void WaypointMovementGenerator< Creature >::DoFinalize | ( | Creature * | owner, |
| bool | active, | ||
| bool | |||
| ) |
Definition at line 219 of file WaypointMovementGenerator.cpp.
References Unit::ClearUnitState(), MOVEMENTGENERATOR_FLAG_FINALIZED, Unit::SetWalk(), and UNIT_STATE_ROAMING_MOVE.
| bool WaypointMovementGenerator< Creature >::DoInitialize | ( | Creature * | owner | ) |
Definition at line 98 of file WaypointMovementGenerator.cpp.
References Object::GetGUID(), Creature::GetWaypointPath(), MOVEMENTGENERATOR_FLAG_DEACTIVATED, MOVEMENTGENERATOR_FLAG_INITIALIZATION_PENDING, MOVEMENTGENERATOR_FLAG_TRANSITORY, Unit::StopMoving(), sWaypointMgr, TC_LOG_ERROR, and ObjectGuid::ToString().
| bool WaypointMovementGenerator< Creature >::DoReset | ( | Creature * | owner | ) |
Definition at line 122 of file WaypointMovementGenerator.cpp.
References MOVEMENTGENERATOR_FLAG_DEACTIVATED, MOVEMENTGENERATOR_FLAG_FINALIZED, MOVEMENTGENERATOR_FLAG_TRANSITORY, and Unit::StopMoving().
| bool WaypointMovementGenerator< Creature >::DoUpdate | ( | Creature * | owner, |
| uint32 | diff | ||
| ) |
Definition at line 133 of file WaypointMovementGenerator.cpp.
References Movement::MoveSpline::Finalized(), Position::GetPosition(), Unit::GetTransGUID(), Unit::HasUnitMovementFlag(), Unit::HasUnitState(), Unit::IsAlive(), ObjectGuid::IsEmpty(), Creature::IsMovementPreventedByCasting(), MOVEMENTFLAG_ONTRANSPORT, MOVEMENTGENERATOR_FLAG_FINALIZED, MOVEMENTGENERATOR_FLAG_INFORM_ENABLED, MOVEMENTGENERATOR_FLAG_INITIALIZED, MOVEMENTGENERATOR_FLAG_INTERRUPTED, MOVEMENTGENERATOR_FLAG_PAUSED, MOVEMENTGENERATOR_FLAG_SPEED_UPDATE_PENDING, Unit::movespline, Creature::SetHomePosition(), Unit::StopMoving(), UNIT_STATE_LOST_CONTROL, and UNIT_STATE_NOT_MOVE.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 386 of file WaypointMovementGenerator.cpp.
References MovementGenerator::GetDebugInfo(), and PathMovementBase< Entity, BasePath >::GetDebugInfo().
|
overridevirtual |
Implements MovementGenerator.
Definition at line 47 of file WaypointMovementGenerator.cpp.
References WAYPOINT_MOTION_TYPE.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 83 of file WaypointMovementGenerator.cpp.
References ASSERT, WaypointNode::x, WaypointNode::y, and WaypointNode::z.
|
private |
Definition at line 231 of file WaypointMovementGenerator.cpp.
References Creature::AI(), CreatureAI::MovementInform(), and WAYPOINT_MOTION_TYPE.
|
private |
Definition at line 237 of file WaypointMovementGenerator.cpp.
References Creature::AI(), ASSERT, Unit::ClearUnitState(), WaypointNode::delay, WaypointNode::eventChance, WaypointNode::eventId, Object::GetGUID(), WorldObject::GetMap(), WaypointNode::id, Map::ScriptsStart(), sWaypointScripts, TC_LOG_DEBUG, ObjectGuid::ToString(), UNIT_STATE_ROAMING_MOVE, Creature::UpdateCurrentWaypointInfo(), urand(), and WAYPOINT_MOTION_TYPE.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 52 of file WaypointMovementGenerator.cpp.
References MOVEMENTGENERATOR_FLAG_PAUSED, and MOVEMENTGENERATOR_FLAG_TIMED_PAUSED.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 72 of file WaypointMovementGenerator.cpp.
References MOVEMENTGENERATOR_FLAG_PAUSED.
|
private |
If creature is on transport, we assume waypoints set in DB are already transport offsets
Do not use formationDest here, MoveTo requires transport offsets due to DisableTransportPathTransformations() call but formationDest contains global coordinates
Definition at line 270 of file WaypointMovementGenerator.cpp.
References Unit::AddUnitState(), Creature::AI(), ASSERT, WaypointNode::delay, Movement::MoveSplineInit::DisableTransportPathTransformations(), Position::GetOrientation(), Unit::GetTransGUID(), WorldObject::GetTransport(), Ground, Unit::HasUnitMovementFlag(), Unit::HasUnitState(), Hover, WaypointNode::id, Unit::IsAlive(), ObjectGuid::IsEmpty(), Creature::IsFormationLeader(), Creature::IsFormationLeaderMoveAllowed(), Creature::IsMovementPreventedByCasting(), Movement::MoveSplineInit::Launch(), MOVEMENTFLAG_ONTRANSPORT, MOVEMENTGENERATOR_FLAG_FINALIZED, MOVEMENTGENERATOR_FLAG_INFORM_ENABLED, MOVEMENTGENERATOR_FLAG_INITIALIZED, MOVEMENTGENERATOR_FLAG_TIMED_PAUSED, MOVEMENTGENERATOR_FLAG_TRANSITORY, Movement::MoveSplineInit::MoveTo(), WaypointNode::moveType, WaypointNode::orientation, Movement::MoveSplineInit::SetAnimation(), Movement::MoveSplineInit::SetFacing(), Creature::SetHomePosition(), Creature::SetTransportHomePosition(), Movement::MoveSplineInit::SetWalk(), Creature::SignalFormationMovement(), UNIT_STATE_NOT_MOVE, UNIT_STATE_ROAMING_MOVE, Creature::UpdateCurrentWaypointInfo(), WAYPOINT_MOVE_TYPE_LAND, WAYPOINT_MOVE_TYPE_RUN, WAYPOINT_MOVE_TYPE_TAKEOFF, WAYPOINT_MOVE_TYPE_WALK, WaypointNode::x, WaypointNode::y, and WaypointNode::z.
|
inlineoverridevirtual |
Reimplemented from MovementGenerator.
Definition at line 42 of file WaypointMovementGenerator.h.
References MOVEMENTGENERATOR_FLAG_SPEED_UPDATE_PENDING.
|
inlineprivate |
Definition at line 60 of file WaypointMovementGenerator.h.
|
private |
Definition at line 74 of file WaypointMovementGenerator.h.
|
private |
Definition at line 71 of file WaypointMovementGenerator.h.
|
private |
Definition at line 72 of file WaypointMovementGenerator.h.
|
private |
Definition at line 73 of file WaypointMovementGenerator.h.