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

            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_BalanceResponse tgt = new FFTgt_H2G_EFT_BalanceResponse();
     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_BalanceResponse tgt = new FFTgt_H2G_EFT_BalanceResponse();

            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);
        }