|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <WaypointMovementGenerator.h>
Public Member Functions | |
| void | DoFinalize (Creature *) |
| void | DoInitialize (Creature *) |
| void | DoReset (Creature *) |
| bool | DoUpdate (Creature *, uint32 diff) |
| MovementGeneratorType | GetMovementGeneratorType () |
| bool | GetResetPos (Creature *, float &x, float &y, float &z) |
| void | LoadPath (Creature *) |
| void | MovementInform (Creature *) |
| WaypointMovementGenerator (uint32 _path_id=0, bool _repeating=true) | |
| ~WaypointMovementGenerator () | |
| Public Member Functions inherited from MovementGeneratorMedium< Creature, WaypointMovementGenerator< Creature > > | |
| void | Finalize (Unit *u) |
| void | Initialize (Unit *u) |
| void | Reset (Unit *u) |
| bool | Update (Unit *u, uint32 time_diff) |
| Public Member Functions inherited from MovementGenerator | |
| virtual bool | GetResetPosition (Unit *, float &, float &, float &) |
| virtual void | unitSpeedChanged () |
| virtual | ~MovementGenerator () |
| Public Member Functions inherited from PathMovementBase< T, P > | |
| uint32 | GetCurrentNode () const |
| void | LoadPath (T &) |
| PathMovementBase () | |
| virtual | ~PathMovementBase () |
Private Member Functions | |
| bool | CanMove (int32 diff) |
| void | OnArrived (Creature *) |
| bool | StartMove (Creature *) |
| void | StartMoveNow (Creature *creature) |
| void | Stop (int32 time) |
| bool | Stopped () |
Private Attributes | |
| TimeTrackerSmall | i_nextMoveTime |
| bool | m_isArrivalDone |
| uint32 | path_id |
| bool | repeating |
Additional Inherited Members | |
| Protected Attributes inherited from PathMovementBase< T, P > | |
| uint32 | i_currentNode |
| P | i_path |
Definition at line 48 of file WaypointMovementGenerator.h.
|
inline |
Definition at line 52 of file WaypointMovementGenerator.h.
References i_nextMoveTime, m_isArrivalDone, path_id, and repeating.
Referenced by DoFinalize(), DoInitialize(), DoReset(), DoUpdate(), GetResetPos(), LoadPath(), MovementInform(), OnArrived(), and StartMove().
|
inline |
Definition at line 54 of file WaypointMovementGenerator.h.
References PathMovementBase< T, P >::i_path.
|
inlineprivate |
Definition at line 74 of file WaypointMovementGenerator.h.
References i_nextMoveTime.
Referenced by DoUpdate().
| void WaypointMovementGenerator< Creature >::DoFinalize | ( | Creature * | creature | ) |
Definition at line 46 of file WaypointMovementGenerator.cpp.
References Unit::ClearUnitState(), Unit::SetWalk(), UNIT_STATE_ROAMING, UNIT_STATE_ROAMING_MOVE, and WaypointMovementGenerator().
| void WaypointMovementGenerator< Creature >::DoInitialize | ( | Creature * | creature | ) |
Definition at line 40 of file WaypointMovementGenerator.cpp.
References Unit::AddUnitState(), LoadPath(), UNIT_STATE_ROAMING, UNIT_STATE_ROAMING_MOVE, and WaypointMovementGenerator().
| void WaypointMovementGenerator< Creature >::DoReset | ( | Creature * | creature | ) |
Definition at line 52 of file WaypointMovementGenerator.cpp.
References Unit::AddUnitState(), StartMoveNow(), UNIT_STATE_ROAMING, UNIT_STATE_ROAMING_MOVE, and WaypointMovementGenerator().
| bool WaypointMovementGenerator< Creature >::DoUpdate | ( | Creature * | creature, |
| uint32 | diff ) |
Definition at line 157 of file WaypointMovementGenerator.cpp.
References CanMove(), Unit::ClearUnitState(), Unit::HasUnitState(), PathMovementBase< T, P >::i_path, Unit::IsStopped(), Unit::movespline, OnArrived(), StartMove(), Stop(), STOP_TIME_FOR_PLAYER, Stopped(), UNIT_STATE_NOT_MOVE, UNIT_STATE_ROAMING_MOVE, and WaypointMovementGenerator().
|
inlinevirtual |
Implements MovementGenerator.
Definition at line 62 of file WaypointMovementGenerator.h.
References WAYPOINT_MOTION_TYPE.
| bool WaypointMovementGenerator< Creature >::GetResetPos | ( | Creature * | , |
| float & | x, | ||
| float & | y, | ||
| float & | z ) |
Definition at line 194 of file WaypointMovementGenerator.cpp.
References PathMovementBase< T, P >::i_currentNode, PathMovementBase< T, P >::i_path, WaypointMovementGenerator(), WaypointData::x, WaypointData::y, and WaypointData::z.
| void WaypointMovementGenerator< Creature >::LoadPath | ( | Creature * | creature | ) |
Definition at line 23 of file WaypointMovementGenerator.cpp.
References Creature::GetDBTableGUIDLow(), Object::GetEntry(), Object::GetGUIDLow(), WorldObject::GetName(), Creature::GetWaypointPath(), PathMovementBase< T, P >::i_path, path_id, SF_LOG_ERROR, StartMoveNow(), sWaypointMgr, and WaypointMovementGenerator().
Referenced by DoInitialize().
| void WaypointMovementGenerator< Creature >::MovementInform | ( | Creature * | creature | ) |
Definition at line 188 of file WaypointMovementGenerator.cpp.
References Creature::AI(), PathMovementBase< T, P >::i_currentNode, CreatureAI::MovementInform(), WAYPOINT_MOTION_TYPE, and WaypointMovementGenerator().
Referenced by OnArrived().
|
private |
Definition at line 58 of file WaypointMovementGenerator.cpp.
References Unit::ClearUnitState(), Object::GetGUID(), WorldObject::GetMap(), PathMovementBase< T, P >::i_currentNode, PathMovementBase< T, P >::i_path, m_isArrivalDone, MovementInform(), Map::ScriptsStart(), SF_LOG_DEBUG, Stop(), sWaypointScripts, UI64FMTD, UNIT_STATE_ROAMING_MOVE, Creature::UpdateWaypointID(), and WaypointMovementGenerator().
Referenced by DoUpdate().
|
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
Accepts angles such as 0.00001 and -0.00001, 0 must be ignored, default value in waypoint table
Definition at line 80 of file WaypointMovementGenerator.cpp.
References Unit::AddUnitState(), WaypointData::delay, Movement::MoveSplineInit::DisableTransportPathTransformations(), Unit::GetDirectTransport(), Creature::GetFormation(), CreatureGroup::getLeader(), Unit::GetMotionMaster(), Position::GetOrientation(), WorldObject::GetTransport(), PathMovementBase< T, P >::i_currentNode, PathMovementBase< T, P >::i_path, MotionMaster::Initialize(), Movement::MoveSplineInit::Launch(), CreatureGroup::LeaderMoveTo(), m_isArrivalDone, Movement::MoveSplineInit::MoveTo(), Movement::Location::orientation, WaypointData::orientation, repeating, WaypointData::run, Movement::MoveSplineInit::SetFacing(), Creature::SetHomePosition(), Creature::SetTransportHomePosition(), Movement::MoveSplineInit::SetWalk(), Stopped(), UNIT_STATE_ROAMING_MOVE, WaypointMovementGenerator(), WaypointData::x, WaypointData::y, and WaypointData::z.
Referenced by DoUpdate(), and StartMoveNow().
|
inlineprivate |
Definition at line 83 of file WaypointMovementGenerator.h.
References i_nextMoveTime, and StartMove().
Referenced by DoReset(), and LoadPath().
|
inlineprivate |
Definition at line 70 of file WaypointMovementGenerator.h.
References i_nextMoveTime.
Referenced by DoUpdate(), and OnArrived().
|
inlineprivate |
Definition at line 72 of file WaypointMovementGenerator.h.
References i_nextMoveTime.
Referenced by DoUpdate(), and StartMove().
|
private |
Definition at line 89 of file WaypointMovementGenerator.h.
Referenced by CanMove(), StartMoveNow(), Stop(), Stopped(), and WaypointMovementGenerator().
|
private |
Definition at line 90 of file WaypointMovementGenerator.h.
Referenced by OnArrived(), StartMove(), and WaypointMovementGenerator().
|
private |
Definition at line 91 of file WaypointMovementGenerator.h.
Referenced by LoadPath(), and WaypointMovementGenerator().
|
private |
Definition at line 92 of file WaypointMovementGenerator.h.
Referenced by StartMove(), and WaypointMovementGenerator().