public override void GetTargetData(IFreeformEntity_MsgTgt tgt, ref List <byte> buffer) { FFTgt_H2G_SystemPrinter_CompVoucherRequest tgt2 = tgt as FFTgt_H2G_SystemPrinter_CompVoucherRequest; buffer.AddRange(tgt2.PlayerId.GetBCDToBytes(4)); buffer.AddRange(tgt2.PinNumber.GetBCDToBytes(4)); buffer.AddRange(tgt2.VoucherAmount.GetBCDToBytes(4)); }
internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer) { FFTgt_H2G_SystemPrinter_CompVoucherRequest tgt = new FFTgt_H2G_SystemPrinter_CompVoucherRequest(); tgt.PlayerId = buffer.GetBCDValueString(0, 0, 4); tgt.PinNumber = buffer.GetBCDValueString(0, 4, 3); tgt.VoucherAmount = buffer.GetBCDDoubleHexValue(7, buffer.Length); return(tgt); }
internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer) { FFTgt_H2G_SystemPrinter_CompVoucherRequest tgt = new FFTgt_H2G_SystemPrinter_CompVoucherRequest(); tgt.PlayerId = buffer.GetBCDValueString(0, 0, 4); tgt.PinNumber = buffer.GetBCDValueString(0, 4, 3); tgt.VoucherAmount = buffer.GetBCDDoubleHexValue(7, buffer.Length); return tgt; }