52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
// This file has been automatically generated by writePacketClasses.js
|
|
|
|
import {UUID} from '../UUID';
|
|
import {MessageFlags} from '../../enums/MessageFlags';
|
|
import {Packet} from '../Packet';
|
|
|
|
export class DetachAttachmentIntoInvPacket implements Packet
|
|
{
|
|
name = 'DetachAttachmentIntoInv';
|
|
flags = MessageFlags.FrequencyLow;
|
|
id = 4294902157;
|
|
|
|
ObjectData: {
|
|
AgentID: UUID;
|
|
ItemID: UUID;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return 32;
|
|
}
|
|
|
|
writeToBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
this.ObjectData['AgentID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
this.ObjectData['ItemID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
return pos - startPos;
|
|
}
|
|
|
|
readFromBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
const newObjObjectData: {
|
|
AgentID: UUID,
|
|
ItemID: UUID
|
|
} = {
|
|
AgentID: UUID.zero(),
|
|
ItemID: UUID.zero()
|
|
};
|
|
newObjObjectData['AgentID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
newObjObjectData['ItemID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
this.ObjectData = newObjObjectData;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
|