Planeshift
Public Types | Public Member Functions | Public Attributes

psHiredNPCScriptMessage Class Reference

Handle scripting of hired NPCs. More...

#include <messages.h>

List of all members.

Public Types

enum  {
  CANCEL, CHECK_WORK_LOCATION, CHECK_WORK_LOCATION_RESULT, COMMIT,
  COMMIT_REPLY, REQUEST, REQUEST_REPLY, VERIFY,
  VERIFY_REPLY, WORK_LOCATION, WORK_LOCATION_RESULT, WORK_LOCATION_UPDATE
}

Public Member Functions

 PSF_DECLARE_MSG_FACTORY ()
 psHiredNPCScriptMessage (uint32_t client, uint8_t command, EID hiredEID, bool choice, const char *errorMsg)
 Constructor.
 psHiredNPCScriptMessage (uint32_t client, uint8_t command, EID hiredEID, const char *script)
 Constructor.
 psHiredNPCScriptMessage (MsgEntry *me)
 Constuctor.
 psHiredNPCScriptMessage (uint32_t client, uint8_t command, EID hiredEID, const char *workLocation, bool workLocationValid, const char *script)
 Constructor.
 psHiredNPCScriptMessage (uint32_t client, uint8_t command, EID hiredEID, const char *locationType, const char *locationName)
 Constructor.
 psHiredNPCScriptMessage (uint32_t client, uint8_t command, EID hiredEID)
 Constructor.
virtual csString ToString (NetBase::AccessPointers *accessPointers)
 Converts the message into human readable string.

Public Attributes

bool choice
uint8_t command
csString errorMessage
EID hiredEID
csString locationName
csString locationType
csString script
csString workLocation
bool workLocationValid

Detailed Description

Handle scripting of hired NPCs.

Definition at line 6149 of file messages.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
CANCEL 
CHECK_WORK_LOCATION 
CHECK_WORK_LOCATION_RESULT 
COMMIT 
COMMIT_REPLY 
REQUEST 
REQUEST_REPLY 
VERIFY 
VERIFY_REPLY 
WORK_LOCATION 
WORK_LOCATION_RESULT 
WORK_LOCATION_UPDATE 

Definition at line 6154 of file messages.h.


Constructor & Destructor Documentation

psHiredNPCScriptMessage::psHiredNPCScriptMessage ( uint32_t  client,
uint8_t  command,
EID  hiredEID 
)

Constructor.

For commands CANCEL, WORK_LOCATION, REQUEST and COMMIT.

psHiredNPCScriptMessage::psHiredNPCScriptMessage ( uint32_t  client,
uint8_t  command,
EID  hiredEID,
bool  choice,
const char *  errorMsg 
)

Constructor.

For commands VERIFY_REPLY, WORK_LOCATION_RESULT, COMMIT_REPLY.

psHiredNPCScriptMessage::psHiredNPCScriptMessage ( uint32_t  client,
uint8_t  command,
EID  hiredEID,
const char *  script 
)

Constructor.

For commands VERIFY, WORK_LOCATION_UPDATE.

Parameters:
scriptThe script or work location for WORK_LOCATION_UPDATE.
psHiredNPCScriptMessage::psHiredNPCScriptMessage ( uint32_t  client,
uint8_t  command,
EID  hiredEID,
const char *  locationType,
const char *  locationName 
)

Constructor.

For commands CHECK_WORK_LOCATION (From Server to NPC Client).

psHiredNPCScriptMessage::psHiredNPCScriptMessage ( uint32_t  client,
uint8_t  command,
EID  hiredEID,
const char *  workLocation,
bool  workLocationValid,
const char *  script 
)

Constructor.

For commands REQUEST_REPLY.

psHiredNPCScriptMessage::psHiredNPCScriptMessage ( MsgEntry me)

Constuctor.

Construct for message entry.


Member Function Documentation

psHiredNPCScriptMessage::PSF_DECLARE_MSG_FACTORY ( )
virtual csString psHiredNPCScriptMessage::ToString ( NetBase::AccessPointers accessPointers) [virtual]

Converts the message into human readable string.

Parameters:
accessPointersA struct to a number of access pointers.
Returns:
Return a human readable string for the message.

Implements psMessageCracker.


Member Data Documentation

Definition at line 6172 of file messages.h.

Definition at line 6170 of file messages.h.

Definition at line 6178 of file messages.h.

Definition at line 6171 of file messages.h.

Definition at line 6177 of file messages.h.

Definition at line 6176 of file messages.h.

Definition at line 6175 of file messages.h.

Definition at line 6173 of file messages.h.

Definition at line 6174 of file messages.h.


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