![]() |
TrinityCore
|
Inheritance diagram for deserter_commandscript:Public Member Functions | |
| deserter_commandscript () | |
| std::span< ChatCommandBuilder const > | GetCommands () const override |
| Returns the command structure for the system. | |
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 | HandleDeserterAdd (ChatHandler *handler, uint32 time, bool isInstance) |
| Applies the Deserter Debuff to a player. | |
| static bool | HandleDeserterRemove (ChatHandler *handler, bool isInstance) |
| Removes the Deserter Debuff from a player. | |
| 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) noexcept | |
Protected Member Functions inherited from ScriptObject | |
| ScriptObject (char const *name) noexcept | |
| virtual | ~ScriptObject () |
Definition at line 41 of file cs_deserter.cpp.
|
inline |
Definition at line 44 of file cs_deserter.cpp.
|
inlineoverridevirtual |
Returns the command structure for the system.
Implements CommandScript.
Definition at line 50 of file cs_deserter.cpp.
References HandleDeserterBGAdd(), HandleDeserterBGRemove(), HandleDeserterInstanceAdd(), HandleDeserterInstanceRemove(), rbac::RBAC_PERM_COMMAND_DESERTER_BG_ADD, rbac::RBAC_PERM_COMMAND_DESERTER_BG_REMOVE, rbac::RBAC_PERM_COMMAND_DESERTER_INSTANCE_ADD, and rbac::RBAC_PERM_COMMAND_DESERTER_INSTANCE_REMOVE.
|
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.
| handler | The ChatHandler, passed by the system. |
| time | The provided duration in seconds. |
| isInstance | provided by the relaying functions, so we don't have to write that much code :) |
Example Usage:
Definition at line 95 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().
|
inlinestatic |
Definition at line 166 of file cs_deserter.cpp.
References HandleDeserterAdd().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 178 of file cs_deserter.cpp.
References HandleDeserterRemove().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 160 of file cs_deserter.cpp.
References HandleDeserterAdd().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 172 of file cs_deserter.cpp.
References HandleDeserterRemove().
Referenced by GetCommands().
|
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.
| handler | The ChatHandler, passed by the system. |
| isInstance | provided by the relaying functions, so we don't have to write that much code :) |
Example Usage:
Definition at line 144 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().