match服
This commit is contained in:
parent
8cbd113015
commit
d13e0069eb
@ -40,9 +40,17 @@ func (s *MatchService) getGameUser(uid int64) (*user.GameUser, pb.ErrCode) {
|
||||
func (s *MatchService) onMatchRoom(iMsg *ipb.InternalMsg, req *pb.C2SMatchRoom) {
|
||||
ksync.GoSafe(func() {
|
||||
// color game无需进入匹配队列
|
||||
switch pb.ServiceTypeId(req.PlayType) {
|
||||
playType := pb.ServiceTypeId(req.PlayType)
|
||||
switch playType {
|
||||
case pb.ServiceTypeId_STI_ColorGame:
|
||||
s.SendServiceMsg(service.TopicEx(iMsg.ServiceName), iMsg.ConnId, iMsg.UserId, int32(pb.MsgId_S2CMatchRoomId), req)
|
||||
node, err := s.bindService.RandServiceNode(playType)
|
||||
if err != nil {
|
||||
log.ErrorF("db service node error:%v", err)
|
||||
s.SendServiceMsg(service.TopicEx(iMsg.ServiceName), iMsg.ConnId, iMsg.UserId,
|
||||
int32(pb.MsgId_S2CMatchRoomId), &pb.S2CMatchRoom{Code: pb.ErrCode_SystemErr})
|
||||
return
|
||||
}
|
||||
s.SendServiceMsg(service.TopicEx(node.Name), iMsg.ConnId, iMsg.UserId, int32(pb.MsgId_C2SMatchRoomId), req)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user