示例#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();
            }
        }
示例#2
0
        public void Read(ProtocolBufferReader reader)
        {
            SubtypeCheck();

            AccountId  = reader.ReadUInt();
            OneTimeKey = reader.ReadUInt();
            Version    = reader.ReadString();
        }
示例#3
0
        public void Read(ProtocolBufferReader reader)
        {
            switch (Subtype)
            {
            case CallServerMethodSubtype.UserMethodById:
            case CallServerMethodSubtype.SysUserMethodById:
            case CallServerMethodSubtype.ActorMethodById:
            case CallServerMethodSubtype.ChatMsgById:
            case CallServerMethodSubtype.WorldMsgById:
                MethodId = (GameOpcode)reader.ReadUInt();
                break;

            case CallServerMethodSubtype.UserMethodByName:
            case CallServerMethodSubtype.SysUSerMethodByName:
            case CallServerMethodSubtype.ActorMethodByName:
            case CallServerMethodSubtype.ChatMsgByName:
            case CallServerMethodSubtype.WorldMsgByName:
                MethodName = reader.ReadString();

                Debugger.Break();     // This isn't supported yet
                break;
            }

            _payload = reader.ReadArray();
        }
示例#4
0
        public void Read(ProtocolBufferReader reader)
        {
            switch (Subtype)
            {
            case LoginResponseMessageSubtype.Handoff:
                AccountId  = reader.ReadUInt();
                OneTimeKey = reader.ReadUInt();
                Address    = reader.ReadNetAddress();
                break;

            case LoginResponseMessageSubtype.HandoffFailed:
                ErrorCode = (LoginErrorCodes)reader.ReadUInt();
                break;

            case LoginResponseMessageSubtype.WaitForLogout:
                MillisecondsUntilLogin = reader.ReadUInt();
                break;

            case LoginResponseMessageSubtype.Success:
                AccountId = reader.ReadUInt();
                UnkUint   = reader.ReadUInt();
                break;

            case LoginResponseMessageSubtype.Failed:
                ErrorCode = (LoginErrorCodes)reader.ReadUInt();
                break;
            }

            UnkStr = reader.ReadString();
        }
        public void Read(ProtocolBufferReader reader)
        {
            switch (Subtype)
            {
            case CallServerMethodSubtype.UserMethodById:
            case CallServerMethodSubtype.SysUserMethodById:
            case CallServerMethodSubtype.ActorMethodById:
            case CallServerMethodSubtype.ChatMsgById:
            case CallServerMethodSubtype.WorldMsgById:
                MethodId = reader.ReadUInt();
                break;

            case CallServerMethodSubtype.UserMethodByName:
            case CallServerMethodSubtype.SysUSerMethodByName:
            case CallServerMethodSubtype.ActorMethodByName:
            case CallServerMethodSubtype.ChatMsgByName:
            case CallServerMethodSubtype.WorldMsgByName:
                MethodName = reader.ReadString();
                break;
            }

            Payload = reader.ReadArray();
        }
示例#6
0
 public void Read(ProtocolBufferReader reader)
 {
     Unknown = reader.ReadUInt();
 }
示例#7
0
 public void Read(ProtocolBufferReader reader)
 {
     ClientTime = reader.ReadUInt();
 }