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

Public Member Functions

 wp_commandscript ()
 
std::vector< ChatCommand > GetCommands () const override
 
- Public Member Functions inherited from ScriptObject
std::string const & GetName () const
 

Static Public Member Functions

static bool HandleWpAddCommand (ChatHandler *handler, char const *args)
 
static bool HandleWpLoadCommand (ChatHandler *handler, char const *args)
 
static bool HandleWpReloadCommand (ChatHandler *handler, char const *args)
 
static bool HandleWpUnLoadCommand (ChatHandler *handler, char const *)
 
static bool HandleWpEventCommand (ChatHandler *handler, char const *args)
 
static bool HandleWpModifyCommand (ChatHandler *handler, char const *args)
 
static bool HandleWpShowCommand (ChatHandler *handler, char const *args)
 

Additional Inherited Members

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

Detailed Description

Definition at line 43 of file cs_wp.cpp.

Constructor & Destructor Documentation

◆ wp_commandscript()

wp_commandscript::wp_commandscript ( )
inline

Definition at line 46 of file cs_wp.cpp.

Member Function Documentation

◆ GetCommands()

◆ HandleWpAddCommand()

static bool wp_commandscript::HandleWpAddCommand ( ChatHandler *  handler,
char const *  args 
)
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
argsif the user did not provide a GUID, it is NULL
Returns
true - command did succeed, false - something went wrong

Definition at line 87 of file cs_wp.cpp.

References Position::GetOrientation(), WorldSession::GetPlayer(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ChatHandler::getSelectedCreature(), ChatHandler::GetSession(), Creature::GetWaypointPath(), ChatHandler::PSendSysMessage(), PreparedStatementBase::setFloat(), PreparedStatementBase::setUInt32(), WORLD_INS_WAYPOINT_DATA, WORLD_SEL_WAYPOINT_DATA_MAX_ID, WORLD_SEL_WAYPOINT_DATA_MAX_POINT, and WorldDatabase.

Referenced by GetCommands().

◆ HandleWpEventCommand()

◆ HandleWpLoadCommand()

◆ HandleWpModifyCommand()

◆ HandleWpReloadCommand()

static bool wp_commandscript::HandleWpReloadCommand ( ChatHandler *  handler,
char const *  args 
)
inlinestatic

Definition at line 232 of file cs_wp.cpp.

References ChatHandler::PSendSysMessage(), and sWaypointMgr.

Referenced by GetCommands().

◆ HandleWpShowCommand()

static bool wp_commandscript::HandleWpShowCommand ( ChatHandler *  handler,
char const *  args 
)
inlinestatic

◆ HandleWpUnLoadCommand()


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