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