Packet descriptions
This commit is contained in:
44
lib/classes/packets/ScriptDialog.ts
Normal file
44
lib/classes/packets/ScriptDialog.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class ScriptDialogPacket implements Packet
|
||||
{
|
||||
name = 'ScriptDialog';
|
||||
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
||||
id = 4294901950;
|
||||
|
||||
Data: {
|
||||
ObjectID: UUID;
|
||||
FirstName: string;
|
||||
LastName: string;
|
||||
ObjectName: string;
|
||||
Message: string;
|
||||
ChatChannel: number;
|
||||
ImageID: UUID;
|
||||
};
|
||||
Buttons: {
|
||||
ButtonLabel: string;
|
||||
}[];
|
||||
OwnerData: {
|
||||
OwnerID: UUID;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return (this.Data['FirstName'].length + 1 + this.Data['LastName'].length + 1 + this.Data['ObjectName'].length + 1 + this.Data['Message'].length + 2) + ((this.calculateVarVarSize(this.Buttons, 'ButtonLabel', 1)) * this.Buttons.length) + ((16) * this.OwnerData.length) + 38;
|
||||
}
|
||||
|
||||
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