上传道具修改
This commit is contained in:
parent
1a37c06dcd
commit
e6a573d2ac
@ -374,10 +374,10 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte
|
||||
err = NoFoundItemConfig
|
||||
return
|
||||
}
|
||||
if conf.UpperLimit == 0 {
|
||||
err = fmt.Errorf("item UpperLimit is 0")
|
||||
return
|
||||
}
|
||||
// if conf.UpperLimit == 0 {
|
||||
// err = fmt.Errorf("item UpperLimit is 0")
|
||||
// return
|
||||
// }
|
||||
isNew = true
|
||||
leftnum = int64(addnum)
|
||||
add = make([]*pb.DB_UserItemData, 0)
|
||||
@ -429,7 +429,7 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte
|
||||
if leftnum > 0 { //还没有放完 寻找空的格子填充
|
||||
index := int32(len(items))
|
||||
for leftnum > 0 { //需要补充格子
|
||||
if conf.UpperLimit < 0 || (conf.UpperLimit > 0 && leftnum <= int64(conf.UpperLimit)) {
|
||||
if conf.UpperLimit == 0 || (conf.UpperLimit > 0 && leftnum <= int64(conf.UpperLimit)) {
|
||||
grid := &pb.DB_UserItemData{
|
||||
GridId: primitive.NewObjectID().Hex(),
|
||||
UId: uid,
|
||||
|
@ -11,7 +11,7 @@ func (this *apiComp) GymConfirmCheck(session comm.IUserSession, req *pb.Practice
|
||||
return
|
||||
}
|
||||
|
||||
///练功请求
|
||||
// /每日一练确认
|
||||
func (this *apiComp) GymConfirm(session comm.IUserSession, req *pb.PracticeGymConfirmReq) (errdata *pb.ErrorData) {
|
||||
|
||||
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
|
||||
|
@ -13,7 +13,7 @@ func (this *apiComp) GymInfoCheck(session comm.IUserSession, req *pb.PracticeGym
|
||||
return
|
||||
}
|
||||
|
||||
///练功请求
|
||||
// /获取每日一练信息
|
||||
func (this *apiComp) GymInfo(session comm.IUserSession, req *pb.PracticeGymInfoReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
@ -33,6 +33,7 @@ func (this *apiComp) GymInfo(session comm.IUserSession, req *pb.PracticeGymInfoR
|
||||
"gymrefresh": room.Gymrefresh,
|
||||
})
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "gyminfo", &pb.PracticeGymInfoResp{Lastaction: room.Gymaction, Refreshnum: room.Gymrefresh})
|
||||
return
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ func (this *apiComp) GymRefreshCheck(session comm.IUserSession, req *pb.Practice
|
||||
return
|
||||
}
|
||||
|
||||
///练功请求
|
||||
// /刷新动作
|
||||
func (this *apiComp) GymRefresh(session comm.IUserSession, req *pb.PracticeGymRefreshReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
|
Loading…
Reference in New Issue
Block a user