上传战斗匹配日志
This commit is contained in:
parent
ccfb093832
commit
9a08ffad16
@ -16,9 +16,9 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
var (
|
||||
uids []string
|
||||
ranks []*pb.DBIntegralBoss
|
||||
franks []*pb.DBIntegralBoss
|
||||
// franks []*pb.DBIntegralBoss
|
||||
players []*pb.DBIntegralRank
|
||||
friends []*pb.DBIntegralRank
|
||||
// friends []*pb.DBIntegralRank
|
||||
err error
|
||||
)
|
||||
|
||||
@ -53,29 +53,29 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
Line: v.Line[req.Nandu],
|
||||
}
|
||||
}
|
||||
// 获取好友
|
||||
fids := this.module.ModuleFriend.GetFriendList(session.GetUserId())
|
||||
if franks, err = this.module.modelIntegral.queryPlayers(fids); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
friends = make([]*pb.DBIntegralRank, len(franks))
|
||||
for i, v := range franks {
|
||||
friends[i] = &pb.DBIntegralRank{
|
||||
Id: v.Uid,
|
||||
Uinfo: v.Uinfo,
|
||||
Nandu: v.Nandu,
|
||||
Score: v.Score[req.Nandu],
|
||||
Line: v.Line[req.Nandu],
|
||||
}
|
||||
}
|
||||
// // 获取好友
|
||||
// fids := this.module.ModuleFriend.GetFriendList(session.GetUserId())
|
||||
// if franks, err = this.module.modelIntegral.queryPlayers(fids); err != nil {
|
||||
// errdata = &pb.ErrorData{
|
||||
// Code: pb.ErrorCode_DBError,
|
||||
// Title: pb.ErrorCode_DBError.ToString(),
|
||||
// Message: err.Error(),
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// friends = make([]*pb.DBIntegralRank, len(franks))
|
||||
// for i, v := range franks {
|
||||
// friends[i] = &pb.DBIntegralRank{
|
||||
// Id: v.Uid,
|
||||
// Uinfo: v.Uinfo,
|
||||
// Nandu: v.Nandu,
|
||||
// Score: v.Score[req.Nandu],
|
||||
// Line: v.Line[req.Nandu],
|
||||
// }
|
||||
// }
|
||||
session.SendMsg(string(this.module.GetType()), "ranklist", &pb.IntegralRankListResp{
|
||||
Ranks: players,
|
||||
Friends: friends,
|
||||
// Friends: friends,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -59,12 +59,14 @@ func (this *MatchPool) OnInstallComp() {
|
||||
|
||||
//加入匹配池
|
||||
func (this *MatchPool) JoinMatchPools(ctx context.Context, req *pb.JoinMatchPoolReq, resp *pb.JoinMatchPoolResp) (err error) {
|
||||
this.Debug("JoinMatchPools", log.Field{Key: "req", Value: req.String()})
|
||||
this.pools.joinPools(req)
|
||||
return
|
||||
}
|
||||
|
||||
//取消匹配
|
||||
func (this *MatchPool) CancelMatch(ctx context.Context, req *pb.CancelMatchReq, resp *pb.CancelMatchResp) (err error) {
|
||||
this.Debug("CancelMatch", log.Field{Key: "req", Value: req.String()})
|
||||
this.pools.cancelMatch(req)
|
||||
return
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ func (this *modelPlunder) getPlunderData(session comm.IUserSession) (info *pb.DB
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
user, err = this.module.GetUserForSession(session)
|
||||
if err != nil {
|
||||
this.module.Errorln(err)
|
||||
@ -89,7 +88,6 @@ func (this *modelPlunder) getPlunderData(session comm.IUserSession) (info *pb.DB
|
||||
// 刷新货物信息
|
||||
info.Source, _ = this.refreshGoodsInfo()
|
||||
err = this.Add(session.GetUserId(), info)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user