TrinityCore
Loading...
Searching...
No Matches
wp_commandscript Class Reference
+ Inheritance diagram for wp_commandscript:

Public Member Functions

 wp_commandscript ()
 
std::span< ChatCommandBuilder const > GetCommands () const override
 
- Public Member Functions inherited from CommandScript
 ~CommandScript ()
 
- Public Member Functions inherited from ScriptObject
 ScriptObject (ScriptObject const &right)=delete
 
 ScriptObject (ScriptObject &&right)=delete
 
ScriptObject & operator= (ScriptObject const &right)=delete
 
ScriptObject & operator= (ScriptObject &&right)=delete
 
std::string const & GetName () const
 

Static Public Member Functions

static bool HandleWpAddCommand (ChatHandler *handler, Optional< uint32 > pathid)
 
static bool HandleWpLoadCommand (ChatHandler *handler, uint32 pathid)
 
static bool HandleWpReloadCommand (ChatHandler *handler, uint32 id)
 
static bool HandleWpUnLoadCommand (ChatHandler *handler)
 
static bool HandleWpModifyCommand (ChatHandler *handler, Variant< EXACT_SEQUENCE("del"), EXACT_SEQUENCE("move")> show)
 
static bool HandleWpShowCommand (ChatHandler *handler, Variant< EXACT_SEQUENCE("off"), EXACT_SEQUENCE("on"), EXACT_SEQUENCE("info")> show, Optional< uint32 > pathid)
 

Additional Inherited Members

- Protected Member Functions inherited from CommandScript
 CommandScript (char const *name) noexcept
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (char const *name) noexcept
 
virtual ~ScriptObject ()
 

Detailed Description

Definition at line 41 of file cs_wp.cpp.

Constructor & Destructor Documentation

◆ wp_commandscript()

wp_commandscript::wp_commandscript ( )
inline

Definition at line 44 of file cs_wp.cpp.

Member Function Documentation

◆ GetCommands()

◆ HandleWpAddCommand()

static bool wp_commandscript::HandleWpAddCommand ( ChatHandler *  handler,
Optional< uint32 >  pathid 
)
inlinestatic

Add a waypoint to a creature.

The user can either select an npc or provide its GUID.

The user can even select a visual waypoint - then the new waypoint is placed after the selected one - this makes insertion of new waypoints possible.

eg: .wp add 12345 -> adds a waypoint to the npc with the GUID 12345

.wp add -> adds a waypoint to the currently selected creature

Parameters
pathid(optional)
Returns
true - command did succeed, false - something went wrong

Definition at line 84 of file cs_wp.cpp.

References AsUnderlyingType(), Unit::GetDisplayId(), Position::GetOrientation(), ChatHandler::GetPlayer(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ChatHandler::getSelectedCreature(), Creature::GetWaypointPathId(), None, ChatHandler::PSendSysMessage(), PreparedStatementBase::setFloat(), PreparedStatementBase::setNull(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt8(), sWaypointMgr, Walk, WORLD_INS_WAYPOINT_PATH, WORLD_INS_WAYPOINT_PATH_NODE, WORLD_SEL_WAYPOINT_PATH_NODE_MAX_NODEID, WORLD_SEL_WAYPOINT_PATH_NODE_MAX_PATHID, and WorldDatabase.

Referenced by GetCommands().

◆ HandleWpLoadCommand()

◆ HandleWpModifyCommand()

◆ HandleWpReloadCommand()

static bool wp_commandscript::HandleWpReloadCommand ( ChatHandler *  handler,
uint32  id 
)
inlinestatic

Definition at line 218 of file cs_wp.cpp.

References ChatHandler::PSendSysMessage(), and sWaypointMgr.

Referenced by GetCommands().

◆ HandleWpShowCommand()

◆ HandleWpUnLoadCommand()


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