上传错误处理
This commit is contained in:
parent
d922939c1f
commit
e7ac1e258e
@ -20,8 +20,9 @@ func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.MoonlvAwardRe
|
||||
// 领取等级奖励
|
||||
func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
conf *cfg.GameMoonLvData
|
||||
tconfs []*cfg.GameMoonTaskData
|
||||
update map[string]interface{}
|
||||
lvConf *cfg.GameMoonLvData
|
||||
atno []*pb.UserAtno
|
||||
)
|
||||
update = make(map[string]interface{}, 0)
|
||||
@ -33,6 +34,31 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (e
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if conf, err = this.module.configure.GetMoonLvConf(list.Lv); err == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
if tconfs, err = this.module.configure.GetMoonLvTaskConf(conf.TaskGroupId); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
for _, v := range tconfs {
|
||||
if _, ok := list.Tasks[v.TaskId]; !ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_TaskRepeatedReward,
|
||||
Title: pb.ErrorCode_TaskRepeatedReward.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
if _, ok := list.Reward[req.Lv]; ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_TaskRepeatedReward,
|
||||
@ -40,55 +66,15 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (e
|
||||
}
|
||||
return
|
||||
}
|
||||
for _, v := range list.Tasks {
|
||||
if v.Received != 2 { // 只要有未领取的就不能升级
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_TaskNoFinished,
|
||||
Title: pb.ErrorCode_TaskNoFinished.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
if lvConf, err = this.module.configure.GetMoonLvConf(list.Lv); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if upConf, err := this.module.configure.GetMoonLvConf(list.Lv + 1); err == nil { // 查看能不能继续升级
|
||||
list.Reward[req.Lv] = true
|
||||
if _, err = this.module.configure.GetMoonLvConf(list.Lv + 1); err == nil { // 查看能不能继续升级
|
||||
list.Lv += 1
|
||||
update["lv"] = list.Lv
|
||||
|
||||
if errdata = this.module.ModuleUser.ChangeUserMoonLv(session, list.Lv); errdata != nil {
|
||||
return
|
||||
}
|
||||
// 升级了清空当前任务
|
||||
list.Tasks = nil
|
||||
// 重置任务
|
||||
var szTaskid []int32
|
||||
|
||||
if conf, err := this.module.configure.GetMoonLvTaskConf(upConf.TaskGroupId); err == nil {
|
||||
for _, v := range conf {
|
||||
szTaskid = append(szTaskid, v.TaskId) // 获取任务id
|
||||
}
|
||||
}
|
||||
if _, data, err := this.module.ModuleBuried.CheckCondition(session, szTaskid...); err == nil {
|
||||
for _, v := range data {
|
||||
tmp := &pb.MoonTask{
|
||||
TaskId: v.Conid,
|
||||
Received: 0,
|
||||
Cond: v,
|
||||
}
|
||||
if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
tmp.Received = 1
|
||||
}
|
||||
list.Tasks = append(list.Tasks, tmp)
|
||||
}
|
||||
}
|
||||
update["tasks"] = list.Tasks
|
||||
}
|
||||
list.Reward[req.Lv] = true
|
||||
|
||||
update["reward"] = list.Reward
|
||||
if err := this.module.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
|
||||
this.module.Error(err.Error())
|
||||
@ -99,7 +85,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (e
|
||||
}
|
||||
return
|
||||
}
|
||||
if errdata, atno = this.module.DispenseAtno(session, lvConf.Reward, true); errdata != nil {
|
||||
if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "award", &pb.MoonlvAwardResp{
|
||||
|
@ -1,9 +1,9 @@
|
||||
package moonlv
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
// 任务奖励领取
|
||||
@ -19,9 +19,12 @@ func (this *apiComp) TaskAwardCheck(session comm.IUserSession, req *pb.MoonlvTas
|
||||
|
||||
func (this *apiComp) TaskAward(session comm.IUserSession, req *pb.MoonlvTaskAwardReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
atno []*pb.UserAtno
|
||||
list *pb.DBMoonLv
|
||||
err error
|
||||
conf *cfg.GameMoonLvData
|
||||
tconf *cfg.GameMoonTaskData
|
||||
atno []*pb.UserAtno
|
||||
list *pb.DBMoonLv
|
||||
ok bool
|
||||
err error
|
||||
)
|
||||
|
||||
if errdata = this.TaskAwardCheck(session, req); errdata != nil {
|
||||
@ -36,37 +39,45 @@ func (this *apiComp) TaskAward(session comm.IUserSession, req *pb.MoonlvTaskAwar
|
||||
}
|
||||
return
|
||||
}
|
||||
if err := this.module.modelMoonlv.updateTaskRecord(session.GetUserId(), req.TaskId, list); err != nil {
|
||||
var errCustom = new(comm.CustomError)
|
||||
if errors.As(err, &errCustom) {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: errCustom.Code,
|
||||
Title: errCustom.Code.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
} else {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
|
||||
if _, ok = list.Tasks[req.TaskId]; ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Message: "Received !",
|
||||
}
|
||||
return
|
||||
}
|
||||
if c, err := this.module.configure.GetMoonLvConf(list.Lv); err == nil {
|
||||
if conf, err := this.module.configure.GetMoonLvTaskConfByTaskId(c.TaskGroupId, req.TaskId); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
} else {
|
||||
if errdata, atno = this.module.DispenseAtno(session, conf.TaskReward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
list.Tasks[req.TaskId] = 1
|
||||
if conf, err = this.module.configure.GetMoonLvConf(list.Lv); err == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
if tconf, err = this.module.configure.GetMoonLvTaskConfByTaskId(conf.TaskGroupId, req.TaskId); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if ok, _, _ = this.module.ModuleBuried.CheckCondition(session, tconf.TaskId); !ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Message: "task is unfinsh!",
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if errdata, atno = this.module.DispenseAtno(session, tconf.TaskReward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
this.module.modelMoonlv.Change(session.GetUserId(), map[string]interface{}{
|
||||
"tasks": list.Tasks,
|
||||
})
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "taskaward", &pb.MoonlvTaskAwardResp{
|
||||
TaskId: req.TaskId,
|
||||
|
@ -36,27 +36,7 @@ func (this *modelMoonlv) getMoonlvList(session comm.IUserSession) (result *pb.DB
|
||||
result.Uid = uid
|
||||
result.Lv = 1 // 默认1级
|
||||
result.Reward = make(map[int32]bool)
|
||||
var szTaskid []int32
|
||||
if lvConf, err := this.module.configure.GetMoonLvConf(1); err == nil {
|
||||
if conf, err := this.module.configure.GetMoonLvTaskConf(lvConf.TaskGroupId); err == nil {
|
||||
for _, v := range conf {
|
||||
szTaskid = append(szTaskid, v.TaskId) // 获取任务id
|
||||
}
|
||||
}
|
||||
}
|
||||
if _, data, err := this.module.ModuleBuried.CheckCondition(session, szTaskid...); err == nil {
|
||||
for _, v := range data {
|
||||
tmp := &pb.MoonTask{
|
||||
TaskId: v.Conid,
|
||||
Received: 0,
|
||||
Cond: v,
|
||||
}
|
||||
if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
tmp.Received = 1
|
||||
}
|
||||
result.Tasks = append(result.Tasks, tmp)
|
||||
}
|
||||
}
|
||||
result.Tasks = make(map[int32]int32)
|
||||
this.Add(uid, result)
|
||||
err = nil
|
||||
}
|
||||
@ -68,37 +48,3 @@ func (this *modelMoonlv) getMoonlvList(session comm.IUserSession) (result *pb.DB
|
||||
func (this *modelMoonlv) modifyMoonlvList(uid string, data map[string]interface{}) error {
|
||||
return this.Change(uid, data)
|
||||
}
|
||||
|
||||
// func (this *modelMoonlv) getTaskRecord(uid string) (*pb.DBTujianTask, error) {
|
||||
// tt := &pb.DBTujianTask{Uid: uid}
|
||||
// if err := this.Get(uid, tt); err != nil {
|
||||
// return tt, err
|
||||
// }
|
||||
// return tt, nil
|
||||
// }
|
||||
|
||||
func (this *modelMoonlv) updateTaskRecord(uid string, taskId int32, dt *pb.DBMoonLv) error {
|
||||
|
||||
update := make(map[string]interface{})
|
||||
for _, v := range dt.Tasks {
|
||||
if v.TaskId == taskId {
|
||||
if v.Received == 1 {
|
||||
v.Received = 2
|
||||
} else if v.Received == 2 {
|
||||
return comm.NewCustomError(pb.ErrorCode_SmithyTaskReceived)
|
||||
} else {
|
||||
return comm.NewCustomError(pb.ErrorCode_SmithyTaskNoFinished)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
update["tasks"] = dt.Tasks
|
||||
|
||||
if len(update) > 0 {
|
||||
if err := this.Change(uid, update); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package moonlv
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
@ -40,78 +39,75 @@ func (this *Moonlv) OnInstallComp() {
|
||||
}
|
||||
|
||||
func (this *Moonlv) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIProgress) {
|
||||
var groupID int32
|
||||
this.Debug("护月任务通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds})
|
||||
dt, err := this.modelMoonlv.getMoonlvList(session)
|
||||
if c, e := this.configure.GetMoonLvConf(dt.Lv); e == nil {
|
||||
groupID = c.TaskGroupId
|
||||
}
|
||||
confList, err := this.configure.GetMoonLvTaskConf(groupID)
|
||||
if err != nil {
|
||||
this.Error(err.Error())
|
||||
return
|
||||
}
|
||||
condMap := make(map[int32]*pb.ConIProgress)
|
||||
for _, conf := range confList {
|
||||
for _, cond := range conds {
|
||||
if cond.Conid == conf.TaskId {
|
||||
condMap[conf.TaskId] = cond
|
||||
}
|
||||
}
|
||||
}
|
||||
update := make(map[string]interface{})
|
||||
// var groupID int32
|
||||
// this.Debug("护月任务通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds})
|
||||
// dt, err := this.modelMoonlv.getMoonlvList(session)
|
||||
// if c, e := this.configure.GetMoonLvConf(dt.Lv); e == nil {
|
||||
// groupID = c.TaskGroupId
|
||||
// }
|
||||
// confList, err := this.configure.GetMoonLvTaskConf(groupID)
|
||||
// if err != nil {
|
||||
// this.Error(err.Error())
|
||||
// return
|
||||
// }
|
||||
// condMap := make(map[int32]*pb.ConIProgress)
|
||||
// for _, conf := range confList {
|
||||
// for _, cond := range conds {
|
||||
// if cond.Conid == conf.TaskId {
|
||||
// condMap[conf.TaskId] = cond
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// update := make(map[string]interface{})
|
||||
|
||||
if dt.Tasks == nil {
|
||||
for k, v := range condMap {
|
||||
tt := &pb.MoonTask{
|
||||
TaskId: k,
|
||||
Cond: v,
|
||||
}
|
||||
if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
tt.Received = 1
|
||||
}
|
||||
dt.Tasks = append(dt.Tasks, tt)
|
||||
}
|
||||
update["tasks"] = dt.Tasks
|
||||
if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
|
||||
this.Error(err.Error())
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
// if dt.Tasks == nil {
|
||||
// for k, v := range condMap {
|
||||
// tt := &pb.MoonTask{
|
||||
// TaskId: k,
|
||||
// }
|
||||
// if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
// tt.Received = 1
|
||||
// }
|
||||
// dt.Tasks = append(dt.Tasks, tt)
|
||||
// }
|
||||
// update["tasks"] = dt.Tasks
|
||||
// if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
|
||||
// this.Error(err.Error())
|
||||
// return
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
||||
var newTask []*pb.MoonTask
|
||||
existTaskMap := make(map[int32]*pb.MoonTask)
|
||||
for _, task := range dt.Tasks {
|
||||
existTaskMap[task.TaskId] = task
|
||||
}
|
||||
// var newTask []*pb.MoonTask
|
||||
// existTaskMap := make(map[int32]*pb.MoonTask)
|
||||
// for _, task := range dt.Tasks {
|
||||
// existTaskMap[task.TaskId] = task
|
||||
// }
|
||||
|
||||
for k, v := range condMap {
|
||||
if task, ok := existTaskMap[k]; ok {
|
||||
task.Cond = v
|
||||
if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
task.Received = 1
|
||||
}
|
||||
} else {
|
||||
nt := &pb.MoonTask{
|
||||
TaskId: k,
|
||||
Cond: v,
|
||||
}
|
||||
if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
nt.Received = 1
|
||||
}
|
||||
newTask = append(newTask, nt)
|
||||
}
|
||||
}
|
||||
dt.Tasks = append(dt.Tasks, newTask...)
|
||||
update["tasks"] = dt.Tasks
|
||||
// for k, v := range condMap {
|
||||
// if task, ok := existTaskMap[k]; ok {
|
||||
// if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
// task.Received = 1
|
||||
// }
|
||||
// } else {
|
||||
// nt := &pb.MoonTask{
|
||||
// TaskId: k,
|
||||
// }
|
||||
// if v.State == pb.BuriedItemFinishState_buried_finish {
|
||||
// nt.Received = 1
|
||||
// }
|
||||
// newTask = append(newTask, nt)
|
||||
// }
|
||||
// }
|
||||
// dt.Tasks = append(dt.Tasks, newTask...)
|
||||
// update["tasks"] = dt.Tasks
|
||||
|
||||
if len(update) > 0 {
|
||||
if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
|
||||
this.Error(err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
// if len(update) > 0 {
|
||||
// if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
|
||||
// this.Error(err.Error())
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
func (this *Moonlv) GMCreateMoonlv(session comm.IUserSession, lv int32) {
|
||||
|
@ -25,11 +25,11 @@ type DBMoonLv struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||
Tasks []*MoonTask `protobuf:"bytes,3,rep,name=tasks,proto3" json:"tasks" bson:"tasks"` // 任务列表
|
||||
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"` // 月明度等级
|
||||
Reward map[int32]bool `protobuf:"bytes,5,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 等级奖励
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||
Tasks map[int32]int32 `protobuf:"bytes,3,rep,name=tasks,proto3" json:"tasks" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"tasks"` // 任务列表
|
||||
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"` // 月明度等级
|
||||
Reward map[int32]bool `protobuf:"bytes,5,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 等级奖励
|
||||
}
|
||||
|
||||
func (x *DBMoonLv) Reset() {
|
||||
@ -78,7 +78,7 @@ func (x *DBMoonLv) GetUid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBMoonLv) GetTasks() []*MoonTask {
|
||||
func (x *DBMoonLv) GetTasks() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Tasks
|
||||
}
|
||||
@ -99,95 +99,29 @@ func (x *DBMoonLv) GetReward() map[int32]bool {
|
||||
return nil
|
||||
}
|
||||
|
||||
type MoonTask struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId" bson:"taskId"` // 任务ID
|
||||
Received int32 `protobuf:"varint,2,opt,name=received,proto3" json:"received" bson:"received"` //领取状态 0未领取 1待领取 2已领取
|
||||
Cond *ConIProgress `protobuf:"bytes,3,opt,name=cond,proto3" json:"cond" bson:"cond"` //任务进度
|
||||
}
|
||||
|
||||
func (x *MoonTask) Reset() {
|
||||
*x = MoonTask{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_moonlv_moonlv_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MoonTask) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MoonTask) ProtoMessage() {}
|
||||
|
||||
func (x *MoonTask) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_moonlv_moonlv_db_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MoonTask.ProtoReflect.Descriptor instead.
|
||||
func (*MoonTask) Descriptor() ([]byte, []int) {
|
||||
return file_moonlv_moonlv_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *MoonTask) GetTaskId() int32 {
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MoonTask) GetReceived() int32 {
|
||||
if x != nil {
|
||||
return x.Received
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MoonTask) GetCond() *ConIProgress {
|
||||
if x != nil {
|
||||
return x.Cond
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_moonlv_moonlv_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_moonlv_moonlv_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x6d, 0x6f, 0x6f, 0x6e, 0x6c, 0x76, 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x6c, 0x76, 0x5f,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64,
|
||||
0x2f, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0xc7, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||
0x1f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09,
|
||||
0x2e, 0x4d, 0x6f, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76,
|
||||
0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x15, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x2e, 0x52, 0x65, 0x77, 0x61,
|
||||
0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a,
|
||||
0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x61, 0x0a, 0x08, 0x4d, 0x6f,
|
||||
0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x63, 0x6f,
|
||||
0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50,
|
||||
0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x64, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x4d,
|
||||
0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c,
|
||||
0x76, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x02, 0x6c, 0x76, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x2e, 0x52,
|
||||
0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61,
|
||||
0x72, 0x64, 0x1a, 0x38, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b,
|
||||
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -204,20 +138,18 @@ func file_moonlv_moonlv_db_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_moonlv_moonlv_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_moonlv_moonlv_db_proto_goTypes = []interface{}{
|
||||
(*DBMoonLv)(nil), // 0: DBMoonLv
|
||||
(*MoonTask)(nil), // 1: MoonTask
|
||||
nil, // 2: DBMoonLv.RewardEntry
|
||||
(*ConIProgress)(nil), // 3: ConIProgress
|
||||
(*DBMoonLv)(nil), // 0: DBMoonLv
|
||||
nil, // 1: DBMoonLv.TasksEntry
|
||||
nil, // 2: DBMoonLv.RewardEntry
|
||||
}
|
||||
var file_moonlv_moonlv_db_proto_depIdxs = []int32{
|
||||
1, // 0: DBMoonLv.tasks:type_name -> MoonTask
|
||||
1, // 0: DBMoonLv.tasks:type_name -> DBMoonLv.TasksEntry
|
||||
2, // 1: DBMoonLv.reward:type_name -> DBMoonLv.RewardEntry
|
||||
3, // 2: MoonTask.cond:type_name -> ConIProgress
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_moonlv_moonlv_db_proto_init() }
|
||||
@ -225,7 +157,6 @@ func file_moonlv_moonlv_db_proto_init() {
|
||||
if File_moonlv_moonlv_db_proto != nil {
|
||||
return
|
||||
}
|
||||
file_buried_buried_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_moonlv_moonlv_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBMoonLv); i {
|
||||
@ -239,18 +170,6 @@ func file_moonlv_moonlv_db_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_moonlv_moonlv_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MoonTask); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
Loading…
Reference in New Issue
Block a user