Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
@@ -42,8 +42,7 @@ public class AcceptInviteToGuildMsg extends ClientNetMsg {
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public AcceptInviteToGuildMsg(AbstractConnection origin, ByteBufferReader reader)
{
public AcceptInviteToGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.JOINGUILD, origin, reader);
}
@@ -63,7 +62,7 @@ public class AcceptInviteToGuildMsg extends ClientNetMsg {
* ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
protected void _deserialize(ByteBufferReader reader) {
reader.getInt(); // Object Type padding
this.guildUUID = reader.getInt();
this.unknown01 = reader.getInt();
@@ -85,8 +84,7 @@ public class AcceptInviteToGuildMsg extends ClientNetMsg {
}
/**
* @param unknown01
* the unknown01 to set
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
@@ -100,8 +98,7 @@ public class AcceptInviteToGuildMsg extends ClientNetMsg {
}
/**
* @param unknown02
* the unknown02 to set
* @param unknown02 the unknown02 to set
*/
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
@@ -7,9 +7,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -19,9 +16,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -31,9 +25,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -54,101 +45,98 @@ import engine.net.client.msg.ClientNetMsg;
public class AcceptSubInviteMsg extends ClientNetMsg {
private int guildUUID;
private int unknown01;
private int unknown02;
private String response;
private int guildUUID;
private int unknown01;
private int unknown02;
private String response;
/**
* This is the general purpose constructor.
*/
public AcceptSubInviteMsg() {
super(Protocol.JOINFORPROVINCE);
}
/**
* This is the general purpose constructor.
*/
public AcceptSubInviteMsg() {
super(Protocol.JOINFORPROVINCE);
}
public AcceptSubInviteMsg(int guildUUID, int unknown01, int unknown02, String response) {
super(Protocol.JOINFORPROVINCE);
this.guildUUID = guildUUID;
this.unknown01 = unknown01;
this.unknown02 = unknown02;
this.response = response;
}
public AcceptSubInviteMsg(int guildUUID, int unknown01, int unknown02, String response) {
super(Protocol.JOINFORPROVINCE);
this.guildUUID = guildUUID;
this.unknown01 = unknown01;
this.unknown02 = unknown02;
this.response = response;
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public AcceptSubInviteMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.JOINFORPROVINCE, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public AcceptSubInviteMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.JOINFORPROVINCE, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(this.guildUUID);
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.putString(this.response);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(this.guildUUID);
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.putString(this.response);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt(); // Object Type Padding
this.guildUUID = reader.getInt();
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
reader.getString();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt(); // Object Type Padding
this.guildUUID = reader.getInt();
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
reader.getString();
}
/**
* @return the guildUUID
*/
public int guildUUID() {
return guildUUID;
}
/**
* @return the guildUUID
*/
public int guildUUID() {
return guildUUID;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the unknown02
*/
public int getUnknown02() {
return unknown02;
}
/**
* @return the unknown02
*/
public int getUnknown02() {
return unknown02;
}
/**
* @param unknown02
* the unknown02 to set
*/
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
/**
* @param unknown02 the unknown02 to set
*/
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
public String getResponse() {
return this.response;
}
public String getResponse() {
return this.response;
}
public void setResponse(String value) {
this.response = value;
}
public void setResponse(String value) {
this.response = value;
}
}
@@ -18,55 +18,54 @@ import engine.net.client.msg.ClientNetMsg;
public class BanishUnbanishMsg extends ClientNetMsg {
private int target;
private int msgType;
private int target;
private int msgType;
/**
* This is the general purpose constructor.
*/
public BanishUnbanishMsg() {
super(Protocol.BANISHMEMBER);
}
/**
* This is the general purpose constructor.
*/
public BanishUnbanishMsg() {
super(Protocol.BANISHMEMBER);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public BanishUnbanishMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.BANISHMEMBER, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public BanishUnbanishMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.BANISHMEMBER, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt();
target = reader.getInt();
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt();
target = reader.getInt();
//Unknows?
reader.getInt();
//Unknows?
reader.getInt();
this.msgType = reader.getInt();
reader.getInt();
}
}
public int getTarget() {
return target;
}
public int getTarget() {
return target;
}
public int getMsgType() {
return msgType;
}
public int getMsgType() {
return msgType;
}
public void setMsgType(int msgType) {
this.msgType = msgType;
}
public void setMsgType(int msgType) {
this.msgType = msgType;
}
}
@@ -7,7 +7,6 @@
// www.magicbane.com
package engine.net.client.msg.guild;
@@ -19,43 +18,42 @@ import engine.net.client.msg.ClientNetMsg;
public class BreakFealtyMsg extends ClientNetMsg {
private int guildUUID;
private int guildUUID;
/**
* This is the general purpose constructor.
*/
public BreakFealtyMsg() {
super(Protocol.BREAKFEALTY);
}
/**
* This is the general purpose constructor.
*/
public BreakFealtyMsg() {
super(Protocol.BREAKFEALTY);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public BreakFealtyMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.BREAKFEALTY, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public BreakFealtyMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.BREAKFEALTY, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt(); // Object Type Padding
this.guildUUID = reader.getInt();
reader.getInt();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt(); // Object Type Padding
this.guildUUID = reader.getInt();
reader.getInt();
}
public int getGuildUUID() {
return guildUUID;
}
public int getGuildUUID() {
return guildUUID;
}
}
@@ -7,9 +7,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -19,9 +16,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -31,9 +25,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -43,8 +34,6 @@
// www.magicbane.com
package engine.net.client.msg.guild;
import engine.Enum.GameObjectType;
@@ -74,8 +63,7 @@ public class ChangeRankMsg extends ClientNetMsg {
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public ChangeRankMsg(AbstractConnection origin, ByteBufferReader reader)
{
public ChangeRankMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.GUILDRANKCHANGE, origin, reader);
}
@@ -147,7 +135,7 @@ public class ChangeRankMsg extends ClientNetMsg {
* ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
protected void _deserialize(ByteBufferReader reader) {
reader.getInt(); // Object Type Padding
this.playerUUID = reader.getInt();
this.newRank = reader.getInt();
@@ -18,41 +18,40 @@ import engine.net.client.msg.ClientNetMsg;
public class DisbandGuildMsg extends ClientNetMsg {
private int response;
private String message;
private int response;
private String message;
/**
* This is the general purpose constructor.
*/
public DisbandGuildMsg() {
super(Protocol.DISBANDGUILD);
}
/**
* This is the general purpose constructor.
*/
public DisbandGuildMsg() {
super(Protocol.DISBANDGUILD);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public DisbandGuildMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.DISBANDGUILD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public DisbandGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.DISBANDGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.response);
writer.putString(this.message);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.response);
writer.putString(this.message);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.response = reader.getInt();
this.message = reader.getString();
//this.sourceID = reader.getInt();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.response = reader.getInt();
this.message = reader.getString();
//this.sourceID = reader.getInt();
}
}
@@ -18,61 +18,59 @@ import engine.net.client.msg.ClientNetMsg;
public class DismissGuildMsg extends ClientNetMsg {
private int unknown01;
private int guildType;
private int guildID;
private int unknown01;
private int guildType;
private int guildID;
/**
* This is the general purpose constructor.
*/
public DismissGuildMsg() {
super(Protocol.DISMISSGUILD);
}
/**
* This is the general purpose constructor.
*/
public DismissGuildMsg() {
super(Protocol.DISMISSGUILD);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public DismissGuildMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.DISMISSGUILD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public DismissGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.DISMISSGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.guildType = reader.getInt();
this.guildID = reader.getInt();
reader.getInt();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.guildType = reader.getInt();
this.guildID = reader.getInt();
reader.getInt();
public int getUnknown01() {
return this.unknown01;
}
}
public int getUnknown01() {
return this.unknown01;
}
public void setUnknown01(int value) {
this.unknown01 = value;
}
public int getGuildID() {
return guildID;
}
public void setUnknown01(int value) {
this.unknown01 = value;
}
public void setGuildID(int guildID) {
this.guildID = guildID;
}
public int getGuildID() {
return guildID;
}
public void setGuildID(int guildID) {
this.guildID = guildID;
}
}
@@ -18,224 +18,215 @@ import engine.net.client.msg.ClientNetMsg;
public class GuildControlMsg extends ClientNetMsg {
private int unknown01;
private int unknown02;
private int unknown03;
private int unknown04;
private String message;
private byte unknown05;
private int unknown06;
private int unknown07;
private byte unknown08;
private int unknown01;
private int unknown02;
private int unknown03;
private int unknown04;
private String message;
private byte unknown05;
private int unknown06;
private int unknown07;
private byte unknown08;
private byte isGM;
private byte isGM;
/**
* This is the general purpose constructor.
*/
public GuildControlMsg() {
super(Protocol.REQUESTMEMBERLIST);
this.unknown01 = 2;
this.unknown02 = 0;
this.unknown03 = 0;
this.unknown04 = 0;
this.message = "No error message";
this.unknown05 = 0;
this.unknown06 = 0;
this.unknown07 = 257;
this.unknown08 = (byte) 1;
}
/**
* This is the general purpose constructor.
*/
public GuildControlMsg() {
super(Protocol.REQUESTMEMBERLIST);
this.unknown01 = 2;
this.unknown02 = 0;
this.unknown03 = 0;
this.unknown04 = 0;
this.message = "No error message";
this.unknown05 = 0;
this.unknown06 = 0;
this.unknown07 = 257;
this.unknown08 = (byte) 1;
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildControlMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.REQUESTMEMBERLIST, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildControlMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.REQUESTMEMBERLIST, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.putInt(this.unknown03);
writer.putInt(this.unknown04);
writer.putString(this.message);
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.putInt(this.unknown03);
writer.putInt(this.unknown04);
writer.putString(this.message);
writer.put((byte) 1); //Always 1
writer.put((byte) 1); //Always 1
writer.put(isGM); //Can be Tax Collector
writer.put(isGM); //Can be Recruiter
writer.put(isGM); //Can be IC
writer.put(isGM);
writer.put(isGM); //Can be Tax Collector
writer.put(isGM); //Can be Recruiter
writer.put(isGM); //Can be IC
writer.put(isGM);
writer.put(isGM); //Can be GM
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 1);
}
writer.put(isGM); //Can be GM
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 1);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.unknown03 = reader.getInt();
this.unknown04 = reader.getInt();
this.message = reader.getString();
this.unknown05 = reader.get();
if (this.unknown05 == (byte) 1) {
this.unknown06 = reader.getInt();
this.unknown07 = reader.getInt();
this.unknown08 = reader.get();
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.unknown03 = reader.getInt();
this.unknown04 = reader.getInt();
this.message = reader.getString();
this.unknown05 = reader.get();
if (this.unknown05 == (byte) 1) {
this.unknown06 = reader.getInt();
this.unknown07 = reader.getInt();
this.unknown08 = reader.get();
}
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the unknown02
*/
public int getUnknown02() {
return unknown02;
}
/**
* @return the unknown02
*/
public int getUnknown02() {
return unknown02;
}
/**
* @param unknown02
* the unknown02 to set
*/
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
/**
* @param unknown02 the unknown02 to set
*/
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
/**
* @return the unknown03
*/
public int getUnknown03() {
return unknown03;
}
/**
* @return the unknown03
*/
public int getUnknown03() {
return unknown03;
}
/**
* @param unknown03
* the unknown03 to set
*/
public void setUnknown03(int unknown03) {
this.unknown03 = unknown03;
}
/**
* @param unknown03 the unknown03 to set
*/
public void setUnknown03(int unknown03) {
this.unknown03 = unknown03;
}
/**
* @return the unknown04
*/
public int getUnknown04() {
return unknown04;
}
/**
* @return the unknown04
*/
public int getUnknown04() {
return unknown04;
}
/**
* @param unknown04
* the unknown04 to set
*/
public void setUnknown04(int unknown04) {
this.unknown04 = unknown04;
}
/**
* @param unknown04 the unknown04 to set
*/
public void setUnknown04(int unknown04) {
this.unknown04 = unknown04;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @return the unknown05
*/
public byte getUnknown05() {
return unknown05;
}
/**
* @return the unknown05
*/
public byte getUnknown05() {
return unknown05;
}
/**
* @param unknown05
* the unknown05 to set
*/
public void setUnknown05(byte unknown05) {
this.unknown05 = unknown05;
}
/**
* @param unknown05 the unknown05 to set
*/
public void setUnknown05(byte unknown05) {
this.unknown05 = unknown05;
}
/**
* @return the unknown06
*/
public int getUnknown06() {
return unknown06;
}
/**
* @return the unknown06
*/
public int getUnknown06() {
return unknown06;
}
/**
* @param unknown06
* the unknown06 to set
*/
public void setUnknown06(int unknown06) {
this.unknown06 = unknown06;
}
/**
* @param unknown06 the unknown06 to set
*/
public void setUnknown06(int unknown06) {
this.unknown06 = unknown06;
}
/**
* @return the unknown07
*/
public int getUnknown07() {
return unknown07;
}
/**
* @return the unknown07
*/
public int getUnknown07() {
return unknown07;
}
/**
* @param unknown07
* the unknown07 to set
*/
public void setUnknown07(int unknown07) {
this.unknown07 = unknown07;
}
/**
* @param unknown07 the unknown07 to set
*/
public void setUnknown07(int unknown07) {
this.unknown07 = unknown07;
}
/**
* @return the unknown08
*/
public byte getUnknown08() {
return unknown08;
}
/**
* @return the unknown08
*/
public byte getUnknown08() {
return unknown08;
}
public void setGM(byte b) {
this.isGM = b;
}
/**
* @param unknown08 the unknown08 to set
*/
public void setUnknown08(byte unknown08) {
this.unknown08 = unknown08;
}
/**
* @param unknown08
* the unknown08 to set
*/
public void setUnknown08(byte unknown08) {
this.unknown08 = unknown08;
}
public void setGM(byte b) {
this.isGM = b;
}
}
@@ -20,46 +20,46 @@ import org.pmw.tinylog.Logger;
public class GuildCreationCloseMsg extends ClientNetMsg {
/**
* This is the general purpose constructor.
*/
public GuildCreationCloseMsg() {
super(Protocol.CANCELGUILDCREATION);
}
/**
* This is the general purpose constructor.
*/
public GuildCreationCloseMsg() {
super(Protocol.CANCELGUILDCREATION);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildCreationCloseMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.CANCELGUILDCREATION, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildCreationCloseMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.CANCELGUILDCREATION, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
for(int j = 0; j < 4; j++) {
int i = reader.getInt();
Logger.info( j+ "->" + i);
}
}
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
for (int j = 0; j < 4; j++) {
int i = reader.getInt();
Logger.info(j + "->" + i);
}
}
}
@@ -59,7 +59,7 @@ public class GuildCreationFinalizeMsg extends ClientNetMsg {
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildCreationFinalizeMsg(AbstractConnection origin, ByteBufferReader reader) {
public GuildCreationFinalizeMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.CREATEPETITION, origin, reader);
}
@@ -68,8 +68,8 @@ public class GuildCreationFinalizeMsg extends ClientNetMsg {
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
GuildTag._serializeForDisplay(guildTag,writer);
GuildTag._serializeForDisplay(guildTag, writer);
writer.putString(this.guildName);
writer.putString(this.guildMotto);
@@ -95,7 +95,7 @@ public class GuildCreationFinalizeMsg extends ClientNetMsg {
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
protected void _deserialize(ByteBufferReader reader) {
guildTag = new GuildTag(reader, true);
this.guildName = reader.getString();
@@ -133,7 +133,7 @@ public class GuildCreationFinalizeMsg extends ClientNetMsg {
charterObject = Item.getFromCache(this.charterUUID);
if (charterObject == null)
Logger.error( "Invalid charter object UUID: " + this.charterUUID);
Logger.error("Invalid charter object UUID: " + this.charterUUID);
return charterObject;
}
@@ -143,18 +143,18 @@ public class GuildCreationFinalizeMsg extends ClientNetMsg {
}
public int getMemberVoteFlag() {
if (this.membershipVote != 0)
return 1;
return 0;
}
public int getICVoteFlag() {
if (this.icVote != 0)
return 1;
return 0;
}
}
@@ -19,133 +19,134 @@ import engine.objects.GuildTag;
public class GuildCreationOptionsMsg extends ClientNetMsg {
private int screenType;
private ScreenType messageScreen;
private boolean close = false;
private int screenType;
private ScreenType messageScreen;
private boolean close = false;
/**
* This is the general purpose constructor.
*/
public GuildCreationOptionsMsg() {
super(Protocol.CHECKUNIQUEGUILD);
}
public GuildCreationOptionsMsg(boolean close) {
super(Protocol.CHECKUNIQUEGUILD);
this.close = close;
}
/**
* This is the general purpose constructor.
*/
public GuildCreationOptionsMsg() {
super(Protocol.CHECKUNIQUEGUILD);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildCreationOptionsMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.CHECKUNIQUEGUILD, origin, reader);
}
public GuildCreationOptionsMsg(boolean close) {
super(Protocol.CHECKUNIQUEGUILD);
this.close = close;
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.screenType);
if (this.close){
writer.putInt(2);
writer.putInt(0);
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildCreationOptionsMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.CHECKUNIQUEGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.screenType);
if (this.close) {
writer.putInt(2);
writer.putInt(0);
// writer.putInt(0);
return;
}
if(this.messageScreen != null) {
this.messageScreen._serialize(writer);
} else {
writer.putInt(0);
writer.putInt(5);
}
}
return;
}
if (this.messageScreen != null) {
this.messageScreen._serialize(writer);
} else {
writer.putInt(0);
writer.putInt(5);
}
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.screenType = reader.getInt();
if(this.screenType == 1) {
this.messageScreen = new Screen1();
} else if(this.screenType == 2){
this.messageScreen = new Screen2();
} else {
System.out.println("Attempting to Deserilaize: Message Type" + screenType);
int counter = 0;
do {
int i = reader.getInt();
System.out.println(counter++ + "->" + i);
} while (true);
}
this.messageScreen._deserialize(reader);
}
/**
* Deserializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.screenType = reader.getInt();
if (this.screenType == 1) {
this.messageScreen = new Screen1();
} else if (this.screenType == 2) {
this.messageScreen = new Screen2();
} else {
System.out.println("Attempting to Deserilaize: Message Type" + screenType);
int counter = 0;
do {
int i = reader.getInt();
System.out.println(counter++ + "->" + i);
} while (true);
}
this.messageScreen._deserialize(reader);
}
/**
* @return the rulership
*/
public int getScreenType() {
return this.screenType;
}
/**
* @return the rulership
*/
public int getScreenType() {
return this.screenType;
}
/**
* @param rulership
* the rulership to set
*/
public void setScreenType(int type) {
this.screenType = type;
}
/**
* @param rulership the rulership to set
*/
public void setScreenType(int type) {
this.screenType = type;
}
}
abstract class ScreenType {
public abstract void _serialize(ByteBufferWriter writer);
public abstract void _deserialize(ByteBufferReader reader) ;
public abstract void _serialize(ByteBufferWriter writer);
public abstract void _deserialize(ByteBufferReader reader);
}
class Screen1 extends ScreenType{
private int unknown01;
private int unknown02;
private String name;
private String motto;
class Screen1 extends ScreenType {
private int unknown01;
private int unknown02;
private String name;
private String motto;
@Override
public void _serialize(ByteBufferWriter writer) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.putString(this.name);
}
@Override
public void _deserialize(ByteBufferReader reader)
{
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.name = reader.getString();
this.motto = reader.getString();
}
@Override
public void _serialize(ByteBufferWriter writer) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.putString(this.name);
}
@Override
public void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.name = reader.getString();
this.motto = reader.getString();
}
}
class Screen2 extends ScreenType{
private int unknown01;
private int unknown02;
private GuildTag gt;
class Screen2 extends ScreenType {
private int unknown01;
private int unknown02;
private GuildTag gt;
@Override
public void _serialize(ByteBufferWriter writer) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
GuildTag._serializeForGuildCreation(this.gt,writer);
}
@Override
public void _deserialize(ByteBufferReader reader)
{
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.gt = new GuildTag(reader, true);
}
@Override
public void _serialize(ByteBufferWriter writer) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
GuildTag._serializeForGuildCreation(this.gt, writer);
}
@Override
public void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.gt = new GuildTag(reader, true);
}
}
+332 -341
View File
@@ -7,9 +7,6 @@
// www.magicbane.com
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
@@ -34,420 +31,414 @@ import org.joda.time.DateTime;
public class GuildInfoMsg extends ClientNetMsg {
private int msgType;
private int objectUUID;
private int objectType;
private Guild guild;
private AbstractGameObject ago;
private int msgType;
private int objectUUID;
private int objectType;
private Guild guild;
private AbstractGameObject ago;
/**
* This is the general purpose constructor.
*/
public GuildInfoMsg() {
super(Protocol.UPDATEGUILD);
this.msgType = 4;
/**
* This is the general purpose constructor.
*/
public GuildInfoMsg() {
super(Protocol.UPDATEGUILD);
this.msgType = 4;
this.objectType = 0;
this.objectUUID = 0;
}
}
public GuildInfoMsg(AbstractGameObject ago, Guild guild, int unknown01) {
super(Protocol.UPDATEGUILD);
this.msgType = unknown01;
public GuildInfoMsg(AbstractGameObject ago, Guild guild, int unknown01) {
super(Protocol.UPDATEGUILD);
this.msgType = unknown01;
this.objectType = ago.getObjectType().ordinal();
this.objectUUID = ago.getObjectUUID();
this.ago = ago;
this.ago = ago;
this.guild = guild;
}
this.guild = guild;
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildInfoMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.UPDATEGUILD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildInfoMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.UPDATEGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.msgType);
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.msgType);
if(this.msgType == 2) {
new GuildInfoMessageType2(this.ago, guild)._serialize(writer);
} else if(this.msgType == 5) {
new GuildInfoMessageType5(this.ago, guild)._serialize(writer);
}else if(this.msgType == 4){
new GuildInfoMessageType4(this.ago, guild)._serialize(writer);
} else {
writer.putLong(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
}
}
if (this.msgType == 2) {
new GuildInfoMessageType2(this.ago, guild)._serialize(writer);
} else if (this.msgType == 5) {
new GuildInfoMessageType5(this.ago, guild)._serialize(writer);
} else if (this.msgType == 4) {
new GuildInfoMessageType4(this.ago, guild)._serialize(writer);
} else {
writer.putLong(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.msgType = reader.getInt();
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.msgType = reader.getInt();
this.objectType = reader.getInt();
this.objectUUID = reader.getInt();
if (this.msgType == 1)
reader.getInt();
reader.getInt(); // PAdding
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.get();
//default guild tag deserializations.
if (this.msgType == 5){
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
}
}
reader.getInt();
reader.getInt(); // PAdding
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.get();
/**
* @return the unknown01
*/
public int getMsgType() {
return msgType;
}
//default guild tag deserializations.
if (this.msgType == 5) {
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
public void setMsgType(int msgType) {
this.msgType = msgType;
}
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
reader.getInt();
/**
* @return the objectUUID
*/
public int getObjectID() {
return objectUUID;
}
reader.getInt();
}
public int getObjectType() {
return objectType;
}
public void setObjectType(int objectType) {
this.objectType = objectType;
}
}
/**
* @return the unknown01
*/
public int getMsgType() {
return msgType;
}
public void setMsgType(int msgType) {
this.msgType = msgType;
}
/**
* @return the objectUUID
*/
public int getObjectID() {
return objectUUID;
}
public int getObjectType() {
return objectType;
}
public void setObjectType(int objectType) {
this.objectType = objectType;
}
}
abstract class GuildInfoMessageType {
protected int objectType;
protected int objectID;
protected Guild g;
protected AbstractGameObject ago;
protected int objectType;
protected int objectID;
protected Guild g;
protected AbstractGameObject ago;
public GuildInfoMessageType(AbstractGameObject ago, Guild g) {
this.objectType = ago.getObjectType().ordinal();
this.objectID = ago.getObjectUUID();
this.ago = ago;
this.g = g;
}
public GuildInfoMessageType(AbstractGameObject ago, Guild g) {
this.objectType = ago.getObjectType().ordinal();
this.objectID = ago.getObjectUUID();
this.ago = ago;
this.g = g;
}
abstract void _serialize(ByteBufferWriter writer);
abstract void _serialize(ByteBufferWriter writer);
}
class GuildInfoMessageType2 extends GuildInfoMessageType {
public GuildInfoMessageType2(AbstractGameObject ago, Guild g) {
super(ago, g);
}
public GuildInfoMessageType2(AbstractGameObject ago, Guild g) {
super(ago, g);
}
@Override
void _serialize(ByteBufferWriter writer) {
writer.putInt(this.objectType);
writer.putInt(this.objectID);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(1);
@Override
void _serialize(ByteBufferWriter writer) {
writer.putInt(this.objectType);
writer.putInt(this.objectID);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(1);
Guild nation = null;
if (this.g != null) {
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(g.getObjectUUID());
writer.putString(g.getName());
Guild nation = null;
if (this.g != null) {
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(g.getObjectUUID());
writer.putString(g.getName());
if(this.objectType == GameObjectType.PlayerCharacter.ordinal()) {
PlayerCharacter pc = PlayerCharacter.getFromCache(this.objectID);
if (this.objectType == GameObjectType.PlayerCharacter.ordinal()) {
PlayerCharacter pc = PlayerCharacter.getFromCache(this.objectID);
if(pc != null) {
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus()));
}
} else {
writer.putInt(5);
}
GuildTag._serializeForDisplay(g.getGuildTag(),writer);
nation = this.g.getNation();
} else {
writer.putLong(0L);
writer.putString("");
GuildTag._serializeForDisplay(GuildTag.ERRANT,writer);
}
if (pc != null) {
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus()));
}
} else {
writer.putInt(5);
}
GuildTag._serializeForDisplay(g.getGuildTag(), writer);
nation = this.g.getNation();
} else {
writer.putLong(0L);
writer.putString("");
GuildTag._serializeForDisplay(GuildTag.ERRANT, writer);
}
writer.putInt(1);
if (nation != null) {
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(nation.getObjectUUID());
writer.putInt(1);
if (nation != null) {
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(nation.getObjectUUID());
City city = g.getOwnedCity();
if (city != null) {
writer.putString(city.getCityName());
writer.putInt(city.getObjectType().ordinal());
writer.putInt(city.getObjectUUID());
} else {
writer.putString(""); //city name
writer.putLong(0L); //should be city ID
}
City city = g.getOwnedCity();
if (city != null) {
writer.putString(city.getCityName());
writer.putInt(city.getObjectType().ordinal());
writer.putInt(city.getObjectUUID());
} else {
writer.putString(""); //city name
writer.putLong(0L); //should be city ID
}
GuildTag._serializeForDisplay(nation.getGuildTag(),writer);
GuildTag._serializeForDisplay(nation.getGuildTag(), writer);
} else {
writer.putLong(0L);
writer.putString("");
writer.putLong(0L);
GuildTag._serializeForDisplay(GuildTag.ERRANT,writer);
}
writer.putInt(0);
writer.putInt(0);
writer.put((byte)0);
}
} else {
writer.putLong(0L);
writer.putString("");
writer.putLong(0L);
GuildTag._serializeForDisplay(GuildTag.ERRANT, writer);
}
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
}
}
class GuildInfoMessageType4 extends GuildInfoMessageType {
public GuildInfoMessageType4(AbstractGameObject ago, Guild g) {
super(ago, g);
}
public GuildInfoMessageType4(AbstractGameObject ago, Guild g) {
super(ago, g);
}
@Override
void _serialize(ByteBufferWriter writer) {
String cityName = "";
writer.putInt(this.objectType);
writer.putInt(this.objectID);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
PlayerCharacter pc = PlayerCharacter.getFromCache(this.objectID);
if (this.g == null || pc == null){
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte)0);
return;
}
@Override
void _serialize(ByteBufferWriter writer) {
String cityName = "";
writer.putInt(this.objectType);
writer.putInt(this.objectID);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
PlayerCharacter pc = PlayerCharacter.getFromCache(this.objectID);
if (this.g == null || pc == null) {
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
return;
}
writer.putInt(1);
Guild nation = this.g.getNation();
writer.putInt(0);
writer.putInt(0);
writer.putString(g.getName());
writer.putInt(0);
GuildTag._serializeForDisplay(g.getGuildTag(),writer);
writer.putInt(1);
writer.putInt(0);
writer.putInt(0);
City city = g.getOwnedCity();
if (city != null)
cityName = city.getCityName();
writer.putString(nation.getName());
writer.putInt(0);
writer.putInt(0);
writer.putInt(1);
Guild nation = this.g.getNation();
writer.putInt(0);
writer.putInt(0);
writer.putString(g.getName());
writer.putInt(0);
GuildTag._serializeForDisplay(g.getGuildTag(), writer);
writer.putInt(1);
writer.putInt(0);
writer.putInt(0);
City city = g.getOwnedCity();
if (city != null)
cityName = city.getCityName();
writer.putString(nation.getName());
writer.putInt(0);
writer.putInt(0);
GuildTag._serializeForDisplay(nation.getGuildTag(),writer);
writer.putInt(1);
GuildTag._serializeForDisplay(nation.getGuildTag(), writer);
writer.putInt(1);
writer.putString(g.getName());
writer.putString(g.getMotto());
writer.putString(nation.getName());
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus()));
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus()));
writer.putInt(g.getCharter());
writer.putString(cityName); //Shows City Name FUCK
AbstractCharacter guildLeader;
String guildLeaderName = "";
if (g.isNPCGuild()){
guildLeader = NPC.getFromCache(g.getGuildLeaderUUID());
if (guildLeader != null)
guildLeaderName = guildLeader.getName();
}
else{
guildLeader = PlayerCharacter.getFromCache(g.getGuildLeaderUUID());
if (guildLeader != null)
guildLeaderName = ((PlayerCharacter)guildLeader).getCombinedName();
}
writer.putString(guildLeaderName);
writer.putString(pc.getName());
writer.putDateTime(DateTime.now());
writer.put((byte)1);
writer.put((byte)1);
writer.put((byte)1);
writer.put((byte)0);
writer.putInt(0);
writer.putString(g.getName());
writer.putString(g.getMotto());
writer.putString(nation.getName());
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus()));
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus()));
writer.putInt(g.getCharter());
writer.putString(cityName); //Shows City Name FUCK
AbstractCharacter guildLeader;
String guildLeaderName = "";
if (g.isNPCGuild()) {
guildLeader = NPC.getFromCache(g.getGuildLeaderUUID());
if (guildLeader != null)
guildLeaderName = guildLeader.getName();
} else {
guildLeader = PlayerCharacter.getFromCache(g.getGuildLeaderUUID());
if (guildLeader != null)
guildLeaderName = ((PlayerCharacter) guildLeader).getCombinedName();
}
writer.putString(guildLeaderName);
writer.putString(pc.getName());
writer.putDateTime(DateTime.now());
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 0);
writer.putInt(0);
// writer.put((byte)0);
// writer.putString(cityName);
// writer.putInt(10);
// writer.putInt(6);
// writer.putInt(10);
// writer.putString(cityName);
// writer.putString(pc.getFirstName());
// writer.putString("Nation Leader");
// writer.putDateTime(DateTime.now());
// writer.put((byte)1);
// writer.put((byte)1);
// writer.putInt(1);
// writer.putInt(this.objectType);
// writer.putInt(this.objectID);
// writer.putInt(0);
// writer.putInt(0);
// writer.put((byte)0);
// writer.putString(cityName);
// writer.putInt(10);
// writer.putInt(6);
// writer.putInt(10);
// writer.putString(cityName);
// writer.putString(pc.getFirstName());
// writer.putString("Nation Leader");
// writer.putDateTime(DateTime.now());
// writer.put((byte)1);
// writer.put((byte)1);
// writer.putInt(1);
// writer.putInt(this.objectType);
// writer.putInt(this.objectID);
// writer.putInt(0);
// writer.putInt(0);
}
}
}
class GuildInfoMessageType5 extends GuildInfoMessageType {
public GuildInfoMessageType5(AbstractGameObject ago, Guild g) {
super(ago, g);
}
public GuildInfoMessageType5(AbstractGameObject ago, Guild g) {
super(ago, g);
}
@Override
void _serialize(ByteBufferWriter writer) {
@Override
void _serialize(ByteBufferWriter writer) {
PlayerCharacter pc = null;
PlayerCharacter pc = null;
if(ago.getObjectType().equals(GameObjectType.PlayerCharacter)) {
pc = (PlayerCharacter) ago;
}
if (ago.getObjectType().equals(GameObjectType.PlayerCharacter)) {
pc = (PlayerCharacter) ago;
}
if(pc != null && g != null && g.getObjectUUID() != 0) {
Guild n = g.getNation();
if(n == null) {
n = Guild.getErrantNation();
}
writer.putInt(ago.getObjectType().ordinal());
writer.putInt(ago.getObjectUUID());
if (pc != null && g != null && g.getObjectUUID() != 0) {
Guild n = g.getNation();
if (n == null) {
n = Guild.getErrantNation();
}
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(ago.getObjectType().ordinal());
writer.putInt(ago.getObjectUUID());
writer.putInt(1);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putString(g.getName()); //No Effect?
writer.putInt(0); //Pad
writer.putInt(1);
writer.putInt(0);
writer.putInt(0);
GuildTag._serializeForDisplay(g.getGuildTag(),writer); //Also a waste of space...
writer.putString(g.getName()); //No Effect?
writer.putInt(0); //Pad
writer.putInt(1);
writer.putInt(0);
writer.putInt(0);
writer.putString(n.getName()); //No Effect?
writer.putInt(0);
writer.putInt(0);
GuildTag._serializeForDisplay(g.getGuildTag(), writer); //Also a waste of space...
GuildTag._serializeForDisplay(n.getGuildTag(),writer);
writer.putInt(1);
writer.putInt(0);
writer.putInt(0);
writer.putString(n.getName()); //No Effect?
writer.putInt(0);
writer.putInt(0);
writer.putInt(1);
GuildTag._serializeForDisplay(n.getGuildTag(), writer);
writer.putString(g.getName()); //Guild Name
writer.putString(g.getMotto()); //TODO Motto
writer.putString(n.getName()); //Nation Name
writer.putInt(1);
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus())); //Rank
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus())); //Title
writer.putInt(g.getCharter());
writer.putString(g.getName()); //Guild Name
writer.putString(g.getMotto()); //TODO Motto
writer.putString(n.getName()); //Nation Name
if(g.getNation().equals(Guild.getErrantNation()))
writer.putString("Errant");
else
writer.putString("City");
writer.putString("Guild Leader");
writer.putString(""); //Nation Leader - I believe
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus())); //Rank
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus())); //Title
writer.putInt(g.getCharter());
DateTime now = DateTime.now();
writer.putDateTime(now);
if (g.getNation().equals(Guild.getErrantNation()))
writer.putString("Errant");
else
writer.putString("City");
writer.putString("Guild Leader");
writer.putString(""); //Nation Leader - I believe
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 0);
writer.put((byte) 0);
DateTime now = DateTime.now();
writer.putDateTime(now);
GuildTag._serializeForDisplay(g.getGuildTag(),writer);
GuildTag._serializeForDisplay(g.getNation().getGuildTag(),writer);
writer.putInt(0);
} else {
writer.putLong(0);
writer.put((byte) 1);
writer.put((byte) 1);
writer.put((byte) 0);
writer.put((byte) 0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
GuildTag._serializeForDisplay(g.getGuildTag(), writer);
GuildTag._serializeForDisplay(g.getNation().getGuildTag(), writer);
writer.putInt(0);
} else {
writer.putLong(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
GuildTag._serializeForDisplay(GuildTag.ERRANT,writer);
GuildTag._serializeForDisplay(GuildTag.ERRANT,writer);
writer.put((byte) 0);
writer.putInt(0);
}
}
GuildTag._serializeForDisplay(GuildTag.ERRANT, writer);
GuildTag._serializeForDisplay(GuildTag.ERRANT, writer);
writer.putInt(0);
}
}
}
+133 -133
View File
@@ -27,49 +27,49 @@ import java.util.ArrayList;
public class GuildListMsg extends ClientNetMsg {
private GuildListMessageType glm;
private GuildListMessageType glm;
/**
* Type 1 Constructor - Guild Roster
*/
public GuildListMsg(Guild g) {
super(Protocol.SENDMEMBERENTRY);
this.glm = new GuildListMessageType1(g);
}
/**
* Type 1 Constructor - Guild Roster
*/
public GuildListMsg(Guild g) {
super(Protocol.SENDMEMBERENTRY);
this.glm = new GuildListMessageType1(g);
}
/**
* Type 4 Constructor - Guild History
*/
public GuildListMsg(PlayerCharacter pc) {
super(Protocol.SENDMEMBERENTRY);
this.glm = new GuildListMessageType2(pc);
}
/**
* Type 4 Constructor - Guild History
*/
public GuildListMsg(PlayerCharacter pc) {
super(Protocol.SENDMEMBERENTRY);
this.glm = new GuildListMessageType2(pc);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildListMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.SENDMEMBERENTRY, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public GuildListMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.SENDMEMBERENTRY, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
//TODO Find Default and null check this
this.glm._serialize(writer);
}
//TODO Find Default and null check this
this.glm._serialize(writer);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
/*
*
* The Server should never receive this message directly.
@@ -100,129 +100,129 @@ public class GuildListMsg extends ClientNetMsg {
gt.setUnknown07(reader.getInt());
}
*/
}
}
@Override
protected int getPowerOfTwoBufferSize() {
// Larger size for historically larger opcodes
return 15;
}
@Override
protected int getPowerOfTwoBufferSize() {
// Larger size for historically larger opcodes
return 15;
}
}
abstract class GuildListMessageType {
public ArrayList<Guild> history = new ArrayList<>();
public ArrayList<Guild> history = new ArrayList<>();
abstract void _serialize(ByteBufferWriter writer);
abstract void _serialize(ByteBufferWriter writer);
}
class GuildListMessageType1 extends GuildListMessageType {
private Guild g;
private Guild g;
public GuildListMessageType1(Guild g) {
this.g = g;
}
public GuildListMessageType1(Guild g) {
this.g = g;
}
@Override
void _serialize(ByteBufferWriter writer) {
Enum.GuildType gt = Enum.GuildType.getGuildTypeFromInt(g.getCharter());
@Override
void _serialize(ByteBufferWriter writer) {
Enum.GuildType gt = Enum.GuildType.getGuildTypeFromInt(g.getCharter());
writer.putInt(1);
writer.putInt(gt.ordinal()); //Charter Type
writer.putInt(1); //Always 1?
writer.put((byte) 1);
writer.put((byte) 0);
writer.putInt(gt.getNumberOfRanks()); //Number of Ranks
ArrayList<PlayerCharacter> guildRoster = Guild.GuildRoster(g);
writer.putInt(guildRoster.size() + g.getBanishList().size());
writer.putInt(1);
writer.putInt(gt.ordinal()); //Charter Type
writer.putInt(1); //Always 1?
writer.put((byte) 1);
writer.put((byte) 0);
writer.putInt(gt.getNumberOfRanks()); //Number of Ranks
// Send guild list of each player
for (PlayerCharacter player : guildRoster) {
byte isActive = SessionManager.getPlayerCharacterByID(player.getObjectUUID()) != null ? (byte)1 : (byte)0;
writer.putInt(Enum.GameObjectType.PlayerCharacter.ordinal());
writer.putInt(player.getObjectUUID());
writer.putString(player.getCombinedName());
writer.put(isActive); //Active?
writer.putInt(GuildStatusController.getTitle(player.getGuildStatus()));
writer.putInt(GuildStatusController.getRank(player.getGuildStatus()));
writer.putInt(0); // 1/2 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(GuildStatusController.getRank(player.getGuildStatus()));
writer.putInt(0); // window failed to open when set to 1
}
for (PlayerCharacter banished : g.getBanishList()){
byte isActive = SessionManager.getPlayerCharacterByID(banished.getObjectUUID()) != null ? (byte)1 : (byte)0;
writer.putInt(Enum.GameObjectType.PlayerCharacter.ordinal());
writer.putInt(banished.getObjectUUID());
writer.putString(banished.getCombinedName());
writer.put(isActive); //Active?
writer.putInt(GuildStatusController.getTitle(banished.getGuildStatus()));
writer.putInt(3);
writer.putInt(0); // 1/2 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(3);
writer.putInt(0); // window failed to open when set to 1
}
}
ArrayList<PlayerCharacter> guildRoster = Guild.GuildRoster(g);
writer.putInt(guildRoster.size() + g.getBanishList().size());
// Send guild list of each player
for (PlayerCharacter player : guildRoster) {
byte isActive = SessionManager.getPlayerCharacterByID(player.getObjectUUID()) != null ? (byte) 1 : (byte) 0;
writer.putInt(Enum.GameObjectType.PlayerCharacter.ordinal());
writer.putInt(player.getObjectUUID());
writer.putString(player.getCombinedName());
writer.put(isActive); //Active?
writer.putInt(GuildStatusController.getTitle(player.getGuildStatus()));
writer.putInt(GuildStatusController.getRank(player.getGuildStatus()));
writer.putInt(0); // 1/2 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(GuildStatusController.getRank(player.getGuildStatus()));
writer.putInt(0); // window failed to open when set to 1
}
for (PlayerCharacter banished : g.getBanishList()) {
byte isActive = SessionManager.getPlayerCharacterByID(banished.getObjectUUID()) != null ? (byte) 1 : (byte) 0;
writer.putInt(Enum.GameObjectType.PlayerCharacter.ordinal());
writer.putInt(banished.getObjectUUID());
writer.putString(banished.getCombinedName());
writer.put(isActive); //Active?
writer.putInt(GuildStatusController.getTitle(banished.getGuildStatus()));
writer.putInt(3);
writer.putInt(0); // 1/2 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(0); // 1 has no effect
writer.putInt(3);
writer.putInt(0); // window failed to open when set to 1
}
}
}
class GuildListMessageType2 extends GuildListMessageType {
private PlayerCharacter pc;
private PlayerCharacter pc;
public GuildListMessageType2(PlayerCharacter pc) {
this.pc = pc;
}
public GuildListMessageType2(PlayerCharacter pc) {
this.pc = pc;
}
@Override
void _serialize(ByteBufferWriter writer) {
@Override
void _serialize(ByteBufferWriter writer) {
Guild g = pc.getGuild();
Guild g = pc.getGuild();
writer.putInt(4);
writer.putInt(4);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 0);
writer.put((byte) 0);
writer.putInt(1);
writer.putInt(pc.getObjectType().ordinal());
writer.putInt(pc.getObjectUUID());
writer.putString(pc.getCombinedName());
writer.put((byte) 0);
writer.put((byte) 0);
writer.putInt(1);
writer.putInt(pc.getObjectType().ordinal());
writer.putInt(pc.getObjectUUID());
writer.putString(pc.getCombinedName());
writer.put((byte) 1);
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus())); //Title Maybe?
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus())); //Rank?
writer.put((byte) 1);
writer.putInt(GuildStatusController.getTitle(pc.getGuildStatus())); //Title Maybe?
writer.putInt(GuildStatusController.getRank(pc.getGuildStatus())); //Rank?
writer.putInt(pc.getRaceToken()); //race token
writer.putInt(pc.getBaseClassToken()); //class token
writer.putInt(pc.getRaceToken()); //race token
writer.putInt(pc.getBaseClassToken()); //class token
writer.putInt(2); //PAD
writer.putInt(pc.getLevel());
writer.putInt(g.getCharter());
writer.putInt(2); //PAD
writer.putInt(pc.getLevel());
writer.putInt(g.getCharter());
//TODO Get Guild History from the DB
//ArrayList<GuildHistory> history = DbManager.GuildQueries.GET_GUILD_HISTORY_OF_PLAYER((int)pc.getPlayerUUID());
writer.putInt(pc.getGuildHistory().size()); //Number of Entries
//TODO Get Guild History from the DB
//ArrayList<GuildHistory> history = DbManager.GuildQueries.GET_GUILD_HISTORY_OF_PLAYER((int)pc.getPlayerUUID());
writer.putInt(pc.getGuildHistory().size()); //Number of Entries
for(GuildHistory guildHistory : pc.getGuildHistory()) {
writer.putInt(guildHistory.getHistoryType().getType());
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt((int) guildHistory.getGuildID());
writer.putString(guildHistory.getGuildName());
writer.putInt(0);
writer.putDateTime(guildHistory.getTime());
}
}
for (GuildHistory guildHistory : pc.getGuildHistory()) {
writer.putInt(guildHistory.getHistoryType().getType());
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt((int) guildHistory.getGuildID());
writer.putString(guildHistory.getGuildName());
writer.putInt(0);
writer.putDateTime(guildHistory.getTime());
}
}
}
@@ -18,50 +18,49 @@ import engine.net.client.msg.ClientNetMsg;
public class GuildUnknownMsg extends ClientNetMsg {
private int unknown01;
private int unknown02;
private int unknown03;
private byte unknownByte;
private int unknown01;
private int unknown02;
private int unknown03;
private byte unknownByte;
/**
* This is the general purpose constructor.
*/
public GuildUnknownMsg() {
super(Protocol.UPDATECLIENTALLIANCES);
}
/**
* This is the general purpose constructor.
*/
public GuildUnknownMsg() {
super(Protocol.UPDATECLIENTALLIANCES);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public GuildUnknownMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.UPDATECLIENTALLIANCES, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public GuildUnknownMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.UPDATECLIENTALLIANCES, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte)1);
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
writer.put((byte) 1);
// writer.putInt(this.unknown01);
// writer.putInt(this.unknown02);
// writer.putInt(this.unknown02);
// writer.putInt(this.unknownByte);
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.unknown02 = reader.getInt();
this.unknownByte = reader.get();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.unknown01 = reader.getInt();
this.unknown02 = reader.getInt();
this.unknown02 = reader.getInt();
this.unknownByte = reader.get();
}
}
@@ -19,173 +19,163 @@ import engine.objects.GuildTag;
public class InviteToGuildMsg extends ClientNetMsg {
private int response;
private int sourceType;
private int sourceUUID;
private int targetType;
private int targetUUID;
private int unknown01;
private String message;
private GuildTag gt;
private String guildName;
private int guildType;
private int guildID;
private String targetName;
private int response;
private int sourceType;
private int sourceUUID;
private int targetType;
private int targetUUID;
private int unknown01;
private String message;
private GuildTag gt;
private String guildName;
private int guildType;
private int guildID;
private String targetName;
/**
* This is the general purpose constructor.
*/
public InviteToGuildMsg() {
super(Protocol.INVITETOGUILD);
this.response = 0;
this.message = "No error message";
}
/**
* This is the general purpose constructor.
*/
public InviteToGuildMsg() {
super(Protocol.INVITETOGUILD);
this.response = 0;
this.message = "No error message";
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public InviteToGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.INVITETOGUILD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public InviteToGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.INVITETOGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.response);
writer.putLong(this.sourceUUID);
writer.putLong(this.targetUUID);
writer.putInt(this.unknown01);
writer.putString(this.message);
writer.putInt(this.gt.backgroundColor01);
writer.putInt(this.gt.backgroundColor02);
writer.putInt(this.gt.symbolColor);
writer.putInt(this.gt.symbol);
writer.putInt(this.gt.backgroundDesign);
writer.putString(this.guildName);
writer.putInt(this.guildType);
writer.putInt(this.guildID);
writer.putString(this.targetName);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.response);
writer.putLong(this.sourceUUID);
writer.putLong(this.targetUUID);
writer.putInt(this.unknown01);
writer.putString(this.message);
writer.putInt(this.gt.backgroundColor01);
writer.putInt(this.gt.backgroundColor02);
writer.putInt(this.gt.symbolColor);
writer.putInt(this.gt.symbol);
writer.putInt(this.gt.backgroundDesign);
writer.putString(this.guildName);
writer.putInt(this.guildType);
writer.putInt(this.guildID);
writer.putString(this.targetName);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.response = reader.getInt();
this.sourceType = reader.getInt();
this.sourceUUID = reader.getInt();
this.targetType = reader.getInt();
this.targetUUID = reader.getInt();
this.unknown01 = reader.getInt();
this.message = reader.getString();
this.gt = new GuildTag(reader);
this.guildName = reader.getString();
this.guildType = reader.getInt();
this.guildID = reader.getInt();
this.targetName = reader.getString();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.response = reader.getInt();
this.sourceType = reader.getInt();
this.sourceUUID = reader.getInt();
this.targetType = reader.getInt();
this.targetUUID = reader.getInt();
this.unknown01 = reader.getInt();
this.message = reader.getString();
this.gt = new GuildTag(reader);
this.guildName = reader.getString();
this.guildType = reader.getInt();
this.guildID = reader.getInt();
this.targetName = reader.getString();
}
public GuildTag getGuildTag() {
return this.gt;
}
public GuildTag getGuildTag() {
return this.gt;
}
public void setGuildTag(GuildTag gt) {
this.gt = gt;
}
public void setGuildTag(GuildTag gt) {
this.gt = gt;
}
/**
* @return the response
*/
public int getResponse() {
return response;
}
/**
* @return the response
*/
public int getResponse() {
return response;
}
/**
* @param response
* the response to set
*/
public void setResponse(int response) {
this.response = response;
}
/**
* @param response the response to set
*/
public void setResponse(int response) {
this.response = response;
}
/**
* @return the sourceUUID
*/
public int getSourceUUID() {
return sourceUUID;
}
/**
* @return the sourceUUID
*/
public int getSourceUUID() {
return sourceUUID;
}
/**
* @param sourceUUID
* the sourceUUID to set
*/
public void setSourceUUID(int sourceUUID) {
this.sourceUUID = sourceUUID;
}
/**
* @param sourceUUID the sourceUUID to set
*/
public void setSourceUUID(int sourceUUID) {
this.sourceUUID = sourceUUID;
}
/**
* @return the targetUUID
*/
public int getTargetUUID() {
return targetUUID;
}
/**
* @return the targetUUID
*/
public int getTargetUUID() {
return targetUUID;
}
/**
* @param targetUUID
* the targetUUID to set
*/
public void setTargetUUID(int targetUUID) {
this.targetUUID = targetUUID;
}
/**
* @param targetUUID the targetUUID to set
*/
public void setTargetUUID(int targetUUID) {
this.targetUUID = targetUUID;
}
/**
* @param guildName
* the guildName to set
*/
public void setGuildName(String guildName) {
this.guildName = guildName;
}
/**
* @param guildName the guildName to set
*/
public void setGuildName(String guildName) {
this.guildName = guildName;
}
/**
* @param guildID
* the guildID to set
*/
public void setGuildUUID(int guildID) {
this.guildID = guildID;
}
/**
* @param guildID the guildID to set
*/
public void setGuildUUID(int guildID) {
this.guildID = guildID;
}
/**
* @return the targetName
*/
public String getTargetName() {
return targetName;
}
/**
* @return the targetName
*/
public String getTargetName() {
return targetName;
}
/**
* @param targetName
* the targetName to set
*/
public void setTargetName(String targetName) {
this.targetName = targetName;
}
/**
* @param targetName the targetName to set
*/
public void setTargetName(String targetName) {
this.targetName = targetName;
}
public void setSourceType(int sourceType) {
this.sourceType = sourceType;
}
public void setSourceType(int sourceType) {
this.sourceType = sourceType;
}
public void setTargetType(int targetType) {
this.targetType = targetType;
}
public void setGuildType(int guildType) {
this.guildType = guildType;
}
public void setGuildType(int guildType) {
this.guildType = guildType;
}
/**
* @return the targetType
@@ -193,4 +183,8 @@ public class InviteToGuildMsg extends ClientNetMsg {
public int getTargetType() {
return targetType;
}
public void setTargetType(int targetType) {
this.targetType = targetType;
}
}
@@ -19,183 +19,180 @@ import engine.objects.GuildTag;
public class InviteToSubMsg extends ClientNetMsg {
//12d67402 0000f062 56253600 0010b062 d7821800 00000000
//10000000 4e006f0020006500720072006f00720020006d00650073007300610067006500
//0a000000 03000000 07000000 a0000000 04000000
//17000000 4800650072006f006500730020006f0066002000530065006100200044006f006700730020005200650073007400
//0000200a 33000000 00000000 01000000
//12d67402 0000f062 56253600 0010b062 d7821800 00000000
//10000000 4e006f0020006500720072006f00720020006d00650073007300610067006500
//0a000000 03000000 07000000 a0000000 04000000
//17000000 4800650072006f006500730020006f0066002000530065006100200044006f006700730020005200650073007400
//0000200a 33000000 00000000 01000000
//12d67402 0000d062 11fe1700 00009063 3ee91300 00000000
//10000000 4e006f0020006500720072006f00720020006d00650073007300610067006500
//08000000 08000000 07000000 96000000 0d000000
//11000000 42006c006f006f00640020004d006f006f006e00200052006900730069006e006700
//0000c006 64540000 01000000 00000000
//12d67402 0000d062 11fe1700 00009063 3ee91300 00000000
//10000000 4e006f0020006500720072006f00720020006d00650073007300610067006500
//08000000 08000000 07000000 96000000 0d000000
//11000000 42006c006f006f00640020004d006f006f006e00200052006900730069006e006700
//0000c006 64540000 01000000 00000000
//12d67402 0000e062 db2d0000 00005063 116e1100 00000000
//10000000 4e006f0020006500720072006f00720020006d00650073007300610067006500
//05000000 11000000 0e000000 95000000 05000000
//09000000 530074006f0072006d0068006f006c006400
//0000c006 56300000 01000000 00000000
//12d67402 0000e062 db2d0000 00005063 116e1100 00000000
//10000000 4e006f0020006500720072006f00720020006d00650073007300610067006500
//05000000 11000000 0e000000 95000000 05000000
//09000000 530074006f0072006d0068006f006c006400
//0000c006 56300000 01000000 00000000
private int sourceUUID;
private int targetUUID;
private int unknown01;
private String message;
private GuildTag gt;
private String guildName;
private int guildUUID;
private int unknown02;
private int unknown03;
private int sourceUUID;
private int targetUUID;
private int unknown01;
private String message;
private GuildTag gt;
private String guildName;
private int guildUUID;
private int unknown02;
private int unknown03;
/**
* This is the general purpose constructor.
*/
public InviteToSubMsg() {
super(Protocol.INVITEGUILDFEALTY);
this.message = "No error message";
}
/**
* This is the general purpose constructor.
*/
public InviteToSubMsg() {
super(Protocol.INVITEGUILDFEALTY);
this.message = "No error message";
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public InviteToSubMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.INVITEGUILDFEALTY, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public InviteToSubMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.INVITEGUILDFEALTY, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
writer.putInt(this.sourceUUID);
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
writer.putInt(this.targetUUID);
writer.putInt(this.unknown01);
writer.putString(this.message);
writer.putInt(this.gt.backgroundColor01);
writer.putInt(this.gt.backgroundColor02);
writer.putInt(this.gt.symbolColor);
writer.putInt(this.gt.symbol);
writer.putInt(this.gt.backgroundDesign);
writer.putString(this.guildName);
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(this.guildUUID);
writer.putInt(this.unknown02);
writer.putInt(this.unknown03);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
writer.putInt(this.sourceUUID);
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
writer.putInt(this.targetUUID);
writer.putInt(this.unknown01);
writer.putString(this.message);
writer.putInt(this.gt.backgroundColor01);
writer.putInt(this.gt.backgroundColor02);
writer.putInt(this.gt.symbolColor);
writer.putInt(this.gt.symbol);
writer.putInt(this.gt.backgroundDesign);
writer.putString(this.guildName);
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(this.guildUUID);
writer.putInt(this.unknown02);
writer.putInt(this.unknown03);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt();
this.sourceUUID = reader.getInt();
reader.getInt();
this.targetUUID = reader.getInt();
this.unknown01 = reader.getInt();
this.message = reader.getString();
this.gt = new GuildTag(reader);
this.guildName = reader.getString();
reader.getInt(); // Padding for Object Type
this.guildUUID = reader.getInt();
this.unknown02 = reader.getInt();
this.unknown03 = reader.getInt();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt();
this.sourceUUID = reader.getInt();
reader.getInt();
this.targetUUID = reader.getInt();
this.unknown01 = reader.getInt();
this.message = reader.getString();
this.gt = new GuildTag(reader);
this.guildName = reader.getString();
reader.getInt(); // Padding for Object Type
this.guildUUID = reader.getInt();
this.unknown02 = reader.getInt();
this.unknown03 = reader.getInt();
}
public GuildTag getGuildTag() {
return this.gt;
}
public GuildTag getGuildTag() {
return this.gt;
}
public void setGuildTag(GuildTag gt) {
this.gt = gt;
}
public void setGuildTag(GuildTag gt) {
this.gt = gt;
}
/**
* @return the sourceUUID
*/
public int getSourceUUID() {
return sourceUUID;
}
/**
* @return the sourceUUID
*/
public int getSourceUUID() {
return sourceUUID;
}
/**
* @return the targetUUID
*/
public int getTargetUUID() {
return targetUUID;
}
/**
* @return the targetUUID
*/
public int getTargetUUID() {
return targetUUID;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @return the guildName
*/
public String getGuildName() {
return guildName;
}
/**
* @return the guildName
*/
public String getGuildName() {
return guildName;
}
/**
* @param guildName
* the guildName to set
*/
public void setGuildName(String guildName) {
this.guildName = guildName;
}
/**
* @param guildName the guildName to set
*/
public void setGuildName(String guildName) {
this.guildName = guildName;
}
public int getUnknown02() {
return unknown02;
}
public int getUnknown02() {
return unknown02;
}
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
public int getUnknown03() {
return unknown03;
}
public int getUnknown03() {
return unknown03;
}
public void setUnknown03(int unknown03) {
this.unknown03 = unknown03;
}
public void setUnknown03(int unknown03) {
this.unknown03 = unknown03;
}
public int getGuildUUID() {
return guildUUID;
}
public int getGuildUUID() {
return guildUUID;
}
public void setGuildUUID(int guildUUID) {
this.guildUUID = guildUUID;
}
public void setGuildUUID(int guildUUID) {
this.guildUUID = guildUUID;
}
}
@@ -18,88 +18,84 @@ import engine.net.client.msg.ClientNetMsg;
public class LeaveGuildMsg extends ClientNetMsg {
private int response;
private String message;
private long sourceID;
private int response;
private String message;
private long sourceID;
/**
* This is the general purpose constructor.
*/
public LeaveGuildMsg() {
super(Protocol.LEAVEGUILD);
}
/**
* This is the general purpose constructor.
*/
public LeaveGuildMsg() {
super(Protocol.LEAVEGUILD);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public LeaveGuildMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.LEAVEGUILD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public LeaveGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.LEAVEGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.response);
writer.putString(this.message);
writer.putLong(this.sourceID);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.response);
writer.putString(this.message);
writer.putLong(this.sourceID);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.response = reader.getInt();
this.message = reader.getString();
this.sourceID = reader.getLong();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.response = reader.getInt();
this.message = reader.getString();
this.sourceID = reader.getLong();
}
/**
* @return the response
*/
public int getResponse() {
return response;
}
/**
* @return the response
*/
public int getResponse() {
return response;
}
/**
* @param response
* the response to set
*/
public void setResponse(int response) {
this.response = response;
}
/**
* @param response the response to set
*/
public void setResponse(int response) {
this.response = response;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @return the sourceID
*/
public long getSourceID() {
return sourceID;
}
/**
* @return the sourceID
*/
public long getSourceID() {
return sourceID;
}
/**
* @param sourceID
* the sourceID to set
*/
public void setSourceID(long sourceID) {
this.sourceID = sourceID;
}
/**
* @param sourceID the sourceID to set
*/
public void setSourceID(long sourceID) {
this.sourceID = sourceID;
}
}
@@ -18,93 +18,90 @@ import engine.net.client.msg.ClientNetMsg;
public class MOTDCommitMsg extends ClientNetMsg {
private String message;
private int unknown01;
private int type;
private String message;
private int unknown01;
private int type;
/**
* This is the general purpose constructor.
*/
public MOTDCommitMsg() {
super(Protocol.SETMOTD);
this.message = "";
this.unknown01 = 0;
this.type = 0;
}
/**
* This is the general purpose constructor.
*/
public MOTDCommitMsg() {
super(Protocol.SETMOTD);
this.message = "";
this.unknown01 = 0;
this.type = 0;
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public MOTDCommitMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.SETMOTD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public MOTDCommitMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.SETMOTD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putString(this.message);
writer.putInt(this.unknown01);
writer.putInt(this.type);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putString(this.message);
writer.putInt(this.unknown01);
writer.putInt(this.type);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.message = reader.getString();
this.unknown01 = reader.getInt();
this.type = reader.getInt();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.message = reader.getString();
this.unknown01 = reader.getInt();
this.type = reader.getInt();
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(int type) {
this.type = type;
}
/**
* @param type the type to set
*/
public void setType(int type) {
this.type = type;
}
}
+95 -99
View File
@@ -18,116 +18,112 @@ import engine.net.client.msg.ClientNetMsg;
public class MOTDMsg extends ClientNetMsg {
private int type;
private byte response;
private int unknown01;
private String message;
private int type;
private byte response;
private int unknown01;
private String message;
/**
* This is the general purpose constructor.
*/
public MOTDMsg() {
super(Protocol.MOTD);
this.type = 0;
this.response = (byte) 0;
this.unknown01 = 0;
this.message = "";
}
/**
* This is the general purpose constructor.
*/
public MOTDMsg() {
super(Protocol.MOTD);
this.type = 0;
this.response = (byte) 0;
this.unknown01 = 0;
this.message = "";
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public MOTDMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.MOTD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the
* ByteBuffer into a message. If a BufferUnderflow occurs (based on reading
* past the limit) then this constructor Throws that Exception to the
* caller.
*/
public MOTDMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.MOTD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.type);
writer.put(this.response);
if (this.response == (byte) 1) {
writer.putInt(this.unknown01);
writer.putString(this.message);
}
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.type);
writer.put(this.response);
if (this.response == (byte) 1) {
writer.putInt(this.unknown01);
writer.putString(this.message);
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.type = reader.getInt();
this.response = reader.get();
if (this.response == (byte) 1) {
this.unknown01 = reader.getInt();
this.message = reader.getString();
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.type = reader.getInt();
this.response = reader.get();
if (this.response == (byte) 1) {
this.unknown01 = reader.getInt();
this.message = reader.getString();
}
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @param type
* the type to set
*/
public void setType(int type) {
this.type = type;
}
/**
* @param type the type to set
*/
public void setType(int type) {
this.type = type;
}
/**
* @return the response
*/
public byte getResponse() {
return response;
}
/**
* @return the response
*/
public byte getResponse() {
return response;
}
/**
* @param response
* the response to set
*/
public void setResponse(byte response) {
this.response = response;
}
/**
* @param response the response to set
*/
public void setResponse(byte response) {
this.response = response;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}
@@ -18,39 +18,38 @@ import engine.net.client.msg.ClientNetMsg;
public class ReqGuildListMsg extends ClientNetMsg {
private long nationCompID;
private long guildToSubCompID;
private long nationCompID;
private long guildToSubCompID;
/**
* This is the general purpose constructor.
*/
public ReqGuildListMsg() {
super(Protocol.REQUESTGUILDLIST);
}
/**
* This is the general purpose constructor.
*/
public ReqGuildListMsg() {
super(Protocol.REQUESTGUILDLIST);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public ReqGuildListMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.REQUESTGUILDLIST, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public ReqGuildListMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.REQUESTGUILDLIST, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt();
reader.getString();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
reader.getInt();
reader.getString();
}
}
@@ -23,84 +23,83 @@ import java.util.ArrayList;
public class SendGuildEntryMsg extends ClientNetMsg {
private PlayerCharacter pc;
private PlayerCharacter pc;
/**
* This is the general purpose constructor.
*/
public SendGuildEntryMsg(PlayerCharacter pc) {
super(Protocol.SENDGUILDENTRY);
this.pc = pc;
}
/**
* This is the general purpose constructor.
*/
public SendGuildEntryMsg(PlayerCharacter pc) {
super(Protocol.SENDGUILDENTRY);
this.pc = pc;
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public SendGuildEntryMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.SENDGUILDENTRY, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public SendGuildEntryMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.SENDGUILDENTRY, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
ArrayList<Guild>subsAndSovs = new ArrayList<>();
Guild nation = pc.getGuild().getNation();
if (pc.getGuild() != nation)
subsAndSovs.add(nation);
subsAndSovs.addAll(pc.getGuild().getSubGuildList());
writer.putInt(1);
//GuildState
//Petitioner = 2, Sworn = 4 , Nation = 5, protectorate = 6, city-State = 7(nation), province = 8,
writer.putInt(subsAndSovs.size());
writer.putInt(1);
if (subsAndSovs.size() > 0){
for (Guild guild : subsAndSovs){
int state = guild.getGuildState().getStateID();
writer.putInt(guild.getObjectType().ordinal());
writer.putInt(guild.getObjectUUID());
writer.putString(guild.getName());
//TODO set Alliance date
writer.putShort((short)1);
writer.putInt(0);
writer.putShort((short)0);
writer.put((byte)0);
writer.putInt(state);
GuildTag._serializeForDisplay(guild.getGuildTag(),writer);
if (guild == nation)
writer.putInt(2); // Break Fealty
else
writer.putInt(1); // Dismiss, Swear In.
}
}
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
}
ArrayList<Guild> subsAndSovs = new ArrayList<>();
public PlayerCharacter getPc() {
return pc;
}
Guild nation = pc.getGuild().getNation();
if (pc.getGuild() != nation)
subsAndSovs.add(nation);
subsAndSovs.addAll(pc.getGuild().getSubGuildList());
public void setPc(PlayerCharacter pc) {
this.pc = pc;
}
writer.putInt(1);
//GuildState
//Petitioner = 2, Sworn = 4 , Nation = 5, protectorate = 6, city-State = 7(nation), province = 8,
writer.putInt(subsAndSovs.size());
writer.putInt(1);
if (subsAndSovs.size() > 0) {
for (Guild guild : subsAndSovs) {
int state = guild.getGuildState().getStateID();
writer.putInt(guild.getObjectType().ordinal());
writer.putInt(guild.getObjectUUID());
writer.putString(guild.getName());
//TODO set Alliance date
writer.putShort((short) 1);
writer.putInt(0);
writer.putShort((short) 0);
writer.put((byte) 0);
writer.putInt(state);
GuildTag._serializeForDisplay(guild.getGuildTag(), writer);
if (guild == nation)
writer.putInt(2); // Break Fealty
else
writer.putInt(1); // Dismiss, Swear In.
}
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
}
public PlayerCharacter getPc() {
return pc;
}
public void setPc(PlayerCharacter pc) {
this.pc = pc;
}
}
@@ -18,61 +18,60 @@ import engine.net.client.msg.ClientNetMsg;
public class SwearInGuildMsg extends ClientNetMsg {
private int guildType;
private int guildUUID;
private int guildType;
private int guildUUID;
private String message;
private String message;
/**
* This is the general purpose constructor.
*/
public SwearInGuildMsg() {
super(Protocol.SWEARINGUILD);
}
/**
* This is the general purpose constructor.
*/
public SwearInGuildMsg() {
super(Protocol.SWEARINGUILD);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public SwearInGuildMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.SWEARINGUILD, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public SwearInGuildMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.SWEARINGUILD, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
}
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.guildType = reader.getInt();
this.guildUUID = reader.getInt();
reader.getInt();
this.message = reader.getString();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
/**
* @return the targetType
*/
this.guildType = reader.getInt();
this.guildUUID = reader.getInt();
reader.getInt();
this.message = reader.getString();
}
public String getMessage() {
return message;
}
/**
* @return the targetType
*/
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getGuildUUID() {
return guildUUID;
}
public int getGuildUUID() {
return guildUUID;
}
}
+84 -89
View File
@@ -18,106 +18,101 @@ import engine.net.client.msg.ClientNetMsg;
public class SwearInMsg extends ClientNetMsg {
private int targetType;
private int targetID;
private int unknown01;
private String message;
private int targetType;
private int targetID;
private int unknown01;
private String message;
/**
* This is the general purpose constructor.
*/
public SwearInMsg() {
super(Protocol.ACTIVATEPLEDGE);
}
/**
* This is the general purpose constructor.
*/
public SwearInMsg() {
super(Protocol.ACTIVATEPLEDGE);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public SwearInMsg(AbstractConnection origin, ByteBufferReader reader)
{
super(Protocol.ACTIVATEPLEDGE, origin, reader);
}
/**
* This constructor is used by NetMsgFactory. It attempts to deserialize the ByteBuffer into a message. If a BufferUnderflow occurs (based on reading past the limit) then this constructor Throws that Exception to the caller.
*/
public SwearInMsg(AbstractConnection origin, ByteBufferReader reader) {
super(Protocol.ACTIVATEPLEDGE, origin, reader);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.targetType);
writer.putInt(this.targetID);
writer.putInt(this.unknown01);
writer.putString(this.message);
}
/**
* Serializes the subclass specific items to the supplied ByteBufferWriter.
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.targetType);
writer.putInt(this.targetID);
writer.putInt(this.unknown01);
writer.putString(this.message);
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.targetType = reader.getInt();
this.targetID = reader.getInt();
this.unknown01 = reader.getInt();
this.message = reader.getString();
}
/**
* Deserializes the subclass specific items from the supplied ByteBufferReader.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
this.targetType = reader.getInt();
this.targetID = reader.getInt();
this.unknown01 = reader.getInt();
this.message = reader.getString();
}
/**
* @return the targetType
*/
public int getTargetType() {
return targetType;
}
/**
* @return the targetType
*/
public int getTargetType() {
return targetType;
}
/**
* @param targetType
* the targetType to set
*/
public void setTargetType(int targetType) {
this.targetType = targetType;
}
/**
* @param targetType the targetType to set
*/
public void setTargetType(int targetType) {
this.targetType = targetType;
}
/**
* @return the targetID
*/
public int getTargetID() {
return targetID;
}
/**
* @return the targetID
*/
public int getTargetID() {
return targetID;
}
/**
* @param targetID
* the targetID to set
*/
public void setTargetID(int targetID) {
this.targetID = targetID;
}
/**
* @param targetID the targetID to set
*/
public void setTargetID(int targetID) {
this.targetID = targetID;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01
* the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}