diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index bf4b38702..8ca76c36c 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -387,7 +387,6 @@ func (this *modelArena) recoverTicket(info *pb.DBArenaUser) { func (this *modelArena) reddot(session comm.IUserSession) bool { var ( info *pb.DBArenaUser - user *pb.DBUser err error ) if info, err = this.queryPlayerInfo(session.GetUserId()); err != nil { @@ -395,25 +394,8 @@ func (this *modelArena) reddot(session comm.IUserSession) bool { } if err == mgo.MongodbNil { global := this.module.configure.GetGlobalConf() - if user = this.module.ModuleUser.GetUser(session.GetUserId()); user == nil { - return false - } - info = &pb.DBArenaUser{ - Uid: session.GetUserId(), - Name: user.Name, - Integral: global.ArenaInitiaIntegral, - Ticket: 10, - Streak: 0, - Record: make([]*pb.DBArenaBattleRecord, 0), - Lastrtickettime: 0, - Isdef: false, - Npc: make(map[int32]*pb.DBNpc), - } - if info.Dan, err = this.module.modelArena.computedan(info.Integral); err != nil { - return false - } - if err = this.module.modelArena.Add(session.GetUserId(), info); err != nil { - return false + if global.ArenaTicketMax >= global.ArenaTicketCos { + return true } } if info.Ticket > this.module.configure.GetGlobalConf().ArenaTicketCos { diff --git a/modules/battle/call.go b/modules/battle/call.go new file mode 100644 index 000000000..5f310a06f --- /dev/null +++ b/modules/battle/call.go @@ -0,0 +1,12 @@ +package battle + +//异步返回结构 +type MessageCall struct { + Method string + Metadata map[string]string + ResMetadata map[string]string + Args interface{} //请求参数 + Reply interface{} //返回参数 + Error error //错误信息 + Done chan *MessageCall +}