This commit is contained in:
meixiongfeng 2023-12-19 17:57:43 +08:00
commit 19666599a8
10 changed files with 16 additions and 15 deletions

View File

@ -149,7 +149,7 @@ func (this *UserSession) Push() (err error) {
UserSessionId: this.SessionId,
Reply: this.msgqueue,
}, nil); err != nil {
log.Errorf("SendMsgToUsers:%v err:%v", this, err)
log.Errorf("Push:%v err:%s", this, err.Error())
}
}
this.msgqueue = this.msgqueue[:0]

View File

@ -49,6 +49,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (errd
global = this.module.ModuleTools.GetGlobalConf()
info = &pb.DBArenaUser{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
Uinfo: comm.GetUserBaseInfo(user),
Integral: global.ArenaInitiaIntegral,
Streak: 0,

View File

@ -675,11 +675,11 @@ func (this *Buried) trigger(session comm.IUserSession, burieds ...*pb.BuriedPara
if len(notify) > 0 {
for k, v := range notify {
if module, err = this.service.GetModule(core.M_Modules(k)); err != nil {
this.Error("通知条件变化异常 目标模块未找到!", log.Field{Key: "module", Value: k}, log.Field{Key: "err", Value: err.Error()})
this.Warn("通知条件变化异常 目标模块未找到!", log.Field{Key: "module", Value: k}, log.Field{Key: "err", Value: err.Error()})
continue
}
if nmodule, ok = module.(comm.IBuriedUpdateNotify); !ok {
this.Error("通知条件变化异常 目标模块未实现 IBuriedUpdateNotify 接口 !", log.Field{Key: "module", Value: k})
this.Warn("通知条件变化异常 目标模块未实现 IBuriedUpdateNotify 接口 !", log.Field{Key: "module", Value: k})
continue
}
//异步通知指定模块

View File

@ -99,7 +99,7 @@ func (this *ModuleRobot_MainLine) DoPipeline(robot IRobot) (err error) {
return
}
break
case 0, 2, 3, 5, 7:
case 0, 2, 3, 5, 6, 7:
if _, errdata = robot.SendMessage("mainline", "levelpass", &pb.MainlineLevelPassReq{Level: conf.Id}); errdata != nil {
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return

View File

@ -60,6 +60,7 @@ func (this *ModuleRobot_Shop) DoPipeline(robot IRobot) (err error) {
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return
}
v.LeftBuyNum--
break
}
}

View File

@ -79,7 +79,7 @@ func (this *ModuleRobot_WTask) Receive(robot IRobot, stype string, message proto
break
case "acceptchange":
resp := message.(*pb.WTaskAcceptChangePush)
// log.Debug("[机器人 WTask-AcceptChange]", log.Field{Key: "Account", Value: robot.Account()}, log.Field{Key: "Resp", Value: resp.String()})
log.Debug("[机器人 WTask-AcceptChange]", log.Field{Key: "Account", Value: robot.Account()}, log.Field{Key: "Resp", Value: resp.String()})
this.progress = resp.Accepts
if this.info != nil {
this.info.Accepts = make([]int32, 0)

View File

@ -175,7 +175,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
defer this.hlock.RUnlock()
if _, ok := this._lotteryType1[lotteryId]; !ok {
if _, ok := this._lotteryType2[lotteryId]; !ok {
this.module.Debugf("not found config lotterId:%d", lotteryId)
this.module.Warnf("not found config lotterId:%d", lotteryId)
return
}
}

View File

@ -188,13 +188,12 @@ func (this *configureComp) GetPlayerOverview(id string, sex int32) (configure *c
)
key = fmt.Sprintf("%s%d", id, sex)
if configure, ok = this._pInforoverview[key]; !ok {
key = fmt.Sprintf("%s%d", id, 0)
if configure, ok = this._pInforoverview[key]; !ok {
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
this.module.Errorf("err:%v", err)
return
}
// key = fmt.Sprintf("%s%d", id, 0)
// if configure, ok = this._pInforoverview[key]; !ok {
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
this.module.Errorf("err:%v", err)
return
// }
}
return
}

View File

@ -572,7 +572,7 @@ func writeServiceConfig(filename string, sseting *core.ServiceSttings) (err erro
func parseaddr(addr string) (ip string, port int, err error) {
ss := strings.Split(addr, ":")
if len(ss) != 2 {
err = fmt.Errorf("addr:%s解析异常", addr)
err = fmt.Errorf("addr:%s解析异常!", addr)
return
}
address := net.ParseIP(ss[0])

View File

@ -22,7 +22,7 @@ func (this *ServiceBase) InitSys() {
this.RPCXService.InitSys()
//初始化配置中心系统 每个服务都会用到的就在这个初始化就好
if err := configure.OnInit(this.GetSettings().Sys["configure"]); err != nil {
panic(fmt.Sprintf("init sys.configure err: %s", err.Error()))
panic(fmt.Sprintf("init sys.configure err: %s !", err.Error()))
} else {
configure.Start()
log.Infof("init sys.configure success!")