Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
wp_commandscript Class Reference
Inheritance diagram for wp_commandscript:
Collaboration diagram for wp_commandscript:

Public Member Functions

std::vector< ChatCommandGetCommands () const OVERRIDE
 wp_commandscript ()
Public Member Functions inherited from ScriptObject
const std::string & GetName () const
virtual bool IsDatabaseBound () const

Static Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 20 of file cs_wp.cpp.

Constructor & Destructor Documentation

◆ wp_commandscript()

wp_commandscript::wp_commandscript ( )
inline

Definition at line 23 of file cs_wp.cpp.

References CommandScript::CommandScript().

Member Function Documentation

◆ GetCommands()

◆ HandleWpAddCommand()

bool wp_commandscript::HandleWpAddCommand ( ChatHandler * handler,
const char * 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 64 of file cs_wp.cpp.

References WorldSession::GetPlayer(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ChatHandler::getSelectedCreature(), ChatHandler::GetSession(), Creature::GetWaypointPath(), ChatHandler::PSendSysMessage(), PreparedStatement::setFloat(), PreparedStatement::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()

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

Definition at line 208 of file cs_wp.cpp.

References ChatHandler::PSendSysMessage(), and sWaypointMgr.

Referenced by GetCommands().

◆ HandleWpShowCommand()

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

Definition at line 736 of file cs_wp.cpp.

References WorldObject::AddObjectToRemoveList(), Unit::CombatStop(), Creature::Create(), Creature::DeleteFromDB(), Map::GetCreature(), Creature::GetDBTableGUIDLow(), Unit::GetDisplayId(), Object::GetEntry(), Field::GetFloat(), Object::GetGUIDLow(), Map::GetId(), WorldObject::GetMap(), Position::GetOrientation(), WorldObject::GetPhases(), WorldSession::GetPlayer(), ChatHandler::getSelectedCreature(), ChatHandler::GetSession(), Map::GetSpawnMode(), Field::GetUInt32(), Creature::GetWaypointPath(), HIGHGUID_UNIT, LANG_SELECT_CREATURE, LANG_WAYPOINT_CREATSELECTED, LANG_WAYPOINT_NOTCREATED, LANG_WAYPOINT_NOTFOUND, LANG_WAYPOINT_NOTFOUNDDBPROBLEM, LANG_WAYPOINT_NOTFOUNDLAST, LANG_WAYPOINT_NOTREMOVED, LANG_WAYPOINT_TOOFAR1, LANG_WAYPOINT_TOOFAR2, LANG_WAYPOINT_TOOFAR3, LANG_WAYPOINT_VP_ALLREMOVED, LANG_WAYPOINT_VP_NOTCREATED, LANG_WAYPOINT_VP_NOTFOUND, LANG_WAYPOINT_VP_SELECT, Creature::LoadCreatureFromDB(), MAKE_NEW_GUID(), ChatHandler::PSendSysMessage(), Creature::SaveToDB(), ChatHandler::SendSysMessage(), Creature::SetDisplayId(), PreparedStatement::setInt32(), Unit::SetLevel(), Creature::SetObjectScale(), Unit::SetPhased(), ChatHandler::SetSentErrorMessage(), PreparedStatement::setUInt32(), sObjectMgr, STRONG_MAX_LEVEL, VISUAL_WAYPOINT, WORLD_DEL_CREATURE, WORLD_SEL_CREATURE_BY_ID, WORLD_SEL_WAYPOINT_DATA_ALL_BY_WPGUID, WORLD_SEL_WAYPOINT_DATA_POS_BY_ID, WORLD_SEL_WAYPOINT_DATA_POS_FIRST_BY_ID, WORLD_SEL_WAYPOINT_DATA_POS_LAST_BY_ID, WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID, WORLD_UPD_WAYPOINT_DATA_ALL_WPGUID, WORLD_UPD_WAYPOINT_DATA_WPGUID, and WorldDatabase.

Referenced by GetCommands().

◆ HandleWpUnLoadCommand()


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