Packet descriptions
This commit is contained in:
34
lib/classes/packets/UUIDNameReply.ts
Normal file
34
lib/classes/packets/UUIDNameReply.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class UUIDNameReplyPacket implements Packet
|
||||
{
|
||||
name = 'UUIDNameReply';
|
||||
flags = MessageFlags.Trusted | MessageFlags.FrequencyLow;
|
||||
id = 4294901996;
|
||||
|
||||
UUIDNameBlock: {
|
||||
ID: UUID;
|
||||
FirstName: string;
|
||||
LastName: string;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((this.calculateVarVarSize(this.UUIDNameBlock, 'FirstName', 1) + this.calculateVarVarSize(this.UUIDNameBlock, 'LastName', 1) + 16) * this.UUIDNameBlock.length) + 1;
|
||||
}
|
||||
|
||||
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