Пример #1
0
        public void Read(ProtocolBufferReader reader)
        {
            EntityId = reader.ReadULong();

            switch (Subtype)
            {
            case CallMethodMessageSubtype.MethodId:
            case CallMethodMessageSubtype.UnkPlusMethodId:
                MethodId = (GameOpcode)reader.ReadUInt();
                break;

            case CallMethodMessageSubtype.MethodName:
            case CallMethodMessageSubtype.UnkPlusMethodName:
                MethodName = reader.ReadString();
                break;

            default:
                throw new Exception($"Invalid subtype ({Subtype}) for CallMethodMessage!");
            }

            reader.ReadArray(); // No need to properly implement this, it won't be called anyways, the Read function is only here for clarity

            if (Subtype == CallMethodMessageSubtype.UnkPlusMethodId || Subtype == CallMethodMessageSubtype.UnkPlusMethodName)
            {
                UnknownValue = reader.ReadUInt();
            }
        }
 public void Read(ProtocolBufferReader reader)
 {
     ChannelId        = reader.ReadByte();
     UnkMaybeEntityId = reader.ReadULong();
 }