TrinityCore
Loading...
Searching...
No Matches
WaypointMgr Class Reference

#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
 

Detailed Description

Definition at line 31 of file WaypointManager.h.

Constructor & Destructor Documentation

◆ WaypointMgr() [1/3]

WaypointMgr::WaypointMgr ( WaypointMgr const &  )
delete

◆ WaypointMgr() [2/3]

WaypointMgr::WaypointMgr ( WaypointMgr &&  )
delete

◆ WaypointMgr() [3/3]

WaypointMgr::WaypointMgr ( )
privatedefault

◆ ~WaypointMgr()

WaypointMgr::~WaypointMgr ( )
privatedefault

Member Function Documentation

◆ _LoadPathNodes()

void WaypointMgr::_LoadPathNodes ( )
private

◆ _LoadPaths()

void WaypointMgr::_LoadPaths ( )
private

◆ DeleteNode() [1/2]

void WaypointMgr::DeleteNode ( uint32  pathId,
uint32  nodeId 
)

Definition at line 287 of file WaypointManager.cpp.

References DeleteNode(), GetNode(), and GetPath().

◆ DeleteNode() [2/2]

void WaypointMgr::DeleteNode ( WaypointPath const *  path,
WaypointNode const *  node 
)

◆ DevisualizePath()

void WaypointMgr::DevisualizePath ( Unit *  owner,
WaypointPath const *  path 
)

◆ DoPostLoadingChecks()

void WaypointMgr::DoPostLoadingChecks ( )

◆ GetNode() [1/2]

WaypointNode const * WaypointMgr::GetNode ( uint32  pathId,
uint32  nodeId 
) const

Definition at line 315 of file WaypointManager.cpp.

References GetNode(), and GetPath().

◆ GetNode() [2/2]

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().

◆ GetNodeByVisualGUID()

WaypointNode const * WaypointMgr::GetNodeByVisualGUID ( ObjectGuid  guid) const

Definition at line 333 of file WaypointManager.cpp.

References _visualWaypointGUIDToNodeMap.

◆ GetPath()

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().

◆ GetPathByVisualGUID()

WaypointPath const * WaypointMgr::GetPathByVisualGUID ( ObjectGuid  guid) const

Definition at line 324 of file WaypointManager.cpp.

References _visualWaypointGUIDToNodeMap.

◆ GetVisualGUIDByNode()

ObjectGuid const & WaypointMgr::GetVisualGUIDByNode ( uint32  pathId,
uint32  nodeId 
) const

Definition at line 342 of file WaypointManager.cpp.

References _nodeToVisualWaypointGUIDsMap, and ObjectGuid::Empty.

◆ instance()

WaypointMgr * WaypointMgr::instance ( )
static

Definition at line 165 of file WaypointManager.cpp.

References instance().

Referenced by instance().

◆ LoadPathFromDB()

void WaypointMgr::LoadPathFromDB ( PathQueryResult const &  fields)

◆ LoadPathNodesFromDB()

void WaypointMgr::LoadPathNodesFromDB ( PathNodeQueryResult const &  fields)

◆ LoadPaths()

void WaypointMgr::LoadPaths ( )

Definition at line 35 of file WaypointManager.cpp.

References _LoadPathNodes(), _LoadPaths(), and DoPostLoadingChecks().

◆ MoveNode()

◆ operator=() [1/2]

WaypointMgr & WaypointMgr::operator= ( WaypointMgr &&  )
delete

◆ operator=() [2/2]

WaypointMgr & WaypointMgr::operator= ( WaypointMgr const &  )
delete

◆ ReloadPath()

◆ VisualizePath()

Member Data Documentation

◆ _nodeToVisualWaypointGUIDsMap

std::unordered_map<std::pair<uint32 , uint32 >, ObjectGuid> WaypointMgr::_nodeToVisualWaypointGUIDsMap
private

Definition at line 76 of file WaypointManager.h.

Referenced by DevisualizePath(), GetVisualGUIDByNode(), and VisualizePath().

◆ _pathStore

std::unordered_map<uint32 , WaypointPath> WaypointMgr::_pathStore
private

◆ _visualWaypointGUIDToNodeMap

std::unordered_map<ObjectGuid, std::pair<WaypointPath const*, WaypointNode const*> > WaypointMgr::_visualWaypointGUIDToNodeMap
private

The documentation for this class was generated from the following files: