31 lines
976 B
JavaScript
31 lines
976 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const MessageFlags_1 = require("../../enums/MessageFlags");
|
|
class TeleportStartPacket {
|
|
constructor() {
|
|
this.name = 'TeleportStart';
|
|
this.flags = MessageFlags_1.MessageFlags.Trusted | MessageFlags_1.MessageFlags.FrequencyLow;
|
|
this.id = 4294901833;
|
|
}
|
|
getSize() {
|
|
return 4;
|
|
}
|
|
writeToBuffer(buf, pos) {
|
|
const startPos = pos;
|
|
buf.writeUInt32LE(this.Info['TeleportFlags'], pos);
|
|
pos += 4;
|
|
return pos - startPos;
|
|
}
|
|
readFromBuffer(buf, pos) {
|
|
const startPos = pos;
|
|
const newObjInfo = {
|
|
TeleportFlags: 0
|
|
};
|
|
newObjInfo['TeleportFlags'] = buf.readUInt32LE(pos);
|
|
pos += 4;
|
|
this.Info = newObjInfo;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
exports.TeleportStartPacket = TeleportStartPacket;
|
|
//# sourceMappingURL=TeleportStart.js.map
|