Files
Server/src/engine/net/client/msg/ItemToVaultMsg.java
T

199 lines
5.1 KiB
Java
Raw Normal View History

2022-04-30 09:41:17 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.net.client.msg;
import engine.net.AbstractConnection;
import engine.net.ByteBufferReader;
import engine.net.ByteBufferWriter;
2024-04-06 15:30:35 -04:00
import engine.net.Protocol;
2022-04-30 09:41:17 -04:00
/**
* Transfer item from inventory to vault
*
* @author Eighty
*/
2024-03-24 10:12:16 -04:00
public class ItemToVaultMsg extends ClientNetMsg {
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
private int unknown01;
private int unknown02;
private long playerCompID;
private int type;
private int objectUUID;
private int unknown03;
private int unknown04;
/**
* This is the general purpose constructor
*/
2024-03-24 10:12:16 -04:00
public ItemToVaultMsg(long playerCompID,
int unknown01, int unknown02, int type, int objectUUID, int unknown03,
int unknown04) {
2023-07-15 09:23:48 -04:00
super(Protocol.ITEMTOVAULT);
this.playerCompID = playerCompID;
this.unknown01 = unknown01;
this.unknown02 = unknown02;
this.type = type;
this.objectUUID = objectUUID;
this.unknown03 = unknown03;
this.unknown04 = unknown04;
}
2024-03-24 10:12:16 -04:00
public ItemToVaultMsg(ItemFromVaultMsg msg) {
2023-07-15 09:23:48 -04:00
super(Protocol.ITEMTOVAULT);
this.playerCompID = msg.getPlayerCompID();
this.unknown01 = msg.getUnknown01();
this.unknown02 = msg.getUnknown02();
this.type = msg.getType();
this.objectUUID = msg.getUUID();
this.unknown03 = msg.getUnknown03();
this.unknown04 = msg.getUnknown04();
}
/**
* This is the general purpose constructor
*/
2024-03-24 10:12:16 -04:00
public ItemToVaultMsg() {
2023-07-15 09:23:48 -04:00
super(Protocol.ITEMTOVAULT);
}
/**
* 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.
*/
2024-03-24 10:12:16 -04:00
public ItemToVaultMsg(AbstractConnection origin,
ByteBufferReader reader) {
2023-07-15 09:23:48 -04:00
super(Protocol.ITEMTOVAULT, origin, reader);
}
/**
* Deserializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _deserialize(ByteBufferReader reader) {
playerCompID = reader.getLong();
unknown01 = reader.getInt();
unknown02 = reader.getInt();
type = reader.getInt();
objectUUID = reader.getInt();
unknown03 = reader.getInt();
unknown04 = reader.getInt();
}
/**
* Serializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
2024-05-12 13:36:47 -04:00
protected void _serialize(ByteBufferWriter writer) {
2023-07-15 09:23:48 -04:00
writer.putLong(playerCompID);
writer.putInt(unknown01);
writer.putInt(unknown02);
writer.putInt(type);
writer.putInt(objectUUID);
writer.putInt(unknown03);
writer.putInt(unknown04);
}
/**
* @return the unknown01
*/
public int getUnknown01() {
return unknown01;
}
/**
* @param unknown01 the unknown01 to set
*/
public void setUnknown01(int unknown01) {
this.unknown01 = unknown01;
}
/**
* @return the unknown02
*/
public int getUnknown02() {
return unknown02;
}
/**
* @param unknown02 the unknown02 to set
*/
public void setUnknown02(int unknown02) {
this.unknown02 = unknown02;
}
/**
* @return the playerCompID
*/
public long getPlayerCompID() {
return playerCompID;
}
/**
* @param playerCompID the playerCompID to set
*/
public void setPlayerCompID(long playerCompID) {
this.playerCompID = playerCompID;
}
/**
* @return the type
*/
public int getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(int type) {
this.type = type;
}
/**
* @return the objectUUID
*/
public int getUUID() {
return objectUUID;
}
/**
* @return the unknown03
*/
public int getUnknown03() {
return unknown03;
}
/**
* @param unknown03 the unknown03 to set
*/
public void setUnknown03(int unknown03) {
this.unknown03 = unknown03;
}
/**
* @return the unknown04
*/
public int getUnknown04() {
return unknown04;
}
/**
* @param unknown04 the unknown04 to set
*/
public void setUnknown04(int unknown04) {
this.unknown04 = unknown04;
}
2022-04-30 09:41:17 -04:00
}