Package marauroa.common.net.message
Class MessageC2SCreateCharacter
java.lang.Object
marauroa.common.net.message.Message
marauroa.common.net.message.MessageC2SCreateCharacter
- All Implemented Interfaces:
Serializable
This message indicate the server to create a character.
In order to create a character you need to correctly login into the server with an account.
- See Also:
Message
-
Nested Class Summary
Nested classes/interfaces inherited from class marauroa.common.net.message.Message
Message.MessageType
-
Field Summary
Fields inherited from class marauroa.common.net.message.Message
channel, clientid, CLIENTID_INVALID, protocolVersion, timestampMessage, type
-
Constructor Summary
ConstructorDescriptionConstructor for allowing creation of an empty messageMessageC2SCreateCharacter(Channel source, String character, RPObject template)
Constructor with a TCP/IP source/destination of the message and character name and character configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the character nameReturns the object templatevoid
readFromMap(Map<String,Object> in)
reads a message from a mapvoid
Serialize the object from an ObjectInputtoString()
This method returns a String that represent the objectvoid
writeObject(OutputSerializer out)
Serialize the object into an ObjectOutputMethods inherited from class marauroa.common.net.message.Message
getAddress, getChannel, getClientID, getMessageTimestamp, getProtocolVersion, getType, internalToString, isPerception, isSkippable, requiresPerception, setChannel, setClientID, setProtocolVersion, writeToJson
-
Constructor Details
-
MessageC2SCreateCharacter
public MessageC2SCreateCharacter()Constructor for allowing creation of an empty message -
MessageC2SCreateCharacter
Constructor with a TCP/IP source/destination of the message and character name and character configuration.- Parameters:
source
- The TCP/IP address associated to this messagecharacter
- the desired character nametemplate
- a RPObject that contains attributes that will be used on the created character.
-
-
Method Details
-
getCharacter
Returns the character name- Returns:
- the character name
-
getTemplate
Returns the object template- Returns:
- the object template
-
toString
This method returns a String that represent the object -
writeObject
Description copied from class:Message
Serialize the object into an ObjectOutput- Specified by:
writeObject
in interfaceSerializable
- Overrides:
writeObject
in classMessage
- Parameters:
out
- the output serializer.- Throws:
IOException
- if the serializations fails
-
readObject
Description copied from class:Message
Serialize the object from an ObjectInput- Specified by:
readObject
in interfaceSerializable
- Overrides:
readObject
in classMessage
- Parameters:
in
- the input serializer- Throws:
IOException
- if the serializations fails
-
readFromMap
Description copied from class:Message
reads a message from a map- Overrides:
readFromMap
in classMessage
- Parameters:
in
- Map to read from- Throws:
IOException
- if the serializations fails
-