Пример #1
0
        public override void GetTargetData(IFreeformEntity_MsgTgt tgt, ref List <byte> buffer)
        {
            FFTgt_H2G_EFT_PlayerEnable tgt2 = tgt as FFTgt_H2G_EFT_PlayerEnable;

            buffer.SetBCDValue(tgt2.PlayerCardNumber, 5);
            buffer.AddRange(tgt2.PlayerFlags.BytesValue);
            buffer.Add((byte)tgt2.DisplayMessageLength);
            buffer.AddRange(tgt2.DisplayMessage.GetASCIIBytesValue(tgt2.DisplayMessageLength));
        }
Пример #2
0
 internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
 {
     FFTgt_H2G_EFT_PlayerEnable tgt = new FFTgt_H2G_EFT_PlayerEnable();
     tgt.PlayerCardNumber = FreeformHelper.GetBCDValueString(buffer, 0, 0, 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;
 }
Пример #3
0
        internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
        {
            FFTgt_H2G_EFT_PlayerEnable tgt = new FFTgt_H2G_EFT_PlayerEnable();

            tgt.PlayerCardNumber       = FreeformHelper.GetBCDValueString(buffer, 0, 0, 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);
        }