Packet descriptions
This commit is contained in:
46
lib/classes/packets/GroupRoleDataReply.ts
Normal file
46
lib/classes/packets/GroupRoleDataReply.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import Long = require('long');
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class GroupRoleDataReplyPacket implements Packet
|
||||
{
|
||||
name = 'GroupRoleDataReply';
|
||||
flags = MessageFlags.Trusted | MessageFlags.FrequencyLow;
|
||||
id = 4294902132;
|
||||
|
||||
AgentData: {
|
||||
AgentID: UUID;
|
||||
};
|
||||
GroupData: {
|
||||
GroupID: UUID;
|
||||
RequestID: UUID;
|
||||
RoleCount: number;
|
||||
};
|
||||
RoleData: {
|
||||
RoleID: UUID;
|
||||
Name: string;
|
||||
Title: string;
|
||||
Description: string;
|
||||
Powers: Long;
|
||||
Members: number;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((this.calculateVarVarSize(this.RoleData, 'Name', 1) + this.calculateVarVarSize(this.RoleData, 'Title', 1) + this.calculateVarVarSize(this.RoleData, 'Description', 1) + 28) * this.RoleData.length) + 53;
|
||||
}
|
||||
|
||||
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
||||
{
|
||||
let size = 0;
|
||||
block.forEach((bl: any) =>
|
||||
{
|
||||
size += bl[paramName].length + extraPerVar;
|
||||
});
|
||||
return size;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user