Commit generated files
This commit is contained in:
43
dist/classes/packets/JoinGroupReply.js
vendored
Normal file
43
dist/classes/packets/JoinGroupReply.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const UUID_1 = require("../UUID");
|
||||
const MessageFlags_1 = require("../../enums/MessageFlags");
|
||||
class JoinGroupReplyPacket {
|
||||
constructor() {
|
||||
this.name = 'JoinGroupReply';
|
||||
this.flags = MessageFlags_1.MessageFlags.Trusted | MessageFlags_1.MessageFlags.FrequencyLow;
|
||||
this.id = 4294902104;
|
||||
}
|
||||
getSize() {
|
||||
return 33;
|
||||
}
|
||||
writeToBuffer(buf, pos) {
|
||||
const startPos = pos;
|
||||
this.AgentData['AgentID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
this.GroupData['GroupID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
buf.writeUInt8((this.GroupData['Success']) ? 1 : 0, pos++);
|
||||
return pos - startPos;
|
||||
}
|
||||
readFromBuffer(buf, pos) {
|
||||
const startPos = pos;
|
||||
const newObjAgentData = {
|
||||
AgentID: UUID_1.UUID.zero()
|
||||
};
|
||||
newObjAgentData['AgentID'] = new UUID_1.UUID(buf, pos);
|
||||
pos += 16;
|
||||
this.AgentData = newObjAgentData;
|
||||
const newObjGroupData = {
|
||||
GroupID: UUID_1.UUID.zero(),
|
||||
Success: false
|
||||
};
|
||||
newObjGroupData['GroupID'] = new UUID_1.UUID(buf, pos);
|
||||
pos += 16;
|
||||
newObjGroupData['Success'] = (buf.readUInt8(pos++) === 1);
|
||||
this.GroupData = newObjGroupData;
|
||||
return pos - startPos;
|
||||
}
|
||||
}
|
||||
exports.JoinGroupReplyPacket = JoinGroupReplyPacket;
|
||||
//# sourceMappingURL=JoinGroupReply.js.map
|
||||
Reference in New Issue
Block a user