积分boss 玩家信息带入
This commit is contained in:
parent
d2ade131a5
commit
088117d780
@ -153,6 +153,17 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh
|
|||||||
Buff: req.Report.Info.Buffer,
|
Buff: req.Report.Info.Buffer,
|
||||||
}
|
}
|
||||||
update["carrybuff"] = list.Carrybuff
|
update["carrybuff"] = list.Carrybuff
|
||||||
|
var user *pb.DBUser
|
||||||
|
if user, err = this.module.GetUserForSession(session); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.Uinfo = comm.GetUserBaseInfo(user)
|
||||||
|
update["uinfo"] = list.Uinfo
|
||||||
|
// 更新base
|
||||||
if err = this.module.modelIntegral.modifyIntegralData(session.GetUserId(), update); err != nil {
|
if err = this.module.modelIntegral.modifyIntegralData(session.GetUserId(), update); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_DBError,
|
Code: pb.ErrorCode_DBError,
|
||||||
|
@ -56,6 +56,11 @@ func (this *modelIntegral) getIntegralList(session comm.IUserSession) (result *p
|
|||||||
Carrybuff: map[int32]*pb.FreightBuff{},
|
Carrybuff: map[int32]*pb.FreightBuff{},
|
||||||
}
|
}
|
||||||
if err = this.Get(uid, result); mgo.MongodbNil == err {
|
if err = this.Get(uid, result); mgo.MongodbNil == err {
|
||||||
|
var user *pb.DBUser
|
||||||
|
user, err = this.module.GetUserForSession(session)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
result.Id = primitive.NewObjectID().Hex()
|
result.Id = primitive.NewObjectID().Hex()
|
||||||
result.Uid = uid
|
result.Uid = uid
|
||||||
result.Buff = make(map[int32]int32)
|
result.Buff = make(map[int32]int32)
|
||||||
@ -63,6 +68,7 @@ func (this *modelIntegral) getIntegralList(session comm.IUserSession) (result *p
|
|||||||
result.Line = make(map[int32]*pb.LineData, 0)
|
result.Line = make(map[int32]*pb.LineData, 0)
|
||||||
result.Achieve = make(map[int32]int32) // 初始化成就
|
result.Achieve = make(map[int32]int32) // 初始化成就
|
||||||
result.Carrybuff = make(map[int32]*pb.FreightBuff) // 初始化成就
|
result.Carrybuff = make(map[int32]*pb.FreightBuff) // 初始化成就
|
||||||
|
result.Uinfo = comm.GetUserBaseInfo(user)
|
||||||
// 获取当前的hid
|
// 获取当前的hid
|
||||||
curTime := configure.Now().Unix()
|
curTime := configure.Now().Unix()
|
||||||
szConf := this.module.configure.GetIntegralITime()
|
szConf := this.module.configure.GetIntegralITime()
|
||||||
|
Loading…
Reference in New Issue
Block a user