public void Serialize(NetBitReader reader)
        {
            var isHardcoded = reader.ReadBoolean();

            if (isHardcoded)
            {
                uint nameIndex;
                if (reader.EngineNetworkVersion < EngineNetworkVersionHistory.HISTORY_CHANNEL_NAMES)
                {
                    nameIndex = reader.ReadUInt32();
                }
                else
                {
                    nameIndex = reader.ReadIntPacked();
                }

                Value = ((UnrealNames)nameIndex).ToString();

                return;
            }

            var inString = reader.ReadFString();
            var inNumber = reader.ReadInt32();

            Value = inString;
        }
예제 #2
0
        /*
         * private FRepMovement AsRepMovement()
         * {
         *  _reader.Reset();
         *
         *  FRepMovement repMovement = _reader.SerializeRepMovement();
         *
         *  if(_reader.IsError || !_reader.AtEnd())
         *  {
         *      return null;
         *  }
         *
         *  return repMovement;
         * }
         */

        private string AsStaticName()
        {
            _reader.Reset();

            var isHardcoded = _reader.ReadBoolean();

            if (isHardcoded)
            {
                uint nameIndex;
                if (_reader.EngineNetworkVersion < EngineNetworkVersionHistory.HISTORY_CHANNEL_NAMES)
                {
                    nameIndex = _reader.ReadUInt32();
                }
                else
                {
                    nameIndex = _reader.ReadIntPacked();
                }

                if (_reader.IsError || !_reader.AtEnd())
                {
                    return(null);
                }

                return(((UnrealNames)nameIndex).ToString());
            }

            var inString = _reader.ReadFString();
            var inNumber = _reader.ReadInt32();

            if (_reader.IsError || !_reader.AtEnd())
            {
                return(null);
            }

            return(inString);
        }