Packet descriptions

This commit is contained in:
Casper Warden
2017-11-24 03:32:37 +00:00
parent 0325c51f40
commit cbfb54d4fe
478 changed files with 14551 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
// This file has been automatically generated by writePacketClasses.js
import {UUID} from '../UUID';
import {MessageFlags} from '../../enums/MessageFlags';
import {Packet} from '../Packet';
export class UpdateInventoryFolderPacket implements Packet
{
name = 'UpdateInventoryFolder';
flags = MessageFlags.FrequencyLow;
id = 4294902034;
AgentData: {
AgentID: UUID;
SessionID: UUID;
};
FolderData: {
FolderID: UUID;
ParentID: UUID;
Type: number;
Name: string;
}[];
getSize(): number
{
return ((this.calculateVarVarSize(this.FolderData, 'Name', 1) + 33) * this.FolderData.length) + 33;
}
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
{
let size = 0;
block.forEach((bl: any) =>
{
size += bl[paramName].length + extraPerVar;
});
return size;
}
}