![]() |
TrinityCore
|
#include <WaypointManager.h>
Public Member Functions | |
| WaypointMgr (WaypointMgr const &)=delete | |
| WaypointMgr (WaypointMgr &&)=delete | |
| WaypointMgr & | operator= (WaypointMgr const &)=delete |
| WaypointMgr & | operator= (WaypointMgr &&)=delete |
| void | ReloadPath (uint32 pathId) |
| void | LoadPaths () |
| void | LoadPathFromDB (PathQueryResult const &fields) |
| void | LoadPathNodesFromDB (PathNodeQueryResult const &fields) |
| void | DoPostLoadingChecks () |
| void | VisualizePath (Unit *owner, WaypointPath const *path, Optional< uint32 > displayId) |
| void | DevisualizePath (Unit *owner, WaypointPath const *path) |
| void | MoveNode (WaypointPath const *path, WaypointNode const *node, Position const &pos) |
| void | DeleteNode (WaypointPath const *path, WaypointNode const *node) |
| void | DeleteNode (uint32 pathId, uint32 nodeId) |
| WaypointPath const * | GetPath (uint32 pathId) const |
| WaypointNode const * | GetNode (WaypointPath const *path, uint32 nodeId) const |
| WaypointNode const * | GetNode (uint32 pathId, uint32 nodeId) const |
| WaypointPath const * | GetPathByVisualGUID (ObjectGuid guid) const |
| WaypointNode const * | GetNodeByVisualGUID (ObjectGuid guid) const |
| ObjectGuid const & | GetVisualGUIDByNode (uint32 pathId, uint32 nodeId) const |
Static Public Member Functions | |
| static WaypointMgr * | instance () |
Private Member Functions | |
| WaypointMgr () | |
| ~WaypointMgr () | |
| void | _LoadPaths () |
| void | _LoadPathNodes () |
Private Attributes | |
| std::unordered_map< uint32, WaypointPath > | _pathStore |
| std::unordered_map< std::pair< uint32, uint32 >, ObjectGuid > | _nodeToVisualWaypointGUIDsMap |
| std::unordered_map< ObjectGuid, std::pair< WaypointPath const *, WaypointNode const * > > | _visualWaypointGUIDToNodeMap |
Definition at line 31 of file WaypointManager.h.
|
delete |
|
delete |
|
privatedefault |
|
privatedefault |
|
private |
Definition at line 71 of file WaypointManager.cpp.
References getMSTime(), GetMSTimeDiffToNow(), LoadPathNodesFromDB(), PreparedStatementBase::setUInt32(), TC_LOG_INFO, WORLD_SEL_WAYPOINT_PATH_NODE, and WorldDatabase.
Referenced by LoadPaths().
|
private |
Definition at line 42 of file WaypointManager.cpp.
References _pathStore, getMSTime(), GetMSTimeDiffToNow(), LoadPathFromDB(), PreparedStatementBase::setUInt32(), TC_LOG_INFO, WORLD_SEL_WAYPOINT_PATH, and WorldDatabase.
Referenced by LoadPaths().
Definition at line 287 of file WaypointManager.cpp.
References DeleteNode(), GetNode(), and GetPath().
| void WaypointMgr::DeleteNode | ( | WaypointPath const * | path, |
| WaypointNode const * | node | ||
| ) |
Definition at line 274 of file WaypointManager.cpp.
References WaypointNode::Id, WaypointPath::Id, PreparedStatementBase::setUInt32(), WORLD_DEL_WAYPOINT_PATH_NODE, WORLD_UPD_WAYPOINT_PATH_NODE, and WorldDatabase.
Referenced by DeleteNode().
| void WaypointMgr::DevisualizePath | ( | Unit * | owner, |
| WaypointPath const * | path | ||
| ) |
Definition at line 242 of file WaypointManager.cpp.
References _nodeToVisualWaypointGUIDsMap, _visualWaypointGUIDToNodeMap, Creature::DespawnOrUnsummon(), ObjectAccessor::GetCreature(), WaypointPath::Id, and WaypointPath::Nodes.
| void WaypointMgr::DoPostLoadingChecks | ( | ) |
Definition at line 151 of file WaypointManager.cpp.
References _pathStore, FollowPathBackwardsFromEndToStart, TC_LOG_ERROR, and WAYPOINT_PATH_FLAG_FOLLOW_PATH_BACKWARDS_MINIMUM_NODES.
Referenced by LoadPaths().
| WaypointNode const * WaypointMgr::GetNode | ( | uint32 | pathId, |
| uint32 | nodeId | ||
| ) | const |
Definition at line 315 of file WaypointManager.cpp.
| WaypointNode const * WaypointMgr::GetNode | ( | WaypointPath const * | path, |
| uint32 | nodeId | ||
| ) | const |
Definition at line 305 of file WaypointManager.cpp.
References WaypointPath::Nodes.
Referenced by DeleteNode(), and GetNode().
| WaypointNode const * WaypointMgr::GetNodeByVisualGUID | ( | ObjectGuid | guid | ) | const |
Definition at line 333 of file WaypointManager.cpp.
References _visualWaypointGUIDToNodeMap.
| WaypointPath const * WaypointMgr::GetPath | ( | uint32 | pathId | ) | const |
Definition at line 300 of file WaypointManager.cpp.
References _pathStore, and Trinity::Containers::MapGetValuePtr().
Referenced by DeleteNode(), and GetNode().
| WaypointPath const * WaypointMgr::GetPathByVisualGUID | ( | ObjectGuid | guid | ) | const |
Definition at line 324 of file WaypointManager.cpp.
References _visualWaypointGUIDToNodeMap.
| ObjectGuid const & WaypointMgr::GetVisualGUIDByNode | ( | uint32 | pathId, |
| uint32 | nodeId | ||
| ) | const |
Definition at line 342 of file WaypointManager.cpp.
References _nodeToVisualWaypointGUIDsMap, and ObjectGuid::Empty.
|
static |
Definition at line 165 of file WaypointManager.cpp.
References instance().
Referenced by instance().
| void WaypointMgr::LoadPathFromDB | ( | PathQueryResult const & | fields | ) |
Definition at line 99 of file WaypointManager.cpp.
References _pathStore, AsUnderlyingType(), WaypointPath::Flags, WaypointPath::Id, Max, WaypointPath::MoveType, WaypointPath::Nodes, TC_LOG_ERROR, and WaypointPath::Velocity.
Referenced by _LoadPaths(), and ReloadPath().
| void WaypointMgr::LoadPathNodesFromDB | ( | PathNodeQueryResult const & | fields | ) |
Definition at line 125 of file WaypointManager.cpp.
References _pathStore, Trinity::Containers::MapGetValuePtr(), WaypointPath::Nodes, Trinity::NormalizeMapCoord(), and TC_LOG_ERROR.
Referenced by _LoadPathNodes(), and ReloadPath().
| void WaypointMgr::LoadPaths | ( | ) |
Definition at line 35 of file WaypointManager.cpp.
References _LoadPathNodes(), _LoadPaths(), and DoPostLoadingChecks().
| void WaypointMgr::MoveNode | ( | WaypointPath const * | path, |
| WaypointNode const * | node, | ||
| Position const & | pos | ||
| ) |
Definition at line 262 of file WaypointManager.cpp.
References Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), WaypointNode::Id, WaypointPath::Id, PreparedStatementBase::setFloat(), PreparedStatementBase::setUInt32(), WORLD_UPD_WAYPOINT_PATH_NODE_POSITION, and WorldDatabase.
|
delete |
|
delete |
| void WaypointMgr::ReloadPath | ( | uint32 | pathId | ) |
Definition at line 171 of file WaypointManager.cpp.
References _pathStore, LoadPathFromDB(), LoadPathNodesFromDB(), Trinity::Containers::MapGetValuePtr(), PreparedStatementBase::setUInt32(), TC_LOG_ERROR, WORLD_SEL_WAYPOINT_PATH, WORLD_SEL_WAYPOINT_PATH_NODE, and WorldDatabase.
| void WaypointMgr::VisualizePath | ( | Unit * | owner, |
| WaypointPath const * | path, | ||
| Optional< uint32 > | displayId | ||
| ) |
Definition at line 217 of file WaypointManager.cpp.
References _nodeToVisualWaypointGUIDsMap, _visualWaypointGUIDToNodeMap, BaseEntity::GetGUID(), WaypointPath::Id, WaypointPath::Nodes, Creature::SetDisplayId(), Creature::SetObjectScale(), WorldObject::SummonCreature(), and VISUAL_WAYPOINT.
|
private |
Definition at line 76 of file WaypointManager.h.
Referenced by DevisualizePath(), GetVisualGUIDByNode(), and VisualizePath().
|
private |
Definition at line 74 of file WaypointManager.h.
Referenced by _LoadPaths(), DoPostLoadingChecks(), GetPath(), LoadPathFromDB(), LoadPathNodesFromDB(), and ReloadPath().
|
private |
Definition at line 77 of file WaypointManager.h.
Referenced by DevisualizePath(), GetNodeByVisualGUID(), GetPathByVisualGUID(), and VisualizePath().