Packet descriptions
This commit is contained in:
41
lib/classes/packets/AvatarTextureUpdate.ts
Normal file
41
lib/classes/packets/AvatarTextureUpdate.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
// 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user