41 lines
1012 B
TypeScript
41 lines
1012 B
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 AgentAnimationPacket implements Packet
|
|
{
|
|
name = 'AgentAnimation';
|
|
flags = MessageFlags.FrequencyHigh;
|
|
id = 5;
|
|
|
|
AgentData: {
|
|
AgentID: UUID;
|
|
SessionID: UUID;
|
|
};
|
|
AnimationList: {
|
|
AnimID: UUID;
|
|
StartAnim: boolean;
|
|
}[];
|
|
PhysicalAvatarEventList: {
|
|
TypeData: string;
|
|
}[];
|
|
|
|
getSize(): number
|
|
{
|
|
return ((17) * this.AnimationList.length) + ((this.calculateVarVarSize(this.PhysicalAvatarEventList, 'TypeData', 1)) * this.PhysicalAvatarEventList.length) + 34;
|
|
}
|
|
|
|
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
|
{
|
|
let size = 0;
|
|
block.forEach((bl: any) =>
|
|
{
|
|
size += bl[paramName].length + extraPerVar;
|
|
});
|
|
return size;
|
|
}
|
|
|
|
}
|