Packet descriptions
This commit is contained in:
42
lib/classes/packets/AvatarAnimation.ts
Normal file
42
lib/classes/packets/AvatarAnimation.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class AvatarAnimationPacket implements Packet
|
||||
{
|
||||
name = 'AvatarAnimation';
|
||||
flags = MessageFlags.Trusted | MessageFlags.FrequencyHigh;
|
||||
id = 20;
|
||||
|
||||
Sender: {
|
||||
ID: UUID;
|
||||
};
|
||||
AnimationList: {
|
||||
AnimID: UUID;
|
||||
AnimSequenceID: number;
|
||||
}[];
|
||||
AnimationSourceList: {
|
||||
ObjectID: UUID;
|
||||
}[];
|
||||
PhysicalAvatarEventList: {
|
||||
TypeData: string;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((20) * this.AnimationList.length) + ((16) * this.AnimationSourceList.length) + ((this.calculateVarVarSize(this.PhysicalAvatarEventList, 'TypeData', 1)) * this.PhysicalAvatarEventList.length) + 19;
|
||||
}
|
||||
|
||||
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