feat 排队

This commit is contained in:
2026-01-06 18:36:19 +08:00
parent fdb4798b36
commit 2e1a418485
10 changed files with 214 additions and 34 deletions

View File

@@ -10,6 +10,34 @@ import (
"time"
)
type LoginSuccess struct {
}
func (_ *LoginSuccess) Handle(data []byte, client *Client) {
msg := &sc_pb.S2C_LoginSuccess{}
if err := proto.Unmarshal(data, msg); err != nil {
log.Errorf("handle msg error")
client.Stop()
return
}
_ = client.WriteMessage(sc_pb.MessageID_MESSAGE_ID_ENTER_INSTANCE, &sc_pb.C2S_EnterInstance{
InstanceID: msg.InstanceID,
})
}
type QueueUp struct {
}
func (_ *QueueUp) Handle(data []byte, client *Client) {
msg := &sc_pb.S2C_QueueUp{}
if err := proto.Unmarshal(data, msg); err != nil {
log.Errorf("handle msg error")
client.Stop()
return
}
}
type EnterInstance struct {
}