68 lines
1.8 KiB
TypeScript
68 lines
1.8 KiB
TypeScript
// This file has been automatically generated by writeMessageClasses.js
|
|
|
|
import { UUID } from '../UUID';
|
|
import { MessageFlags } from '../../enums/MessageFlags';
|
|
import { MessageBase } from '../MessageBase';
|
|
import { Message } from '../../enums/Message';
|
|
|
|
export class MoneyBalanceRequestMessage implements MessageBase
|
|
{
|
|
name = 'MoneyBalanceRequest';
|
|
messageFlags = MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
|
id = Message.MoneyBalanceRequest;
|
|
|
|
AgentData: {
|
|
AgentID: UUID;
|
|
SessionID: UUID;
|
|
};
|
|
MoneyData: {
|
|
TransactionID: UUID;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return 48;
|
|
}
|
|
|
|
// @ts-ignore
|
|
writeToBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
this.AgentData['AgentID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
this.AgentData['SessionID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
this.MoneyData['TransactionID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
return pos - startPos;
|
|
}
|
|
|
|
// @ts-ignore
|
|
readFromBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
const newObjAgentData: {
|
|
AgentID: UUID,
|
|
SessionID: UUID
|
|
} = {
|
|
AgentID: UUID.zero(),
|
|
SessionID: UUID.zero()
|
|
};
|
|
newObjAgentData['AgentID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
newObjAgentData['SessionID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
this.AgentData = newObjAgentData;
|
|
const newObjMoneyData: {
|
|
TransactionID: UUID
|
|
} = {
|
|
TransactionID: UUID.zero()
|
|
};
|
|
newObjMoneyData['TransactionID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
this.MoneyData = newObjMoneyData;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
|