mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Added Messages to MessageType, continued working on request.
tags: #story[1142]
This commit is contained in:
@@ -3,12 +3,22 @@ package seng302.gameServer.server.messages;
|
|||||||
|
|
||||||
public class CustomizeRequestMessage extends Message {
|
public class CustomizeRequestMessage extends Message {
|
||||||
|
|
||||||
CustomizeRequestType customizeType;
|
|
||||||
private static int MESSAGE_LENGTH = 2;
|
private static int MESSAGE_LENGTH = 2;
|
||||||
|
|
||||||
|
//Message fields
|
||||||
private Double sourceID;
|
private Double sourceID;
|
||||||
|
private CustomizeRequestType customizeType;
|
||||||
|
|
||||||
public CustomizeRequestMessage(CustomizeRequestType customizeType, Double sourceID,)
|
public CustomizeRequestMessage(CustomizeRequestType customizeType, Double sourceID) {
|
||||||
|
setHeader(
|
||||||
|
new Header(MessageType.CUSTOMIZATION_REQUEST, sourceID.intValue(), (short) getSize()));
|
||||||
|
|
||||||
|
allocateBuffer();
|
||||||
|
writeHeaderToBuffer();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ public enum MessageType {
|
|||||||
AVERAGE_WIND(47),
|
AVERAGE_WIND(47),
|
||||||
BOAT_ACTION(100),
|
BOAT_ACTION(100),
|
||||||
REGISTRATION_REQUEST(101),
|
REGISTRATION_REQUEST(101),
|
||||||
REGISTRATION_RESPONSE(102);
|
REGISTRATION_RESPONSE(102),
|
||||||
|
CUSTOMIZATION_REQUEST(103),
|
||||||
|
CUSTOMIZATION_RESPONSE(104);
|
||||||
|
|
||||||
|
|
||||||
private int code;
|
private int code;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user