68 lines
1.8 KiB
TypeScript
68 lines
1.8 KiB
TypeScript
// This file has been automatically generated by writeMessageClasses.js
|
|
|
|
import { UUID } from '../UUID';
|
|
import { MessageFlags } from '../../enums/MessageFlags';
|
|
import { MessageBase } from '../MessageBase';
|
|
import { Message } from '../../enums/Message';
|
|
|
|
export class DataHomeLocationRequestMessage implements MessageBase
|
|
{
|
|
name = 'DataHomeLocationRequest';
|
|
messageFlags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
|
id = Message.DataHomeLocationRequest;
|
|
|
|
Info: {
|
|
AgentID: UUID;
|
|
KickedFromEstateID: number;
|
|
};
|
|
AgentInfo: {
|
|
AgentEffectiveMaturity: number;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return 24;
|
|
}
|
|
|
|
// @ts-ignore
|
|
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;
|
|
}
|
|
|
|
// @ts-ignore
|
|
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;
|
|
}
|
|
}
|
|
|