diff --git a/comm/const.go b/comm/const.go index b2826810c..18e0a0d61 100644 --- a/comm/const.go +++ b/comm/const.go @@ -200,6 +200,8 @@ const ( TableGrowtask = "growtask" // 世界任务 TableWorldtask = "worldtask" + //关卡编辑 + TableCombat = "combat" ) //RPC服务接口定义处 diff --git a/modules/combat/api_challengereceive.go b/modules/combat/api_challengereceive.go index e8a4c47ae..2969b19a3 100644 --- a/modules/combat/api_challengereceive.go +++ b/modules/combat/api_challengereceive.go @@ -54,6 +54,6 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC this.module.DispenseRes(session, manster.Award, true) } - session.SendMsg(string(this.module.GetType()), "receive", &pb.CombatChallengeReceiveResp{Issucc: true}) + session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Issucc: true}) return } diff --git a/modules/combat/api_in.go b/modules/combat/api_in.go index 7a6207963..267424ede 100644 --- a/modules/combat/api_in.go +++ b/modules/combat/api_in.go @@ -36,6 +36,6 @@ func (this *apiComp) In(session comm.IUserSession, req *pb.CombatInReq) (code pb return } - session.SendMsg(string(this.module.GetType()), "info", &pb.CombatInReq{Id: req.Id}) + session.SendMsg(string(this.module.GetType()), "in", &pb.CombatInReq{Id: req.Id}) return } diff --git a/modules/combat/modelCombat.go b/modules/combat/modelCombat.go index 6e1877bed..c579bedfb 100644 --- a/modules/combat/modelCombat.go +++ b/modules/combat/modelCombat.go @@ -17,7 +17,7 @@ type modelCombatComp struct { //组件初始化接口 func (this *modelCombatComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { - this.TableName = comm.TableAcademy + this.TableName = comm.TableCombat this.MCompModel.Init(service, module, comp, opt) this.module = module.(*Combat) @@ -36,7 +36,7 @@ func (this *modelCombatComp) queryInfo(uId string) (result *pb.DBCombatUser, err Passmanster: make([]int32, 0), Passdrop: make([]int32, 0), } - if err = this.Get(uId, result); err != nil && err != mgo.MongodbNil { + if err = this.Get(uId, result, db.SetDBMgoLog(false)); err != nil && err != mgo.MongodbNil { this.module.Errorln(err) return } @@ -52,7 +52,7 @@ func (this *modelCombatComp) updateInfo(info *pb.DBCombatUser) (err error) { "currlevel": info.Currlevel, "passmanster": info.Passmanster, "passdrop": info.Passdrop, - }); err != nil { + }, db.SetDBMgoLog(false)); err != nil { this.module.Errorln(err) return }