Packet descriptions
This commit is contained in:
38
lib/classes/packets/MultipleObjectUpdate.ts
Normal file
38
lib/classes/packets/MultipleObjectUpdate.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class MultipleObjectUpdatePacket implements Packet
|
||||
{
|
||||
name = 'MultipleObjectUpdate';
|
||||
flags = MessageFlags.Zerocoded | MessageFlags.FrequencyMedium;
|
||||
id = 65282;
|
||||
|
||||
AgentData: {
|
||||
AgentID: UUID;
|
||||
SessionID: UUID;
|
||||
};
|
||||
ObjectData: {
|
||||
ObjectLocalID: number;
|
||||
Type: number;
|
||||
Data: string;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((this.calculateVarVarSize(this.ObjectData, 'Data', 1) + 5) * this.ObjectData.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