上传错误处理

This commit is contained in:
liwei1dao 2024-01-10 17:55:41 +08:00
parent d922939c1f
commit e7ac1e258e
5 changed files with 172 additions and 314 deletions

View File

@ -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) { func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (errdata *pb.ErrorData) {
var ( var (
conf *cfg.GameMoonLvData
tconfs []*cfg.GameMoonTaskData
update map[string]interface{} update map[string]interface{}
lvConf *cfg.GameMoonLvData
atno []*pb.UserAtno atno []*pb.UserAtno
) )
update = make(map[string]interface{}, 0) update = make(map[string]interface{}, 0)
@ -33,6 +34,31 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (e
} }
return 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 { if _, ok := list.Reward[req.Lv]; ok {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskRepeatedReward, Code: pb.ErrorCode_TaskRepeatedReward,
@ -40,55 +66,15 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (e
} }
return return
} }
for _, v := range list.Tasks { list.Reward[req.Lv] = true
if v.Received != 2 { // 只要有未领取的就不能升级 if _, err = this.module.configure.GetMoonLvConf(list.Lv + 1); err == nil { // 查看能不能继续升级
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.Lv += 1 list.Lv += 1
update["lv"] = list.Lv update["lv"] = list.Lv
if errdata = this.module.ModuleUser.ChangeUserMoonLv(session, list.Lv); errdata != nil { if errdata = this.module.ModuleUser.ChangeUserMoonLv(session, list.Lv); errdata != nil {
return 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 update["reward"] = list.Reward
if err := this.module.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil { if err := this.module.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
this.module.Error(err.Error()) this.module.Error(err.Error())
@ -99,7 +85,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.MoonlvAwardReq) (e
} }
return 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 return
} }
session.SendMsg(string(this.module.GetType()), "award", &pb.MoonlvAwardResp{ session.SendMsg(string(this.module.GetType()), "award", &pb.MoonlvAwardResp{

View File

@ -1,9 +1,9 @@
package moonlv package moonlv
import ( import (
"errors"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
) )
// 任务奖励领取 // 任务奖励领取
@ -19,8 +19,11 @@ func (this *apiComp) TaskAwardCheck(session comm.IUserSession, req *pb.MoonlvTas
func (this *apiComp) TaskAward(session comm.IUserSession, req *pb.MoonlvTaskAwardReq) (errdata *pb.ErrorData) { func (this *apiComp) TaskAward(session comm.IUserSession, req *pb.MoonlvTaskAwardReq) (errdata *pb.ErrorData) {
var ( var (
conf *cfg.GameMoonLvData
tconf *cfg.GameMoonTaskData
atno []*pb.UserAtno atno []*pb.UserAtno
list *pb.DBMoonLv list *pb.DBMoonLv
ok bool
err error err error
) )
@ -36,37 +39,45 @@ func (this *apiComp) TaskAward(session comm.IUserSession, req *pb.MoonlvTaskAwar
} }
return return
} }
if err := this.module.modelMoonlv.updateTaskRecord(session.GetUserId(), req.TaskId, list); err != nil {
var errCustom = new(comm.CustomError) if _, ok = list.Tasks[req.TaskId]; ok {
if errors.As(err, &errCustom) {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: errCustom.Code, Code: pb.ErrorCode_ReqParameterError,
Title: errCustom.Code.ToString(), Message: "Received !",
Message: err.Error(),
}
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
} }
return return
} }
if c, err := this.module.configure.GetMoonLvConf(list.Lv); err == nil { list.Tasks[req.TaskId] = 1
if conf, err := this.module.configure.GetMoonLvTaskConfByTaskId(c.TaskGroupId, req.TaskId); err != nil { 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{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(), Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(), Message: err.Error(),
} }
return return
} else { }
if errdata, atno = this.module.DispenseAtno(session, conf.TaskReward, true); errdata != nil {
if ok, _, _ = this.module.ModuleBuried.CheckCondition(session, tconf.TaskId); !ok {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Message: "task is unfinsh!",
}
return 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{ session.SendMsg(string(this.module.GetType()), "taskaward", &pb.MoonlvTaskAwardResp{
TaskId: req.TaskId, TaskId: req.TaskId,

View File

@ -36,27 +36,7 @@ func (this *modelMoonlv) getMoonlvList(session comm.IUserSession) (result *pb.DB
result.Uid = uid result.Uid = uid
result.Lv = 1 // 默认1级 result.Lv = 1 // 默认1级
result.Reward = make(map[int32]bool) result.Reward = make(map[int32]bool)
var szTaskid []int32 result.Tasks = make(map[int32]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)
}
}
this.Add(uid, result) this.Add(uid, result)
err = nil 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 { func (this *modelMoonlv) modifyMoonlvList(uid string, data map[string]interface{}) error {
return this.Change(uid, data) 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
}

View File

@ -3,7 +3,6 @@ package moonlv
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
) )
@ -40,78 +39,75 @@ func (this *Moonlv) OnInstallComp() {
} }
func (this *Moonlv) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIProgress) { func (this *Moonlv) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIProgress) {
var groupID int32 // var groupID int32
this.Debug("护月任务通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds}) // this.Debug("护月任务通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds})
dt, err := this.modelMoonlv.getMoonlvList(session) // dt, err := this.modelMoonlv.getMoonlvList(session)
if c, e := this.configure.GetMoonLvConf(dt.Lv); e == nil { // if c, e := this.configure.GetMoonLvConf(dt.Lv); e == nil {
groupID = c.TaskGroupId // groupID = c.TaskGroupId
} // }
confList, err := this.configure.GetMoonLvTaskConf(groupID) // confList, err := this.configure.GetMoonLvTaskConf(groupID)
if err != nil { // if err != nil {
this.Error(err.Error()) // this.Error(err.Error())
return // return
} // }
condMap := make(map[int32]*pb.ConIProgress) // condMap := make(map[int32]*pb.ConIProgress)
for _, conf := range confList { // for _, conf := range confList {
for _, cond := range conds { // for _, cond := range conds {
if cond.Conid == conf.TaskId { // if cond.Conid == conf.TaskId {
condMap[conf.TaskId] = cond // condMap[conf.TaskId] = cond
} // }
} // }
} // }
update := make(map[string]interface{}) // update := make(map[string]interface{})
if dt.Tasks == nil { // if dt.Tasks == nil {
for k, v := range condMap { // for k, v := range condMap {
tt := &pb.MoonTask{ // tt := &pb.MoonTask{
TaskId: k, // TaskId: k,
Cond: v, // }
} // if v.State == pb.BuriedItemFinishState_buried_finish {
if v.State == pb.BuriedItemFinishState_buried_finish { // tt.Received = 1
tt.Received = 1 // }
} // dt.Tasks = append(dt.Tasks, tt)
dt.Tasks = append(dt.Tasks, tt) // }
} // update["tasks"] = dt.Tasks
update["tasks"] = dt.Tasks // if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil { // this.Error(err.Error())
this.Error(err.Error()) // return
return // }
} // return
return // }
}
var newTask []*pb.MoonTask // var newTask []*pb.MoonTask
existTaskMap := make(map[int32]*pb.MoonTask) // existTaskMap := make(map[int32]*pb.MoonTask)
for _, task := range dt.Tasks { // for _, task := range dt.Tasks {
existTaskMap[task.TaskId] = task // existTaskMap[task.TaskId] = task
} // }
for k, v := range condMap { // for k, v := range condMap {
if task, ok := existTaskMap[k]; ok { // if task, ok := existTaskMap[k]; ok {
task.Cond = v // if v.State == pb.BuriedItemFinishState_buried_finish {
if v.State == pb.BuriedItemFinishState_buried_finish { // task.Received = 1
task.Received = 1 // }
} // } else {
} else { // nt := &pb.MoonTask{
nt := &pb.MoonTask{ // TaskId: k,
TaskId: k, // }
Cond: v, // if v.State == pb.BuriedItemFinishState_buried_finish {
} // nt.Received = 1
if v.State == pb.BuriedItemFinishState_buried_finish { // }
nt.Received = 1 // newTask = append(newTask, nt)
} // }
newTask = append(newTask, nt) // }
} // dt.Tasks = append(dt.Tasks, newTask...)
} // update["tasks"] = dt.Tasks
dt.Tasks = append(dt.Tasks, newTask...)
update["tasks"] = dt.Tasks
if len(update) > 0 { // if len(update) > 0 {
if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil { // if err := this.modelMoonlv.modifyMoonlvList(session.GetUserId(), update); err != nil {
this.Error(err.Error()) // this.Error(err.Error())
return // return
} // }
} // }
} }
func (this *Moonlv) GMCreateMoonlv(session comm.IUserSession, lv int32) { func (this *Moonlv) GMCreateMoonlv(session comm.IUserSession, lv int32) {

View File

@ -27,7 +27,7 @@ type DBMoonLv struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID 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 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"` // 任务列表 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"` // 月明度等级 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"` // 等级奖励 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"` // 等级奖励
} }
@ -78,7 +78,7 @@ func (x *DBMoonLv) GetUid() string {
return "" return ""
} }
func (x *DBMoonLv) GetTasks() []*MoonTask { func (x *DBMoonLv) GetTasks() map[int32]int32 {
if x != nil { if x != nil {
return x.Tasks return x.Tasks
} }
@ -99,95 +99,29 @@ func (x *DBMoonLv) GetReward() map[int32]bool {
return nil 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 protoreflect.FileDescriptor
var file_moonlv_moonlv_db_proto_rawDesc = []byte{ var file_moonlv_moonlv_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x6d, 0x6f, 0x6f, 0x6e, 0x6c, 0x76, 0x2f, 0x6d, 0x6f, 0x6f, 0x6e, 0x6c, 0x76, 0x5f, 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, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x4d,
0x2f, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x22, 0xc7, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c,
0x1f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x76, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61,
0x2e, 0x4d, 0x6f, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x73, 0x6b, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x02, 0x6c, 0x76, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20,
0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x2e, 0x52,
0x32, 0x15, 0x2e, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x4c, 0x76, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61,
0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x72, 0x64, 0x1a, 0x38, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x61, 0x0a, 0x08, 0x4d, 0x6f, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61,
0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x63, 0x6f, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
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,
} }
var ( var (
@ -205,19 +139,17 @@ 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_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_moonlv_moonlv_db_proto_goTypes = []interface{}{ var file_moonlv_moonlv_db_proto_goTypes = []interface{}{
(*DBMoonLv)(nil), // 0: DBMoonLv (*DBMoonLv)(nil), // 0: DBMoonLv
(*MoonTask)(nil), // 1: MoonTask nil, // 1: DBMoonLv.TasksEntry
nil, // 2: DBMoonLv.RewardEntry nil, // 2: DBMoonLv.RewardEntry
(*ConIProgress)(nil), // 3: ConIProgress
} }
var file_moonlv_moonlv_db_proto_depIdxs = []int32{ 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 2, // 1: DBMoonLv.reward:type_name -> DBMoonLv.RewardEntry
3, // 2: MoonTask.cond:type_name -> ConIProgress 2, // [2:2] is the sub-list for method output_type
3, // [3:3] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type
3, // [3:3] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee
3, // [3:3] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name
0, // [0:3] is the sub-list for field type_name
} }
func init() { file_moonlv_moonlv_db_proto_init() } 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 { if File_moonlv_moonlv_db_proto != nil {
return return
} }
file_buried_buried_db_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_moonlv_moonlv_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_moonlv_moonlv_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBMoonLv); i { switch v := v.(*DBMoonLv); i {
@ -239,18 +170,6 @@ func file_moonlv_moonlv_db_proto_init() {
return nil 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{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{