Packet descriptions
This commit is contained in:
46
lib/classes/packets/DirClassifiedReply.ts
Normal file
46
lib/classes/packets/DirClassifiedReply.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
// This file has been automatically generated by writePacketClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {Packet} from '../Packet';
|
||||
|
||||
export class DirClassifiedReplyPacket implements Packet
|
||||
{
|
||||
name = 'DirClassifiedReply';
|
||||
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
||||
id = 4294901801;
|
||||
|
||||
AgentData: {
|
||||
AgentID: UUID;
|
||||
};
|
||||
QueryData: {
|
||||
QueryID: UUID;
|
||||
};
|
||||
QueryReplies: {
|
||||
ClassifiedID: UUID;
|
||||
Name: string;
|
||||
ClassifiedFlags: number;
|
||||
CreationDate: number;
|
||||
ExpirationDate: number;
|
||||
PriceForListing: number;
|
||||
}[];
|
||||
StatusData: {
|
||||
Status: number;
|
||||
}[];
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return ((this.calculateVarVarSize(this.QueryReplies, 'Name', 1) + 29) * this.QueryReplies.length) + ((4) * this.StatusData.length) + 34;
|
||||
}
|
||||
|
||||
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