65 lines
1.7 KiB
TypeScript
65 lines
1.7 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 DataHomeLocationRequestPacket implements Packet
|
|
{
|
|
name = 'DataHomeLocationRequest';
|
|
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
|
id = 4294901827;
|
|
|
|
Info: {
|
|
AgentID: UUID;
|
|
KickedFromEstateID: number;
|
|
};
|
|
AgentInfo: {
|
|
AgentEffectiveMaturity: number;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return 24;
|
|
}
|
|
|
|
writeToBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
this.Info['AgentID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
buf.writeUInt32LE(this.Info['KickedFromEstateID'], pos);
|
|
pos += 4;
|
|
buf.writeUInt32LE(this.AgentInfo['AgentEffectiveMaturity'], pos);
|
|
pos += 4;
|
|
return pos - startPos;
|
|
}
|
|
|
|
readFromBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
const newObjInfo: {
|
|
AgentID: UUID,
|
|
KickedFromEstateID: number
|
|
} = {
|
|
AgentID: UUID.zero(),
|
|
KickedFromEstateID: 0
|
|
};
|
|
newObjInfo['AgentID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
newObjInfo['KickedFromEstateID'] = buf.readUInt32LE(pos);
|
|
pos += 4;
|
|
this.Info = newObjInfo;
|
|
const newObjAgentInfo: {
|
|
AgentEffectiveMaturity: number
|
|
} = {
|
|
AgentEffectiveMaturity: 0
|
|
};
|
|
newObjAgentInfo['AgentEffectiveMaturity'] = buf.readUInt32LE(pos);
|
|
pos += 4;
|
|
this.AgentInfo = newObjAgentInfo;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
|