Beispiel #1
0
        public override void GetTargetData(IFreeformEntity_MsgTgt tgt, ref List <byte> buffer)
        {
            FFTgt_H2G_EFT_PinCheckReply tgt2 = tgt as FFTgt_H2G_EFT_PinCheckReply;

            buffer.Add(tgt2.ErrorCode);
            buffer.SetBCDValue(tgt2.PlayerCardNumber, 5);
            buffer.AddRange(tgt2.PlayerFlags.BytesValue);
            buffer.Add((byte)tgt2.DisplayMessageLength);
            buffer.AddRange(tgt2.DisplayMessage.GetASCIIBytesValue(tgt2.DisplayMessageLength));
        }
Beispiel #2
0
 internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
 {
     FFTgt_H2G_EFT_PinCheckReply tgt = new FFTgt_H2G_EFT_PinCheckReply();
     tgt.ErrorCode = buffer[0];
     tgt.PlayerCardNumber = FreeformHelper.GetBCDValueString(buffer, 0, 1, 5);
     tgt.PlayerFlags.BytesValue = FreeformHelper.GetRange(buffer, 5, 3);
     tgt.DisplayMessageLength = FreeformHelper.GetBytesToNumberUInt8(buffer, 8, 1);
     tgt.DisplayMessage = FreeformHelper.GetBCDValueString(buffer, 0, 9, 128);
     return tgt;
 }
Beispiel #3
0
        internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
        {
            FFTgt_H2G_EFT_PinCheckReply tgt = new FFTgt_H2G_EFT_PinCheckReply();

            tgt.ErrorCode              = buffer[0];
            tgt.PlayerCardNumber       = FreeformHelper.GetBCDValueString(buffer, 0, 1, 5);
            tgt.PlayerFlags.BytesValue = FreeformHelper.GetRange(buffer, 5, 3);
            tgt.DisplayMessageLength   = FreeformHelper.GetBytesToNumberUInt8(buffer, 8, 1);
            tgt.DisplayMessage         = FreeformHelper.GetBCDValueString(buffer, 0, 9, 128);
            return(tgt);
        }