Packet descriptions
This commit is contained in:
35
lib/classes/packets/RemoveNameValuePair.ts
Normal file
35
lib/classes/packets/RemoveNameValuePair.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class RemoveNameValuePairPacket implements Packet
|
||||
{
|
||||
name = 'RemoveNameValuePair';
|
||||
flags = MessageFlags.Trusted | MessageFlags.FrequencyLow;
|
||||
id = 4294902090;
|
||||
|
||||
TaskData: {
|
||||
ID: UUID;
|
||||
};
|
||||
NameValueData: {
|
||||
NVPair: string;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((this.calculateVarVarSize(this.NameValueData, 'NVPair', 2)) * this.NameValueData.length) + 17;
|
||||
}
|
||||
|
||||
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