46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
// 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 AvatarGroupsReplyPacket implements Packet
|
|
{
|
|
name = 'AvatarGroupsReply';
|
|
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
|
id = 4294901933;
|
|
|
|
AgentData: {
|
|
AgentID: UUID;
|
|
AvatarID: UUID;
|
|
};
|
|
GroupData: {
|
|
GroupPowers: Long;
|
|
AcceptNotices: boolean;
|
|
GroupTitle: string;
|
|
GroupID: UUID;
|
|
GroupName: string;
|
|
GroupInsigniaID: UUID;
|
|
}[];
|
|
NewGroupData: {
|
|
ListInProfile: boolean;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return ((this.calculateVarVarSize(this.GroupData, 'GroupTitle', 1) + this.calculateVarVarSize(this.GroupData, 'GroupName', 1) + 41) * this.GroupData.length) + 34;
|
|
}
|
|
|
|
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
|
{
|
|
let size = 0;
|
|
block.forEach((bl: any) =>
|
|
{
|
|
size += bl[paramName].length + extraPerVar;
|
|
});
|
|
return size;
|
|
}
|
|
|
|
}
|