44 lines
1.1 KiB
TypeScript
44 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 GroupAccountDetailsReplyPacket implements Packet
|
|
{
|
|
name = 'GroupAccountDetailsReply';
|
|
flags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
|
id = 4294902116;
|
|
|
|
AgentData: {
|
|
AgentID: UUID;
|
|
GroupID: UUID;
|
|
};
|
|
MoneyData: {
|
|
RequestID: UUID;
|
|
IntervalDays: number;
|
|
CurrentInterval: number;
|
|
StartDate: string;
|
|
};
|
|
HistoryData: {
|
|
Description: string;
|
|
Amount: number;
|
|
}[];
|
|
|
|
getSize(): number
|
|
{
|
|
return (this.MoneyData['StartDate'].length + 1) + ((this.calculateVarVarSize(this.HistoryData, 'Description', 1) + 4) * this.HistoryData.length) + 57;
|
|
}
|
|
|
|
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
|
{
|
|
let size = 0;
|
|
block.forEach((bl: any) =>
|
|
{
|
|
size += bl[paramName].length + extraPerVar;
|
|
});
|
|
return size;
|
|
}
|
|
|
|
}
|