Planeshift
AdminCmdDataTeleport Class Reference

Class for teleport command. More...

#include <adminmanager.h>

Public Member Functions

 AdminCmdDataTeleport ()
 Creates obj for teleport command data. More...
 
 AdminCmdDataTeleport (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words)
 Parses the given message and stores its data for teleporting. More...
 
virtual AdminCmdDataCreateCmdData (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words)
 Creates an object containing the parsed data for teleporting. More...
 
virtual csString GetHelpMessage ()
 Returns a helpmessage that fits to the parser of the class. More...
 
virtual ~AdminCmdDataTeleport ()
 
- Public Member Functions inherited from AdminCmdDataTarget
 AdminCmdDataTarget (csString commandName, int targetTypes)
 Creates obj for the given command and allowed target types. More...
 
 AdminCmdDataTarget (csString commandName, int targetTypes, AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, WordArray &words)
 Creates obj for the given command and allowed target types. More...
 
virtual bool IsQuietInvalid ()
 Used to invalidate commands with area as they will be handled elsewhere. More...
 
virtual bool LogGMCommand (Client *gmClient, const char *cmd)
 Logs the game master command. More...
 
virtual ~AdminCmdDataTarget ()
 
- Public Member Functions inherited from AdminCmdData
 AdminCmdData (csString commandName)
 creates data object for the specified command. More...
 
 AdminCmdData (csString commandName, WordArray &words)
 Parses the given message and stores its data. More...
 
void ParseError (MsgEntry *me, const char *errmsg)
 Sends the error message to the gm and invalidates the object. More...
 
virtual ~AdminCmdData ()
 
- Public Member Functions inherited from AdminCmdTargetParser
 AdminCmdTargetParser (int targetTypes)
 default constructor. More...
 
virtual AccountID GetAccountID (size_t gmClientNum)
 Returns the AccountID when the target is a player. More...
 
virtual csString GetHelpMessagePartForTarget ()
 Returns a helpmessage string for the allowed types of the target. More...
 
bool IsAllowedTargetType (ADMINCMD_TARGET_TYPES targetType)
 Test whether the given target type is allowed or not. More...
 
bool IsOnline ()
 Returns true when the 'target' is online. More...
 
bool IsTargetType (ADMINCMD_TARGET_TYPES targetType)
 Test whether the given target type is of the supplied type or not. More...
 
bool IsTargetTypeUnknown ()
 Test for unparsable targettype. More...
 
virtual bool ParseTarget (AdminManager *msgManager, MsgEntry *me, psAdminCmdMessage &msg, Client *client, csString target)
 Tries to parse the supplied string as a destination. More...
 
virtual ~AdminCmdTargetParser ()
 the default destructor. More...
 

Public Attributes

csString dest
 destination command (when not a generic target) More...
 
InstanceID destInstance
 id for the destination instance (when given) More...
 
bool destInstanceValid
 true when the instance is valid More...
 
AdminCmdSubCommandParser destList
 list of destination commands More...
 
csString destMap
 mapname More...
 
AdminCmdTargetParser destObj
 when specified at the cmd line, that an ingame object is the destination More...
 
csString destSector
 sectorname More...
 
float x
 point to teleport to x coordinate More...
 
float y
 point to teleport to y coordinate More...
 
float z
 point to teleport to z coordinate More...
 
- Public Attributes inherited from AdminCmdData
csString command
 command name this obj contains data for More...
 
bool help
 flag for displaying help (true for displaying help) More...
 
bool valid
 flag for setting content valid/invalid More...
 
- Public Attributes inherited from AdminCmdTargetParser
bool area
 is set to true if a character was found by name and multiple name instances were found. More...
 
bool duplicateActor
 
csString target
 player that is target for the command More...
 
gemActortargetActor
 set to the targets actor when possible More...
 
ClienttargetClient
 set to the targets client when possible More...
 
PID targetID
 stores PID when target is a player/npc/???? specified by PID More...
 
gemObjecttargetObject
 set to the object of the target when possible More...
 

Additional Inherited Members

- Protected Member Functions inherited from AdminCmdData
bool IsHelp (const csString &word)
 Test for help word and store help state when found. More...
 
