TrinityCore
deserter_commandscript Class Reference
+ Inheritance diagram for deserter_commandscript:

Public Member Functions

 deserter_commandscript ()
 
ChatCommandTable GetCommands () const override
 Returns the command structure for the system. More...
 
- Public Member Functions inherited from CommandScript
 ~CommandScript ()
 
virtual std::vector< Trinity::ChatCommands::ChatCommandBuilderGetCommands () const =0
 
- Public Member Functions inherited from ScriptObject
 ScriptObject (ScriptObject const &right)=delete
 
 ScriptObject (ScriptObject &&right)=delete
 
ScriptObjectoperator= (ScriptObject const &right)=delete
 
ScriptObjectoperator= (ScriptObject &&right)=delete
 
std::string const & GetName () const
 

Static Public Member Functions

static bool HandleDeserterAdd (ChatHandler *handler, uint32 time, bool isInstance)
 Applies the Deserter Debuff to a player. More...
 
static bool HandleDeserterRemove (ChatHandler *handler, bool isInstance)
 Removes the Deserter Debuff from a player. More...
 
static bool HandleDeserterInstanceAdd (ChatHandler *handler, uint32 time)
 
static bool HandleDeserterBGAdd (ChatHandler *handler, uint32 time)
 
static bool HandleDeserterInstanceRemove (ChatHandler *handler)
 
static bool HandleDeserterBGRemove (ChatHandler *handler)
 

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 41 of file cs_deserter.cpp.

Constructor & Destructor Documentation

◆ deserter_commandscript()

deserter_commandscript::deserter_commandscript ( )
inline

Definition at line 44 of file cs_deserter.cpp.

Member Function Documentation

◆ GetCommands()

ChatCommandTable deserter_commandscript::GetCommands ( ) const
inlineoverridevirtual

Returns the command structure for the system.

Implements CommandScript.

Definition at line 50 of file cs_deserter.cpp.

+ Here is the call graph for this function:

◆ HandleDeserterAdd()

static bool deserter_commandscript::HandleDeserterAdd ( ChatHandler handler,
uint32  time,
bool  isInstance 
)
inlinestatic

Applies the Deserter Debuff to a player.

This function applies a Deserter Debuff of the given type (Instance or BG) to the selected player, with the provided duration in seconds.

Parameters
handlerThe ChatHandler, passed by the system.
timeThe provided duration in seconds.
isInstanceprovided by the relaying functions, so we don't have to write that much code :)
Returns
true if everything was correct, false if an error occured.

Example Usage:

.deserter instance add 3600 (one hour)
-or-
.deserter bg add 3600 (one hour)

Definition at line 95 of file cs_deserter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleDeserterBGAdd()

static bool deserter_commandscript::HandleDeserterBGAdd ( ChatHandler handler,
uint32  time 
)
inlinestatic
See also
HandleDeserterAdd()

Definition at line 166 of file cs_deserter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleDeserterBGRemove()

static bool deserter_commandscript::HandleDeserterBGRemove ( ChatHandler handler)
inlinestatic
See also
HandleDeserterRemove()

Definition at line 178 of file cs_deserter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleDeserterInstanceAdd()

static bool deserter_commandscript::HandleDeserterInstanceAdd ( ChatHandler handler,
uint32  time 
)
inlinestatic
See also
HandleDeserterAdd()

Definition at line 160 of file cs_deserter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleDeserterInstanceRemove()

static bool deserter_commandscript::HandleDeserterInstanceRemove ( ChatHandler handler)
inlinestatic
See also
HandleDeserterRemove()

Definition at line 172 of file cs_deserter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleDeserterRemove()

static bool deserter_commandscript::HandleDeserterRemove ( ChatHandler handler,
bool  isInstance 
)
inlinestatic

Removes the Deserter Debuff from a player.

This function removes a Deserter Debuff of the given type (Instance or BG) from the selected player.

Parameters
handlerThe ChatHandler, passed by the system.
isInstanceprovided by the relaying functions, so we don't have to write that much code :)
Returns
true if everything was correct, false if an error occured.

Example Usage:

.deserter instance remove
-or-
.deserter bg remove

Definition at line 144 of file cs_deserter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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