Planeshift
|
Manages different commands that are player based in nature. More...
#include <cmdusers.h>
Classes | |
struct | EMOTE |
Struct to hold our emote data. More... | |
Public Member Functions | |
virtual const char * | HandleCommand (const char *cmd) |
Interprets a received message and executes the command. | |
virtual void | HandleMessage (MsgEntry *msg) |
bool | LoadEmotes () |
psUserCommands (ClientMsgHandler *mh, CmdHandler *ch, iObjectRegistry *obj) | |
virtual | ~psUserCommands () |
Static Public Member Functions | |
static void | HandleSlay (bool answeredYes, void *data) |
Protected Types | |
enum | EntityTypes { PSENTITYTYPE_PLAYER_CHARACTER, PSENTITYTYPE_NON_PLAYER_CHARACTER, PSENTITYTYPE_ALIVE_CHARACTER, PSENTITYTYPE_DEAD_CHARACTER, PSENTITYTYPE_ITEM, PSENTITYTYPE_NAME, PSENTITYTYPE_NO_TARGET } |
enum | SearchDirection { SEARCH_FORWARD, SEARCH_BACK, SEARCH_NONE } |
Protected Member Functions | |
void | AskToSlayBeforeSending (psMessageCracker *msg) |
GEMClientObject * | FindEntityWithName (const char *name) |
csString | FormatTarget (const csString &target="target") |
Returns a target string formatted to be sent in a message. | |
void | UpdateTarget (SearchDirection searchDirection, EntityTypes entityType, const char *name) |
Protected Attributes | |
csArray< EMOTE > | emoteList |
Manages different commands that are player based in nature.
Definition at line 45 of file cmdusers.h.
enum psUserCommands::EntityTypes [protected] |
PSENTITYTYPE_PLAYER_CHARACTER | |
PSENTITYTYPE_NON_PLAYER_CHARACTER | |
PSENTITYTYPE_ALIVE_CHARACTER | |
PSENTITYTYPE_DEAD_CHARACTER | |
PSENTITYTYPE_ITEM | |
PSENTITYTYPE_NAME | |
PSENTITYTYPE_NO_TARGET |
Definition at line 73 of file cmdusers.h.
enum psUserCommands::SearchDirection [protected] |
Definition at line 66 of file cmdusers.h.
psUserCommands::psUserCommands | ( | ClientMsgHandler * | mh, |
CmdHandler * | ch, | ||
iObjectRegistry * | obj | ||
) |
virtual psUserCommands::~psUserCommands | ( | ) | [virtual] |
void psUserCommands::AskToSlayBeforeSending | ( | psMessageCracker * | msg | ) | [protected] |
GEMClientObject* psUserCommands::FindEntityWithName | ( | const char * | name | ) | [protected] |
csString psUserCommands::FormatTarget | ( | const csString & | target = "target" | ) | [protected] |
Returns a target string formatted to be sent in a message.
This function would be called on a target input by the player, and will return a string indicating the same target, formatted to be sent in a net message to the server. If this can't be done, it will send back an empty string (error)
target | The target to be formatted |
virtual const char* psUserCommands::HandleCommand | ( | const char * | cmd | ) | [virtual] |
Interprets a received message and executes the command.
char * returned can be an error message to display.
Implements psCmdBase.
static void psUserCommands::HandleSlay | ( | bool | answeredYes, |
void * | data | ||
) | [static] |
bool psUserCommands::LoadEmotes | ( | ) |
void psUserCommands::UpdateTarget | ( | SearchDirection | searchDirection, |
EntityTypes | entityType, | ||
const char * | name | ||
) | [protected] |
csArray<EMOTE> psUserCommands::emoteList [protected] |
Definition at line 114 of file cmdusers.h.