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