bool LogGMCommand (Client *gmClient, PID playerID, const char *cmd)
 logs the game master command and target to the database. More...
 
- Protected Member Functions inherited from AdminCmdTargetParser
bool GetPlayerAccountIDByName (size_t gmClientNum, const csString &word, bool reporterror)
 Tries to resolve a player name to pid and accountid. More...
 
bool GetPlayerAccountIDByPID (size_t gmClientNum, const csString &word)
 Tries to resolve player by pid:PID to accountid. More...
 
bool GetPlayerAccountIDByPIDFromName (size_t gmClientNum, const csString &word, bool reporterror)
 Tries to resolve a player name to pid and accountid. More...
 
bool GetPlayerClient (AdminManager *msgManager, size_t gmClientNum, const csString &playerName, bool allowduplicate)
 Tries to find a client by name and checks for duplicates. More...
 
virtual void Reset ()
 resets the internal variables to their default values. More...
 
- Protected Attributes inherited from AdminCmdTargetParser
int allowedTargetTypes
 allowed destination types More...
 
AccountID targetAccountID
 internal cache value for accountID More...
 
int targetTypes
 type of the parsed target More...
 

Detailed Description

Class for teleport command.

Definition at line 1421 of file adminmanager.h.

Constructor & Destructor Documentation

AdminCmdDataTeleport::AdminCmdDataTeleport ( )
inline

Creates obj for teleport command data.

Definition at line 1440 of file adminmanager.h.

AdminCmdDataTeleport::AdminCmdDataTeleport ( AdminManager msgManager,
MsgEntry me,
psAdminCmdMessage msg,
Client client,
WordArray words 
)

Parses the given message and stores its data for teleporting.

Parameters
msgManagermessage manager that handles this command
meThe incoming message from the GM
msgpsAdminCmdMessage containing the message
clientclient of the network communication
wordscommand message to parse
virtual AdminCmdDataTeleport::~AdminCmdDataTeleport ( )
inlinevirtual

Definition at line 1453 of file adminmanager.h.

Member Function Documentation

virtual AdminCmdData* AdminCmdDataTeleport::CreateCmdData ( AdminManager msgManager,
MsgEntry me,
psAdminCmdMessage msg,
Client client,
WordArray words 
)
virtual

Creates an object containing the parsed data for teleporting.

Parameters
msgManagermessage manager that handles this command
meThe incoming message from the GM
msgpsAdminCmdMessage containing the message
clientclient of the network communication
wordscommand message to parse
Returns
AdminCmdData*: pointer to object containing parsed data. When parsing failed the valid flag is set to false.

Reimplemented from AdminCmdDataTarget.

virtual csString AdminCmdDataTeleport::GetHelpMessage ( )
virtual

Returns a helpmessage that fits to the parser of the class.

Returns
csString: a help message to send back to the client

Reimplemented from AdminCmdDataTarget.

Member Data Documentation

csString AdminCmdDataTeleport::dest

destination command (when not a generic target)

Definition at line 1431 of file adminmanager.h.

InstanceID AdminCmdDataTeleport::destInstance

id for the destination instance (when given)

Definition at line 1429 of file adminmanager.h.

bool AdminCmdDataTeleport::destInstanceValid

true when the instance is valid

Definition at line 1430 of file adminmanager.h.

AdminCmdSubCommandParser AdminCmdDataTeleport::destList

list of destination commands

Definition at line 1424 of file adminmanager.h.

csString AdminCmdDataTeleport::destMap

mapname

Definition at line 1432 of file adminmanager.h.

AdminCmdTargetParser AdminCmdDataTeleport::destObj

when specified at the cmd line, that an ingame object is the destination

Definition at line 1428 of file adminmanager.h.

csString AdminCmdDataTeleport::destSector

sectorname

Definition at line 1433 of file adminmanager.h.

float AdminCmdDataTeleport::x

point to teleport to x coordinate

Definition at line 1434 of file adminmanager.h.

float AdminCmdDataTeleport::y

point to teleport to y coordinate

Definition at line 1435 of file adminmanager.h.

float AdminCmdDataTeleport::z

point to teleport to z coordinate

Definition at line 1436 of file adminmanager.h.


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