Project cleanup pre merge.
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
@@ -19,9 +16,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
@@ -31,9 +25,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
@@ -43,7 +34,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.Enum.GameObjectType;
|
||||
@@ -55,104 +45,104 @@ import engine.net.client.Protocol;
|
||||
|
||||
public class DoorTryOpenMsg extends ClientNetMsg {
|
||||
|
||||
private int unk1;
|
||||
private int doorID;
|
||||
private int buildingUUID;
|
||||
private int playerUUID;
|
||||
private byte toggle;
|
||||
private int unk1;
|
||||
private int doorID;
|
||||
private int buildingUUID;
|
||||
private int playerUUID;
|
||||
private byte toggle;
|
||||
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public DoorTryOpenMsg(int doorID, int targetID, int senderID, byte toggle) {
|
||||
super(Protocol.DOORTRYOPEN);
|
||||
this.unk1 = 0;
|
||||
this.doorID = doorID;
|
||||
this.buildingUUID = targetID;
|
||||
this.playerUUID = senderID;
|
||||
this.toggle = toggle;
|
||||
}
|
||||
/**
|
||||
* This is the general purpose constructor.
|
||||
*/
|
||||
public DoorTryOpenMsg(int doorID, int targetID, int senderID, byte toggle) {
|
||||
super(Protocol.DOORTRYOPEN);
|
||||
this.unk1 = 0;
|
||||
this.doorID = doorID;
|
||||
this.buildingUUID = targetID;
|
||||
this.playerUUID = senderID;
|
||||
this.toggle = toggle;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 DoorTryOpenMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.DOORTRYOPEN, 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 DoorTryOpenMsg(AbstractConnection origin, ByteBufferReader reader) {
|
||||
super(Protocol.DOORTRYOPEN, origin, reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
if (this.unk1 == 2) {
|
||||
writer.putInt(2);
|
||||
for (int i=0;i<6;i++)
|
||||
writer.putInt(0);
|
||||
writer.put((byte)0);
|
||||
} else {
|
||||
writer.putInt(0); //0 or 2. If 2 all other variables are 0
|
||||
writer.putInt(0);
|
||||
writer.putInt(doorID);
|
||||
writer.putInt(GameObjectType.Building.ordinal());
|
||||
writer.putInt(buildingUUID);
|
||||
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
|
||||
writer.putInt(playerUUID);
|
||||
writer.put(toggle);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
if (this.unk1 == 2) {
|
||||
writer.putInt(2);
|
||||
for (int i = 0; i < 6; i++)
|
||||
writer.putInt(0);
|
||||
writer.put((byte) 0);
|
||||
} else {
|
||||
writer.putInt(0); //0 or 2. If 2 all other variables are 0
|
||||
writer.putInt(0);
|
||||
writer.putInt(doorID);
|
||||
writer.putInt(GameObjectType.Building.ordinal());
|
||||
writer.putInt(buildingUUID);
|
||||
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
|
||||
writer.putInt(playerUUID);
|
||||
writer.put(toggle);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
this.unk1 = reader.getInt();
|
||||
reader.getInt();
|
||||
this.doorID = reader.getInt();
|
||||
reader.getInt(); // type padding
|
||||
this.buildingUUID = reader.getInt();
|
||||
reader.getInt(); // type padding
|
||||
this.playerUUID = reader.getInt();
|
||||
this.toggle = reader.get();
|
||||
}
|
||||
/**
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _deserialize(ByteBufferReader reader) {
|
||||
this.unk1 = reader.getInt();
|
||||
reader.getInt();
|
||||
this.doorID = reader.getInt();
|
||||
reader.getInt(); // type padding
|
||||
this.buildingUUID = reader.getInt();
|
||||
reader.getInt(); // type padding
|
||||
this.playerUUID = reader.getInt();
|
||||
this.toggle = reader.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unknown1
|
||||
*/
|
||||
public int getDoorID() {
|
||||
return doorID;
|
||||
}
|
||||
/**
|
||||
* @return the unknown1
|
||||
*/
|
||||
public int getDoorID() {
|
||||
return doorID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the buildingUUID
|
||||
*/
|
||||
public int getBuildingUUID() {
|
||||
return buildingUUID;
|
||||
}
|
||||
/**
|
||||
* @return the buildingUUID
|
||||
*/
|
||||
public int getBuildingUUID() {
|
||||
return buildingUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the playerUUID
|
||||
*/
|
||||
public int playerUUID() {
|
||||
return playerUUID;
|
||||
}
|
||||
/**
|
||||
* @return the playerUUID
|
||||
*/
|
||||
public int playerUUID() {
|
||||
return playerUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the toggle
|
||||
*/
|
||||
public byte getToggle() {
|
||||
return toggle;
|
||||
}
|
||||
/**
|
||||
* @return the toggle
|
||||
*/
|
||||
public byte getToggle() {
|
||||
return toggle;
|
||||
}
|
||||
|
||||
public int getUnk1() {
|
||||
return this.unk1;
|
||||
}
|
||||
public int getUnk1() {
|
||||
return this.unk1;
|
||||
}
|
||||
|
||||
public void setUnk1(int value) {
|
||||
this.unk1 = value;
|
||||
}
|
||||
public void setUnk1(int value) {
|
||||
this.unk1 = value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user