修改bug
This commit is contained in:
parent
b596e502ee
commit
e7cb90ed63
@ -159,7 +159,7 @@ func (r *BaseRoom[Seat]) SendMsg(user IPlayer, msgId pb.MsgId, msg proto.Message
|
|||||||
user.Robot().OnMessage(msgId, msg)
|
user.Robot().OnMessage(msgId, msg)
|
||||||
} else {
|
} else {
|
||||||
iMsg := ipb.MakeMsgEx(r.srv.Name(), 0, user.Id(), int32(msgId), msg)
|
iMsg := ipb.MakeMsgEx(r.srv.Name(), 0, user.Id(), int32(msgId), msg)
|
||||||
_ = r.srv.Send(user.GateTopicName(), iMsg)
|
_ = r.srv.SendByTopic(user.GateTopicName(), iMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ func (r *HundredRoom) SendMsg(user IPlayer, msgId pb.MsgId, msg proto.Message) {
|
|||||||
user.Robot().OnMessage(msgId, msg)
|
user.Robot().OnMessage(msgId, msg)
|
||||||
} else {
|
} else {
|
||||||
iMsg := ipb.MakeMsgEx(r.room.srv.Name(), 0, user.Id(), int32(msgId), msg)
|
iMsg := ipb.MakeMsgEx(r.room.srv.Name(), 0, user.Id(), int32(msgId), msg)
|
||||||
_ = r.room.srv.Send(user.GateTopicName(), iMsg)
|
_ = r.room.srv.SendByTopic(user.GateTopicName(), iMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,18 @@ package gameService
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"game/common/config"
|
||||||
|
"game/common/constant"
|
||||||
"game/common/proto/pb"
|
"game/common/proto/pb"
|
||||||
"game/common/userBindService"
|
"game/common/userBindService"
|
||||||
"game/server/colorgame/model"
|
"game/common/utils"
|
||||||
|
"github.com/fox/fox/db"
|
||||||
"github.com/fox/fox/etcd"
|
"github.com/fox/fox/etcd"
|
||||||
"github.com/fox/fox/ipb"
|
"github.com/fox/fox/ipb"
|
||||||
"github.com/fox/fox/log"
|
"github.com/fox/fox/log"
|
||||||
"github.com/fox/fox/processor"
|
"github.com/fox/fox/processor"
|
||||||
"github.com/fox/fox/service"
|
"github.com/fox/fox/service"
|
||||||
|
"github.com/go-redis/redis/v8"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -20,7 +24,7 @@ type GameService struct {
|
|||||||
bindService *userBindService.UserBindService
|
bindService *userBindService.UserBindService
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGameService(param *service.InitNatsServiceParams) *GameService {
|
func NewGameService(param *service.InitNatsServiceParams, cfgRedis *config.Redis) *GameService {
|
||||||
var err error
|
var err error
|
||||||
s := new(GameService)
|
s := new(GameService)
|
||||||
s.NatsService, err = service.NewNatsService(param)
|
s.NatsService, err = service.NewNatsService(param)
|
||||||
@ -28,7 +32,14 @@ func NewGameService(param *service.InitNatsServiceParams) *GameService {
|
|||||||
log.Fatal(err.Error())
|
log.Fatal(err.Error())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
s.bindService = userBindService.NewUserBindService(model.UserBindServiceRedis, s.ServiceEtcd())
|
var userBindServiceRedis *redis.Client
|
||||||
|
userBindServiceRedis, err = db.InitRedis(cfgRedis.Password, cfgRedis.Host, cfgRedis.Port, constant.Redis3UserBindService)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err.Error())
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
utils.AutoSetRedisPool(userBindServiceRedis)
|
||||||
|
s.bindService = userBindService.NewUserBindService(userBindServiceRedis, s.ServiceEtcd())
|
||||||
s.processor = processor.NewProcessor()
|
s.processor = processor.NewProcessor()
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
@ -65,9 +76,13 @@ func (s *GameService) SendServiceMsg(sid pb.ServiceTypeId, userId int64, msgId i
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
topic := service.TopicEx(node.Name)
|
topic := service.TopicEx(node.Name)
|
||||||
|
s.SendServiceMsgByTopic(topic, 0, userId, msgId, msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *GameService) SendServiceMsgByTopic(topic string, connId uint32, userId int64, msgId int32, msg proto.Message) {
|
||||||
log.DebugF("send to:%v msg id:%v, msg:%v", topic, pb.MsgId(msgId), msg.String())
|
log.DebugF("send to:%v msg id:%v, msg:%v", topic, pb.MsgId(msgId), msg.String())
|
||||||
data, _ := proto.Marshal(msg)
|
data, _ := proto.Marshal(msg)
|
||||||
s.SendServiceData(topic, 0, userId, msgId, data)
|
s.SendServiceData(topic, connId, userId, msgId, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 向内部服务发送消息
|
// 向内部服务发送消息
|
||||||
|
@ -10,20 +10,20 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
UserBindServiceRedis *redis.Client
|
//UserBindServiceRedis *redis.Client
|
||||||
UserRedis *redis.Client
|
UserRedis *redis.Client
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitRedis() {
|
func InitRedis() {
|
||||||
log.Debug("init redis")
|
log.Debug("init redis")
|
||||||
var err error
|
var err error
|
||||||
cfg := &config.Cfg.Redis
|
cfg := &config.Cfg.Redis
|
||||||
UserBindServiceRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis3UserBindService)
|
//UserBindServiceRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis3UserBindService)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Fatal(err.Error())
|
// log.Fatal(err.Error())
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
utils.AutoSetRedisPool(UserBindServiceRedis)
|
//utils.AutoSetRedisPool(UserBindServiceRedis)
|
||||||
|
|
||||||
UserRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis1User)
|
UserRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis1User)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -58,7 +58,7 @@ func newColorService(serviceId int) service.IService {
|
|||||||
OnFunc: s,
|
OnFunc: s,
|
||||||
TypeId: int(pb.ServiceTypeId_STI_ColorGame),
|
TypeId: int(pb.ServiceTypeId_STI_ColorGame),
|
||||||
Version: config.Cfg.BuildDate,
|
Version: config.Cfg.BuildDate,
|
||||||
})
|
}, &config.Cfg.Redis)
|
||||||
s.initProcessor()
|
s.initProcessor()
|
||||||
|
|
||||||
s.playerMgr = baseroom.NewPlayerMgr(nil)
|
s.playerMgr = baseroom.NewPlayerMgr(nil)
|
||||||
|
@ -1,22 +1,13 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
//var UserBindServiceRedis *redis.Client
|
||||||
"game/common/constant"
|
//var err error
|
||||||
"game/common/utils"
|
|
||||||
"game/server/gate/config"
|
|
||||||
"github.com/fox/fox/db"
|
|
||||||
"github.com/fox/fox/log"
|
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
)
|
|
||||||
|
|
||||||
var UserBindServiceRedis *redis.Client
|
|
||||||
var err error
|
|
||||||
|
|
||||||
func InitRedis() {
|
func InitRedis() {
|
||||||
UserBindServiceRedis, err = db.InitRedis(config.Cfg.Redis.Password, config.Cfg.Redis.Host, config.Cfg.Redis.Port, constant.Redis3UserBindService)
|
//UserBindServiceRedis, err = db.InitRedis(config.Cfg.Redis.Password, config.Cfg.Redis.Host, config.Cfg.Redis.Port, constant.Redis3UserBindService)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Fatal(err.Error())
|
// log.Fatal(err.Error())
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
utils.AutoSetRedisPool(UserBindServiceRedis)
|
//utils.AutoSetRedisPool(UserBindServiceRedis)
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ func (s *GateService) onUserLogin(iMsg *ipb.InternalMsg, conn ws.IConn, msg *pb.
|
|||||||
if sName != "" && sName != s.Name() {
|
if sName != "" && sName != s.Name() {
|
||||||
s.SendServiceMsg(service.TopicEx(sName), conn, int32(pb.MsgId_RspUserLogoutId), &pb.RspUserLogout{Code: pb.ErrCode_LoginDiffLoc})
|
s.SendServiceMsg(service.TopicEx(sName), conn, int32(pb.MsgId_RspUserLogoutId), &pb.RspUserLogout{Code: pb.ErrCode_LoginDiffLoc})
|
||||||
}
|
}
|
||||||
|
s.BindService().SaveUserService(msg.UserId, pb.ServiceTypeId_STI_Gate, s.Name())
|
||||||
// 广播玩家上线
|
// 广播玩家上线
|
||||||
s.SendServiceMsg(topicName.UserOnline, conn, int32(pb.MsgId_NtfUserOnlineId), &pb.NtfUserOnline{UserId: msg.UserId})
|
s.SendServiceMsg(topicName.UserOnline, conn, int32(pb.MsgId_NtfUserOnlineId), &pb.NtfUserOnline{UserId: msg.UserId})
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ func newGateService(serviceId int) *GateService {
|
|||||||
OnFunc: s,
|
OnFunc: s,
|
||||||
TypeId: int(pb.ServiceTypeId_STI_Gate),
|
TypeId: int(pb.ServiceTypeId_STI_Gate),
|
||||||
Version: config.Cfg.BuildDate,
|
Version: config.Cfg.BuildDate,
|
||||||
})
|
}, &config.Cfg.Redis)
|
||||||
|
|
||||||
addressPos := serviceId - config.Command.ServiceId
|
addressPos := serviceId - config.Command.ServiceId
|
||||||
if len(config.GateCfg.Address) <= addressPos {
|
if len(config.GateCfg.Address) <= addressPos {
|
||||||
|
@ -1,20 +1,17 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
var (
|
||||||
"game/common/constant"
|
// UserRedis *redis.Client
|
||||||
"game/server/lobby/config"
|
// UserDB *gorm.DB
|
||||||
"github.com/fox/fox/db"
|
// LogDB *gorm.DB
|
||||||
"github.com/fox/fox/log"
|
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var UserRedis *redis.Client
|
//var err error
|
||||||
var err error
|
|
||||||
|
|
||||||
func InitRedis() {
|
func InitRedis() {
|
||||||
UserRedis, err = db.InitRedis(config.Cfg.Redis.Password, config.Cfg.Redis.Host, config.Cfg.Redis.Port, constant.Redis1User)
|
//UserRedis, err = db.InitRedis(config.Cfg.Redis.Password, config.Cfg.Redis.Host, config.Cfg.Redis.Port, constant.Redis1User)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Fatal(err.Error())
|
// log.Fatal(err.Error())
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ func newLobbyService(serviceId int) *LobbyService {
|
|||||||
OnFunc: s,
|
OnFunc: s,
|
||||||
TypeId: int(pb.ServiceTypeId_STI_Lobby),
|
TypeId: int(pb.ServiceTypeId_STI_Lobby),
|
||||||
Version: config.Cfg.BuildDate,
|
Version: config.Cfg.BuildDate,
|
||||||
})
|
}, &config.Cfg.Redis)
|
||||||
|
|
||||||
s.initProcessor()
|
s.initProcessor()
|
||||||
s.OnInit()
|
s.OnInit()
|
||||||
|
@ -1,30 +1,25 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/common/constant"
|
|
||||||
"game/common/utils"
|
|
||||||
"game/server/login/config"
|
|
||||||
"github.com/fox/fox/db"
|
|
||||||
"github.com/fox/fox/log"
|
"github.com/fox/fox/log"
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
UserBindServiceRedis *redis.Client
|
// UserBindServiceRedis *redis.Client
|
||||||
// UserDB *gorm.DB
|
// UserDB *gorm.DB
|
||||||
// LogDB *gorm.DB
|
// LogDB *gorm.DB
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitRedis() {
|
func InitRedis() {
|
||||||
log.Debug("init redis")
|
log.Debug("init redis")
|
||||||
var err error
|
//var err error
|
||||||
cfg := &config.Cfg.Redis
|
//cfg := &config.Cfg.Redis
|
||||||
UserBindServiceRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis3UserBindService)
|
//UserBindServiceRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis3UserBindService)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Fatal(err.Error())
|
// log.Fatal(err.Error())
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
utils.AutoSetRedisPool(UserBindServiceRedis)
|
//utils.AutoSetRedisPool(UserBindServiceRedis)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -13,7 +13,6 @@ import (
|
|||||||
"github.com/fox/fox/processor"
|
"github.com/fox/fox/processor"
|
||||||
"github.com/fox/fox/service"
|
"github.com/fox/fox/service"
|
||||||
"github.com/fox/fox/xrand"
|
"github.com/fox/fox/xrand"
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -153,9 +152,7 @@ func (s *LoginService) onLoginOrRegister(iMsg *ipb.InternalMsg, req *pb.ReqUserL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
topic := service.TopicEx(iMsg.ServiceName)
|
topic := service.TopicEx(iMsg.ServiceName)
|
||||||
log.DebugF("send to:%v msg id:%v, msg:%v", topic, pb.MsgId_RspUserLoginId, rsp.String())
|
s.SendServiceMsgByTopic(topic, iMsg.ConnId, userId, int32(pb.MsgId_RspUserLoginId), rsp)
|
||||||
data, _ := proto.Marshal(rsp)
|
|
||||||
s.SendServiceData(topic, iMsg.ConnId, userId, int32(pb.MsgId_RspUserLoginId), data)
|
|
||||||
|
|
||||||
if account != nil && account.ID > 0 {
|
if account != nil && account.ID > 0 {
|
||||||
loginLog := &user.UserLoginLog{
|
loginLog := &user.UserLoginLog{
|
||||||
|
@ -52,7 +52,7 @@ func newLoginService(serviceId int) *LoginService {
|
|||||||
OnFunc: s,
|
OnFunc: s,
|
||||||
TypeId: int(pb.ServiceTypeId_STI_Login),
|
TypeId: int(pb.ServiceTypeId_STI_Login),
|
||||||
Version: config.Cfg.BuildDate,
|
Version: config.Cfg.BuildDate,
|
||||||
})
|
}, &config.Cfg.Redis)
|
||||||
|
|
||||||
s.initProcessor()
|
s.initProcessor()
|
||||||
s.OnInit()
|
s.OnInit()
|
||||||
|
@ -1,38 +1,27 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/common/constant"
|
|
||||||
"game/common/utils"
|
|
||||||
"game/server/match/config"
|
|
||||||
"github.com/fox/fox/db"
|
|
||||||
"github.com/fox/fox/log"
|
"github.com/fox/fox/log"
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
UserBindServiceRedis *redis.Client
|
// UserBindServiceRedis *redis.Client
|
||||||
ConfigRedis *redis.Client
|
// ConfigRedis *redis.Client
|
||||||
// UserDB *gorm.DB
|
// UserDB *gorm.DB
|
||||||
// LogDB *gorm.DB
|
// LogDB *gorm.DB
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitRedis() {
|
func InitRedis() {
|
||||||
log.Debug("init redis")
|
log.Debug("init redis")
|
||||||
var err error
|
//var err error
|
||||||
cfg := &config.Cfg.Redis
|
//cfg := &config.Cfg.Redis
|
||||||
UserBindServiceRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis3UserBindService)
|
//UserBindServiceRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis3UserBindService)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Fatal(err.Error())
|
// log.Fatal(err.Error())
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
utils.AutoSetRedisPool(UserBindServiceRedis)
|
//utils.AutoSetRedisPool(UserBindServiceRedis)
|
||||||
|
|
||||||
ConfigRedis, err = db.InitRedis(cfg.Password, cfg.Host, cfg.Port, constant.Redis0Config)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err.Error())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
utils.AutoSetRedisPool(UserBindServiceRedis)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -18,25 +18,23 @@ func (s *MatchService) onMatchRoom(iMsg *ipb.InternalMsg, req *pb.ReqMatchRoom)
|
|||||||
gameId := req.GameId
|
gameId := req.GameId
|
||||||
switch gameId {
|
switch gameId {
|
||||||
case pb.ServiceTypeId_STI_ColorGame:
|
case pb.ServiceTypeId_STI_ColorGame:
|
||||||
node, err := s.bindService.FindServiceNode(gameId, iMsg.UserId)
|
node, err := s.BindService().FindServiceNode(gameId, iMsg.UserId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.ErrorF("db service node error:%v", err)
|
log.ErrorF("db service node error:%v", err)
|
||||||
s.SendServiceMsg(iMsg.ServiceName, service.TopicEx(iMsg.ServiceName), iMsg.ConnId, iMsg.UserId,
|
s.SendServiceMsg(pb.ServiceTypeId_STI_Gate, iMsg.UserId, int32(pb.MsgId_RspMatchRoomId), &pb.RspMatchRoom{Code: pb.ErrCode_SystemErr})
|
||||||
int32(pb.MsgId_RspMatchRoomId), &pb.RspMatchRoom{Code: pb.ErrCode_SystemErr})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.SendServiceMsg(iMsg.ServiceName, service.TopicEx(iMsg.ServiceName), iMsg.ConnId, iMsg.UserId,
|
s.SendServiceMsg(pb.ServiceTypeId_STI_Gate, iMsg.UserId, int32(pb.MsgId_RspMatchRoomId), &pb.RspMatchRoom{})
|
||||||
int32(pb.MsgId_RspMatchRoomId), &pb.RspMatchRoom{})
|
s.SendServiceMsgByTopic(service.TopicEx(node.Name), iMsg.ConnId, iMsg.UserId,
|
||||||
s.SendServiceMsg(iMsg.ServiceName, service.TopicEx(node.Name), iMsg.ConnId, iMsg.UserId,
|
|
||||||
int32(pb.MsgId_ReqEnterRoomId), &pb.ReqEnterRoom{})
|
int32(pb.MsgId_ReqEnterRoomId), &pb.ReqEnterRoom{})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var us *user.GameUser
|
var us *user.GameUser
|
||||||
rsp := &pb.RspMatchRoom{}
|
rsp := &pb.RspMatchRoom{}
|
||||||
us, rsp.Code = rpc.RpcGetGameUser(s.bindService, s, iMsg.UserId)
|
us, rsp.Code = rpc.RpcGetGameUser(s, iMsg.UserId)
|
||||||
if rsp.Code != pb.ErrCode_OK {
|
if rsp.Code != pb.ErrCode_OK {
|
||||||
s.SendServiceMsg(iMsg.ServiceName, service.TopicEx(iMsg.ServiceName), iMsg.ConnId, iMsg.UserId, int32(pb.MsgId_RspMatchRoomId), rsp)
|
s.SendServiceMsg(pb.ServiceTypeId_STI_Gate, iMsg.UserId, int32(pb.MsgId_RspMatchRoomId), rsp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
vipLv, vipExp := utils.VipLevel(us.VipExp)
|
vipLv, vipExp := utils.VipLevel(us.VipExp)
|
||||||
@ -57,6 +55,6 @@ func (s *MatchService) onMatchRoom(iMsg *ipb.InternalMsg, req *pb.ReqMatchRoom)
|
|||||||
rsp.ColorInfo = &pb.RspMatchRoom_ColorInfo{}
|
rsp.ColorInfo = &pb.RspMatchRoom_ColorInfo{}
|
||||||
}
|
}
|
||||||
|
|
||||||
s.SendServiceMsg(iMsg.ServiceName, service.TopicEx(iMsg.ServiceName), iMsg.ConnId, iMsg.UserId, int32(pb.MsgId_RspMatchRoomId), rsp)
|
s.SendServiceMsg(pb.ServiceTypeId_STI_Gate, iMsg.UserId, int32(pb.MsgId_RspMatchRoomId), rsp)
|
||||||
}, nil)
|
}, nil)
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (s *MatchService) initProcessor() {
|
func (s *MatchService) initProcessor() {
|
||||||
s.processor.RegisterMessages(processor.RegisterMetas{
|
s.Processor().RegisterMessages(processor.RegisterMetas{
|
||||||
pb.MsgId_ReqMatchRoomId: {pb.ReqMatchRoom{}, s.onMatchRoom},
|
pb.MsgId_ReqMatchRoomId: {pb.ReqMatchRoom{}, s.onMatchRoom},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ func newService(serviceId int) *MatchService {
|
|||||||
OnFunc: s,
|
OnFunc: s,
|
||||||
TypeId: int(pb.ServiceTypeId_STI_Match),
|
TypeId: int(pb.ServiceTypeId_STI_Match),
|
||||||
Version: config.Cfg.BuildDate,
|
Version: config.Cfg.BuildDate,
|
||||||
})
|
}, &config.Cfg.Redis)
|
||||||
|
|
||||||
s.initProcessor()
|
s.initProcessor()
|
||||||
s.OnInit()
|
s.OnInit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user