update
This commit is contained in:
parent
7c08f2e1bc
commit
840aae0caf
@ -20,7 +20,7 @@ func (this *apiComp) TalentList(session comm.IUserSession, req *pb.HeroTalentLis
|
||||
rsp := &pb.HeroTalentListResp{}
|
||||
if rsp.Telnet, err = this.module.modelTalent.GetHerotalent(session.GetUserId()); err != nil {
|
||||
fmt.Printf("GetHerotalenterr: %v\n", err)
|
||||
code = pb.ErrorCode_DBError
|
||||
//code = pb.ErrorCode_DBError
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), HeroTalentListResp, rsp)
|
||||
return
|
||||
|
@ -99,7 +99,19 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
||||
} else {
|
||||
this.module.Errorf("no found userdata uid:%s", session.GetUserId())
|
||||
}
|
||||
|
||||
userinfo := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||
newData := &pb.DBPagodaRecord{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: session.GetUserId(),
|
||||
PagodaId: pagoda.PagodaId,
|
||||
Type: pagoda.Type,
|
||||
Nickname: userinfo.Name,
|
||||
Icon: "", // icon 暂无
|
||||
Lv: userinfo.Lv,
|
||||
CostTime: req.Report.Costtime,
|
||||
}
|
||||
costTime = newData.CostTime
|
||||
this.module.modulerank.AddPagodaRecord(session.GetUserId(), newData)
|
||||
//this.module.modulerank.SetNormalPagodaRankList("pagodaRank", pagoda.PagodaId<<16-costTime, session.GetUserId())
|
||||
|
||||
// 普通塔通关了
|
||||
|
@ -39,6 +39,12 @@ func (this *ModelRank) GetRankData() (data []*pb.DBPagodaRecord, err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelRank) AddPagodaRecord(uid string, record *pb.DBPagodaRecord) (err error) {
|
||||
err = this.AddList(uid, record.Id, record)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelRank) getPagodaRankList(uid string) []*pb.DBPagodaRecord {
|
||||
pagodaRank := make([]*pb.DBPagodaRecord, 0)
|
||||
err := this.GetList(uid, &pagodaRank)
|
||||
|
Loading…
Reference in New Issue
Block a user