forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
@@ -38,94 +35,92 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class ObjectActionMsg extends ClientNetMsg {
|
||||
|
||||
private int unknown01;
|
||||
private int unknown02;
|
||||
private ArrayList<Long> targetCompID;
|
||||
private int unknown01;
|
||||
private int unknown02;
|
||||
private ArrayList<Long> targetCompID;
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public ObjectActionMsg(int unknown01, int unknown02, ArrayList<Long> targetCompID) {
|
||||
super(Protocol.OBJECTACTION);
|
||||
this.unknown01 = unknown01;
|
||||
this.unknown02 = unknown02;
|
||||
this.targetCompID = targetCompID;
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor
|
||||
*/
|
||||
public ObjectActionMsg(int unknown01, int unknown02, ArrayList<Long> targetCompID) {
|
||||
super(Protocol.OBJECTACTION);
|
||||
this.unknown01 = unknown01;
|
||||
this.unknown02 = unknown02;
|
||||
this.targetCompID = targetCompID;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ObjectActionMsg(AbstractConnection origin, ByteBufferReader reader)
|
||||
{
|
||||
super(Protocol.OBJECTACTION, 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 ObjectActionMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.OBJECTACTION, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader)
|
||||
{
|
||||
if (targetCompID == null)
|
||||
targetCompID = new ArrayList<>();
|
||||
unknown01 = reader.getInt();
|
||||
unknown02 = reader.getInt();
|
||||
for (int i=0; i<unknown01; i++)
|
||||
targetCompID.add(reader.getLong());
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
if (targetCompID == null)
|
||||
targetCompID = new ArrayList<>();
|
||||
unknown01 = reader.getInt();
|
||||
unknown02 = reader.getInt();
|
||||
for (int i = 0; i < unknown01; i++)
|
||||
targetCompID.add(reader.getLong());
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(unknown02);
|
||||
for (int i=0; i<unknown01; i++)
|
||||
writer.putLong(targetCompID.get(i));
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(unknown02);
|
||||
for (int i = 0; i < unknown01; i++)
|
||||
writer.putLong(targetCompID.get(i));
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 targetCompID
|
||||
*/
|
||||
public ArrayList<Long> getTargetCompID() {
|
||||
return targetCompID;
|
||||
}
|
||||
/**
|
||||
* @return the targetCompID
|
||||
*/
|
||||
public ArrayList<Long> getTargetCompID() {
|
||||
return targetCompID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param targetCompID the targetCompID to set
|
||||
*/
|
||||
public void setTargetCompID(ArrayList<Long> targetCompID) {
|
||||
this.targetCompID = targetCompID;
|
||||
}
|
||||
/**
|
||||
* @param targetCompID the targetCompID to set
|
||||
*/
|
||||
public void setTargetCompID(ArrayList<Long> targetCompID) {
|
||||
this.targetCompID = targetCompID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user