43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
// 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;
|
|
}
|
|
|
|
}
|