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

Public Member Functions

 deserter_commandscript ()
std::vector< ChatCommandGetCommands () const OVERRIDE
 Returns the command structure for the system.
Public Member Functions inherited from ScriptObject
const std::string & GetName () const
virtual bool IsDatabaseBound () const

Static Public Member Functions

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

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

Constructor & Destructor Documentation

◆ deserter_commandscript()

deserter_commandscript::deserter_commandscript ( )
inline

Definition at line 28 of file cs_deserter.cpp.

References CommandScript::CommandScript().

Member Function Documentation

◆ GetCommands()

◆ HandleDeserterAdd()

bool deserter_commandscript::HandleDeserterAdd ( ChatHandler * handler,
char const * args,
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.
argsThe 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 79 of file cs_deserter.cpp.

References Unit::AddAura(), BG_SPELL_DESERTER, ChatHandler::getSelectedPlayer(), IN_MILLISECONDS, LANG_BAD_VALUE, LANG_NO_CHAR_SELECTED, LFG_SPELL_DUNGEON_DESERTER, ChatHandler::SendSysMessage(), Aura::SetDuration(), and ChatHandler::SetSentErrorMessage().

Referenced by HandleDeserterBGAdd(), and HandleDeserterInstanceAdd().

◆ HandleDeserterBGAdd()

bool deserter_commandscript::HandleDeserterBGAdd ( ChatHandler * handler,
char const * args )
inlinestatic
See also
HandleDeserterAdd()

Definition at line 162 of file cs_deserter.cpp.

References HandleDeserterAdd().

Referenced by GetCommands().

◆ HandleDeserterBGRemove()

bool deserter_commandscript::HandleDeserterBGRemove ( ChatHandler * handler,
char const * args )
inlinestatic
See also
HandleDeserterRemove()

Definition at line 174 of file cs_deserter.cpp.

References HandleDeserterRemove().

Referenced by GetCommands().

◆ HandleDeserterInstanceAdd()

bool deserter_commandscript::HandleDeserterInstanceAdd ( ChatHandler * handler,
char const * args )
inlinestatic
See also
HandleDeserterAdd()

Definition at line 156 of file cs_deserter.cpp.

References HandleDeserterAdd().

Referenced by GetCommands().

◆ HandleDeserterInstanceRemove()

bool deserter_commandscript::HandleDeserterInstanceRemove ( ChatHandler * handler,
char const * args )
inlinestatic
See also
HandleDeserterRemove()

Definition at line 168 of file cs_deserter.cpp.

References HandleDeserterRemove().

Referenced by GetCommands().

◆ HandleDeserterRemove()

bool deserter_commandscript::HandleDeserterRemove ( ChatHandler * handler,
char const * ,
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.
argsShould be nothing.
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 140 of file cs_deserter.cpp.

References BG_SPELL_DESERTER, ChatHandler::getSelectedPlayer(), LANG_NO_CHAR_SELECTED, LFG_SPELL_DUNGEON_DESERTER, Unit::RemoveAura(), ChatHandler::SendSysMessage(), and ChatHandler::SetSentErrorMessage().

Referenced by HandleDeserterBGRemove(), and HandleDeserterInstanceRemove().


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