2022-04-30 09:41:17 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.net.client.msg ;
import engine.exception.SerializationException ;
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
import engine.objects.Account ;
/**
* Vault inventory contents
2023-07-15 09:23:48 -04:00
*
2022-04-30 09:41:17 -04:00
* @author Eighty
*/
public class UpdateVaultMsg extends ClientNetMsg {
2023-07-15 09:23:48 -04:00
private int accountType ;
private int accountID ;
/**
* This is the general purpose constructor.
*/
public UpdateVaultMsg ( Account account ) {
super ( Protocol . CLIENTUPDATEVAULT ) ;
this . accountType = account . getObjectType ( ) . ordinal ( ) ;
this . accountID = account . getObjectUUID ( ) ;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
/**
* 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 UpdateVaultMsg ( AbstractConnection origin ,
ByteBufferReader reader ) {
super ( Protocol . CLIENTUPDATEVAULT , origin , reader ) ;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
/**
* Serializes the subclass specific items from the supplied NetMsgReader.
*/
@Override
protected void _serialize ( ByteBufferWriter writer )
throws SerializationException {
writer . putInt ( accountType ) ;
writer . putInt ( accountID ) ;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
/**
* Deserializes the subclass specific items to the supplied NetMsgWriter.
*/
@Override
protected void _deserialize ( ByteBufferReader reader ) {
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
@Override
protected int getPowerOfTwoBufferSize ( ) {
return 17 ;
}
2022-04-30 09:41:17 -04:00
}