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, UserSessionId: this.SessionId,
Reply: this.msgqueue, Reply: this.msgqueue,
}, nil); err != nil { }, 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] 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() global = this.module.ModuleTools.GetGlobalConf()
info = &pb.DBArenaUser{ info = &pb.DBArenaUser{
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
Uinfo: comm.GetUserBaseInfo(user), Uinfo: comm.GetUserBaseInfo(user),
Integral: global.ArenaInitiaIntegral, Integral: global.ArenaInitiaIntegral,
Streak: 0, Streak: 0,

View File

@ -675,11 +675,11 @@ func (this *Buried) trigger(session comm.IUserSession, burieds ...*pb.BuriedPara
if len(notify) > 0 { if len(notify) > 0 {
for k, v := range notify { for k, v := range notify {
if module, err = this.service.GetModule(core.M_Modules(k)); err != nil { 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 continue
} }
if nmodule, ok = module.(comm.IBuriedUpdateNotify); !ok { 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 continue
} }
//异步通知指定模块 //异步通知指定模块

View File

@ -99,7 +99,7 @@ func (this *ModuleRobot_MainLine) DoPipeline(robot IRobot) (err error) {
return return
} }
break 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 { 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)) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return 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)) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
v.LeftBuyNum--
break break
} }
} }

View File

@ -79,7 +79,7 @@ func (this *ModuleRobot_WTask) Receive(robot IRobot, stype string, message proto
break break
case "acceptchange": case "acceptchange":
resp := message.(*pb.WTaskAcceptChangePush) 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 this.progress = resp.Accepts
if this.info != nil { if this.info != nil {
this.info.Accepts = make([]int32, 0) this.info.Accepts = make([]int32, 0)

View File

@ -175,7 +175,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
defer this.hlock.RUnlock() defer this.hlock.RUnlock()
if _, ok := this._lotteryType1[lotteryId]; !ok { if _, ok := this._lotteryType1[lotteryId]; !ok {
if _, ok := this._lotteryType2[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 return
} }
} }

View File

@ -188,13 +188,12 @@ func (this *configureComp) GetPlayerOverview(id string, sex int32) (configure *c
) )
key = fmt.Sprintf("%s%d", id, sex) key = fmt.Sprintf("%s%d", id, sex)
if configure, ok = this._pInforoverview[key]; !ok { if configure, ok = this._pInforoverview[key]; !ok {
key = fmt.Sprintf("%s%d", id, 0) // key = fmt.Sprintf("%s%d", id, 0)
if configure, ok = this._pInforoverview[key]; !ok { // if configure, ok = this._pInforoverview[key]; !ok {
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key) err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
this.module.Errorf("err:%v", err) this.module.Errorf("err:%v", err)
return return
} // }
} }
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) { func parseaddr(addr string) (ip string, port int, err error) {
ss := strings.Split(addr, ":") ss := strings.Split(addr, ":")
if len(ss) != 2 { if len(ss) != 2 {
err = fmt.Errorf("addr:%s解析异常", addr) err = fmt.Errorf("addr:%s解析异常!", addr)
return return
} }
address := net.ParseIP(ss[0]) address := net.ParseIP(ss[0])

View File

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