Packet descriptions
This commit is contained in:
39
lib/classes/packets/UpdateInventoryFolder.ts
Normal file
39
lib/classes/packets/UpdateInventoryFolder.ts
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user