42 lines
1.1 KiB
TypeScript
42 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 AvatarTextureUpdatePacket implements Packet
|
||
|
|
{
|
||
|
|
name = 'AvatarTextureUpdate';
|
||
|
|
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
||
|
|
id = 4294901764;
|
||
|
|
|
||
|
|
AgentData: {
|
||
|
|
AgentID: UUID;
|
||
|
|
TexturesChanged: boolean;
|
||
|
|
};
|
||
|
|
WearableData: {
|
||
|
|
CacheID: UUID;
|
||
|
|
TextureIndex: number;
|
||
|
|
HostName: string;
|
||
|
|
}[];
|
||
|
|
TextureData: {
|
||
|
|
TextureID: UUID;
|
||
|
|
}[];
|
||
|
|
|
||
|
|
getSize(): number
|
||
|
|
{
|
||
|
|
return ((this.calculateVarVarSize(this.WearableData, 'HostName', 1) + 17) * this.WearableData.length) + ((16) * this.TextureData.length) + 19;
|
||
|
|
}
|
||
|
|
|
||
|
|
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
||
|
|
{
|
||
|
|
let size = 0;
|
||
|
|
block.forEach((bl: any) =>
|
||
|
|
{
|
||
|
|
size += bl[paramName].length + extraPerVar;
|
||
|
|
});
|
||
|
|
return size;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|