forked from Mrs4s/MiraiGo
/
c2c_switch.go
82 lines (78 loc) · 2.3 KB
/
c2c_switch.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Code generated by internal/generator/c2c_switcher DO NOT EDIT.
package client
import (
"github.com/rhwong/MiraiGo/client/internal/network"
"github.com/rhwong/MiraiGo/client/pb/msg"
)
const (
UnknownDecoder = iota
nonSvcNotifyTroopSystemMsgDecoders
otherDecoders
privateMsgDecoders
sysMsgDecoders
troopSystemMsgDecoders
)
func peekC2CDecoder(msgType int32) (decoder func(*QQClient, *msg.Message, network.RequestParams), decoderType uint8) {
switch msgType {
case 9:
return privateMessageDecoder, privateMsgDecoders
case 10:
return privateMessageDecoder, privateMsgDecoders
case 31:
return privateMessageDecoder, privateMsgDecoders
case 33:
return troopAddMemberBroadcastDecoder, otherDecoders
case 35:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 36:
return troopSystemMessageDecoder, nonSvcNotifyTroopSystemMsgDecoders
case 37:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 45:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 46:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 79:
return privateMessageDecoder, privateMsgDecoders
case 84:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 85:
return troopSystemMessageDecoder, nonSvcNotifyTroopSystemMsgDecoders
case 86:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 87:
return troopSystemMessageDecoder, troopSystemMsgDecoders
case 97:
return privateMessageDecoder, privateMsgDecoders
case 120:
return privateMessageDecoder, privateMsgDecoders
case 132:
return privateMessageDecoder, privateMsgDecoders
case 133:
return privateMessageDecoder, privateMsgDecoders
case 140:
return tempSessionDecoder, privateMsgDecoders
case 141:
return tempSessionDecoder, privateMsgDecoders
case 166:
return privateMessageDecoder, privateMsgDecoders
case 167:
return privateMessageDecoder, privateMsgDecoders
case 187:
return systemMessageDecoder, sysMsgDecoders
case 188:
return systemMessageDecoder, sysMsgDecoders
case 189:
return systemMessageDecoder, sysMsgDecoders
case 190:
return systemMessageDecoder, sysMsgDecoders
case 191:
return systemMessageDecoder, sysMsgDecoders
case 208:
return privatePttDecoder, privateMsgDecoders
case 529:
return msgType0x211Decoder, otherDecoders
default:
return nil, UnknownDecoder
}
}