This commit is contained in:
Akiba
2022-07-18 16:45:54 +08:00
parent 05e7746a47
commit e330ad54a0
2 changed files with 8 additions and 8 deletions

View File

@@ -11,21 +11,21 @@ type Enter struct {
ProtoVer int `json:"protover"`
Platform string `json:"platform"`
ClientVer string `json:"clientver"`
//Type int `json:"type"`
//Key string `json:"key"`
Type int `json:"type"`
Key string `json:"key"`
}
// NewEnterPacket 构造进入房间的包
// uid可以为0key不需要
func NewEnterPacket(uid int, roomID int) []byte {
func NewEnterPacket(uid int, roomID int, key string) []byte {
ent := &Enter{
UID: uid,
RoomID: roomID,
ProtoVer: 1,
ProtoVer: 2,
Platform: "web",
ClientVer: "1.6.3",
//Type: 2,
//Key: key,
ClientVer: "1.14.3",
Type: 2,
Key: key,
}
pkt := NewPlainPacket(RoomEnter, ent.Json())
upkt := pkt.Build()