47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
// This file has been automatically generated by writeMessageClasses.js
|
|
|
|
import { MessageFlags } from '../../enums/MessageFlags';
|
|
import { MessageBase } from '../MessageBase';
|
|
import { Message } from '../../enums/Message';
|
|
|
|
export class TeleportStartMessage implements MessageBase
|
|
{
|
|
name = 'TeleportStart';
|
|
messageFlags = MessageFlags.Trusted | MessageFlags.FrequencyLow;
|
|
id = Message.TeleportStart;
|
|
|
|
Info: {
|
|
TeleportFlags: number;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return 4;
|
|
}
|
|
|
|
// @ts-ignore
|
|
writeToBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
buf.writeUInt32LE(this.Info['TeleportFlags'], pos);
|
|
pos += 4;
|
|
return pos - startPos;
|
|
}
|
|
|
|
// @ts-ignore
|
|
readFromBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
const newObjInfo: {
|
|
TeleportFlags: number
|
|
} = {
|
|
TeleportFlags: 0
|
|
};
|
|
newObjInfo['TeleportFlags'] = buf.readUInt32LE(pos);
|
|
pos += 4;
|
|
this.Info = newObjInfo;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
|