// This file has been automatically generated by writePacketClasses.js import {UUID} from '../UUID'; import {MessageFlags} from '../../enums/MessageFlags'; import {Packet} from '../Packet'; export class CompleteAgentMovementPacket implements Packet { name = 'CompleteAgentMovement'; flags = MessageFlags.FrequencyLow; id = 4294902009; AgentData: { AgentID: UUID; SessionID: UUID; CircuitCode: number; }; getSize(): number { return 36; } writeToBuffer(buf: Buffer, pos: number): number { const startPos = pos; this.AgentData['AgentID'].writeToBuffer(buf, pos); pos += 16; this.AgentData['SessionID'].writeToBuffer(buf, pos); pos += 16; buf.writeUInt32LE(this.AgentData['CircuitCode'], pos); pos += 4; return pos - startPos; } readFromBuffer(buf: Buffer, pos: number): number { const startPos = pos; const newObjAgentData: { AgentID: UUID, SessionID: UUID, CircuitCode: number } = { AgentID: UUID.zero(), SessionID: UUID.zero(), CircuitCode: 0 }; newObjAgentData['AgentID'] = new UUID(buf, pos); pos += 16; newObjAgentData['SessionID'] = new UUID(buf, pos); pos += 16; newObjAgentData['CircuitCode'] = buf.readUInt32LE(pos); pos += 4; this.AgentData = newObjAgentData; return pos - startPos; } }