Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
e648b283ed
@ -402,8 +402,8 @@ type (
|
||||
JumpTaskByTaskId(session IUserSession, rtaskId int32) error
|
||||
// 查询我的世界任务
|
||||
GetMyWorldtask(uid string) *pb.DBWorldtask
|
||||
// 获取分组任务
|
||||
GetWorldTaskBy(session IUserSession, groupId int32) int32
|
||||
//接取商队任务
|
||||
AcceptCaravanTask(session IUserSession, groupId int32) (task *pb.Worldtask, errdata *pb.ErrorData)
|
||||
//更新接取任务
|
||||
UpdateTaskStatus(uid string, taskId int32)
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.CaravanGetListRe
|
||||
}
|
||||
// 刷新城市货物信息
|
||||
this.module.refreshCaravanCityInfo(session.GetUserId(), list)
|
||||
resp.TaskTimeOut = this.module.CheckCaravanTask(session, list)
|
||||
resp.Data = list
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", resp)
|
||||
return
|
||||
|
@ -47,7 +47,11 @@ func (this *apiComp) GetStory(session comm.IUserSession, req *pb.CaravanGetStory
|
||||
return
|
||||
}
|
||||
if wt, ok := module.(comm.IWorldtask); ok {
|
||||
list.Taskid = wt.GetWorldTaskBy(session, conf.Worldtask)
|
||||
resp.Task, errdata = wt.AcceptCaravanTask(session, conf.Worldtask)
|
||||
if errdata != nil {
|
||||
return
|
||||
}
|
||||
list.Taskid = resp.Task.TaskId
|
||||
if list.Taskid != 0 { // 任务接取成功
|
||||
bAccept = true
|
||||
|
||||
|
@ -224,7 +224,7 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
|
||||
}
|
||||
|
||||
// 校验随机事件是否超时
|
||||
func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCaravan) {
|
||||
func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCaravan) (bTimeOut bool) {
|
||||
if data.Eventid != 0 {
|
||||
if list, err := this.configure.GetCaravanEventById(data.Eventid); err == nil {
|
||||
// 校验任务是否超时
|
||||
@ -242,6 +242,7 @@ func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCara
|
||||
resp := &pb.CaravanTaskCompletePush{}
|
||||
resp.Data = data
|
||||
resp.BSuccess = false
|
||||
bTimeOut = true
|
||||
if len(list.Unreword) == 2 && list.Unreword[0] == 1 { // 类型为1 的 直接扣除虚拟币
|
||||
this.ConsumeRes(session, []*cfg.Gameatn{{
|
||||
A: "attr",
|
||||
@ -258,6 +259,7 @@ func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCara
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
func (this *Caravan) CleanCaravanTask(uid string, data *pb.DBCaravan) {
|
||||
if data.Eventid != 0 {
|
||||
|
@ -75,8 +75,9 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
}
|
||||
if pillar.Isunlock != 2 { //柱子未解锁
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: "pillar is no unlock",
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -96,8 +97,9 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
|
||||
if pillar.Usenum >= pillarconfigure.Limitation {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PracticeUseLimit,
|
||||
Title: pb.ErrorCode_PracticeUseLimit.ToString(),
|
||||
Code: pb.ErrorCode_PracticeUseLimit,
|
||||
Title: pb.ErrorCode_PracticeUseLimit.ToString(),
|
||||
Message: "pillar usenum to Limitation",
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ func (this *apiComp) FuncActivateCheck(session comm.IUserSession, req *pb.SysFun
|
||||
return
|
||||
}
|
||||
|
||||
// cond 值 为0 表示功能未开启 1 功能开启 需要手动激活 2 功能开启并激活
|
||||
func (this *apiComp) FuncActivate(session comm.IUserSession, req *pb.SysFuncActivateReq) (errdata *pb.ErrorData) {
|
||||
|
||||
rsp := &pb.SysFuncActivateResp{}
|
||||
@ -26,16 +27,15 @@ func (this *apiComp) FuncActivate(session comm.IUserSession, req *pb.SysFuncActi
|
||||
}
|
||||
|
||||
list, _ := this.module.modelSys.GetOpenCondList(session.GetUserId())
|
||||
for k, v := range list.Cond {
|
||||
if k == req.Cid && v != 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_OpenCondActivate,
|
||||
Title: pb.ErrorCode_OpenCondActivate.ToString(),
|
||||
}
|
||||
return
|
||||
|
||||
if v, ok := list.Cond[req.Cid]; !ok || v != 1 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_OpenCondActivate,
|
||||
Title: pb.ErrorCode_OpenCondActivate.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
list.Cond[req.Cid] = 1
|
||||
list.Cond[req.Cid] = 2
|
||||
this.module.modelSys.ChangeOpenCondData(session.GetUserId(), map[string]interface{}{
|
||||
"cond": list.Cond,
|
||||
})
|
||||
|
@ -30,13 +30,15 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
||||
if list.Cond[v.Id] == 0 {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), v)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
list.Cond[id] = 1 //设置激活
|
||||
if v.ActivateType == 1 { // 需要手动激活的
|
||||
list.Cond[id] = 1 //设置激活
|
||||
} else {
|
||||
list.Cond[id] = 2 //自动激活
|
||||
}
|
||||
bChange = true
|
||||
}
|
||||
} else {
|
||||
rsp.Cond[v.Id] = 1
|
||||
}
|
||||
rsp.Cond[v.Id] = list.Cond[v.Id]
|
||||
}
|
||||
} else {
|
||||
for _, key := range req.Keys {
|
||||
@ -44,15 +46,16 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
||||
if conf, ok := opencfg.GetDataMap()[key]; ok {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), conf)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
list.Cond[key] = 1 //设置激活
|
||||
if conf.ActivateType == 1 { // 需要手动激活的
|
||||
list.Cond[id] = 1 //设置激活
|
||||
} else {
|
||||
list.Cond[id] = 2 //自动激活
|
||||
}
|
||||
bChange = true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rsp.Cond[key] = 1
|
||||
}
|
||||
|
||||
rsp.Cond[key] = list.Cond[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,30 +156,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
|
||||
return
|
||||
}
|
||||
|
||||
// taskConds := make(map[int32][]*pb.CurrentTask)
|
||||
// finishedCondIds := []*pb.ConIProgress{}
|
||||
|
||||
// for _, cond := range conds {
|
||||
// if cfg, ok := this.configure.worldtaskConf[cond.Conid]; ok {
|
||||
// //校验任务是否是当前任务
|
||||
// if task, ok := userTask.CurrentTasks[cfg.Group]; ok {
|
||||
// var currentTasks []*pb.CurrentTask
|
||||
// for _, t := range task.TaskMap {
|
||||
// if cfg.Key == t.TaskId {
|
||||
// finishedCondIds = append(finishedCondIds, cond)
|
||||
// currentTasks = append(currentTasks, &pb.CurrentTask{
|
||||
// GroupId: cfg.Group,
|
||||
// TaskId: cfg.Key,
|
||||
// Conds: finishedCondIds,
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if currentTasks != nil {
|
||||
// taskConds[cfg.Group] = currentTasks
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
tasks := map[int32][]int32{}
|
||||
taskgroup := map[int32]int32{}
|
||||
allconds := []int32{}
|
||||
@ -255,116 +231,11 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
|
||||
}
|
||||
}
|
||||
|
||||
// var currentTasks []*pb.CurrentTask
|
||||
// for _, tasks := range taskConds {
|
||||
// for _, t := range tasks {
|
||||
// // curTaskConf, err := this.configure.getWorldtaskById(t.TaskId)
|
||||
// // if err != nil || curTaskConf == nil {
|
||||
// // return
|
||||
// // }
|
||||
// // var flag bool
|
||||
// // if curTaskConf.DeliverNpc == 0 {
|
||||
// // //判断当前任务下的条件是否全部是完成状态
|
||||
// // for _, cond := range t.Conds {
|
||||
// // if cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||
// // flag = true
|
||||
// // } else {
|
||||
// // flag = false
|
||||
// // }
|
||||
// // }
|
||||
// // if flag {
|
||||
|
||||
// // defer func() {
|
||||
// // this.modelWorldtask.taskFinish(session, t.TaskId, userTask, curTaskConf)
|
||||
// // this.modelWorldtask.taskFinishPush(session, userTask, curTaskConf)
|
||||
// // }()
|
||||
// // }
|
||||
// // }
|
||||
// currentTasks = append(currentTasks, t)
|
||||
// }
|
||||
// }
|
||||
|
||||
// if len(currentTasks) > 0 {
|
||||
// session.SendMsg(string(this.GetType()), "changecondis", &pb.WorldtaskChangecondisPush{
|
||||
// Tasks: currentTasks,
|
||||
// })
|
||||
|
||||
// for _, task := range currentTasks {
|
||||
// curTaskConf, err := this.configure.getWorldtaskById(task.TaskId)
|
||||
// if err != nil || curTaskConf == nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
// var newconds []*pb.ConIProgress
|
||||
// if tasks, ok := userTask.CurrentTasks[task.GroupId]; ok {
|
||||
// if t, ok := tasks.TaskMap[task.TaskId]; ok {
|
||||
// //更新cond
|
||||
|
||||
// for _, t1 := range task.Conds {
|
||||
// for _, t2 := range t.Conds {
|
||||
// if t1.Conid == t2.Conid {
|
||||
// // t2 = t1
|
||||
// newconds = append(newconds, t1)
|
||||
// } else {
|
||||
// newconds = append(newconds, t2)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// t.Conds = newconds
|
||||
|
||||
// //判断所有的条件是都是
|
||||
// var flag bool
|
||||
// for _, cond := range t.Conds {
|
||||
// if cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||
// flag = true
|
||||
// } else {
|
||||
// flag = false
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
|
||||
// if curTaskConf.DeliverNpc == 0 {
|
||||
// if flag {
|
||||
// this.modelWorldtask.taskFinish(session, t.TaskId, userTask, curTaskConf)
|
||||
// this.modelWorldtask.taskFinishPush(session, userTask, curTaskConf)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
update := map[string]interface{}{
|
||||
"currentTasks": userTask.CurrentTasks,
|
||||
}
|
||||
this.modelWorldtask.Change(uid, update)
|
||||
|
||||
// for _, task := range currentTasks {
|
||||
// curTaskConf, err := this.configure.getWorldtaskById(task.TaskId)
|
||||
// if err != nil || curTaskConf == nil {
|
||||
// return
|
||||
// }
|
||||
// var flag bool
|
||||
// if curTaskConf.DeliverNpc == 0 {
|
||||
// if tasks, ok := userTask.CurrentTasks[task.GroupId]; ok {
|
||||
// if t, ok := tasks.TaskMap[task.TaskId]; ok {
|
||||
// for _, cond := range t.Conds {
|
||||
// if cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||
// flag = true
|
||||
// } else {
|
||||
// flag = false
|
||||
// }
|
||||
// }
|
||||
// if flag {
|
||||
// this.modelWorldtask.taskFinish(session, t.TaskId, userTask, curTaskConf)
|
||||
// this.modelWorldtask.taskFinishPush(session, userTask, curTaskConf)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -537,31 +408,44 @@ func (this *Worldtask) JumpTaskByTaskId(session comm.IUserSession, taskId int32)
|
||||
}
|
||||
|
||||
// 返回任务ID
|
||||
func (this *Worldtask) GetWorldTaskBy(session comm.IUserSession, groupId int32) (taskId int32) {
|
||||
func (this *Worldtask) AcceptCaravanTask(session comm.IUserSession, groupId int32) (task *pb.Worldtask, errdata *pb.ErrorData) {
|
||||
uid := session.GetUserId()
|
||||
var (
|
||||
curTaskConf *cfg.GameWorldTaskData
|
||||
isfinsh bool
|
||||
)
|
||||
mytask, err := this.modelWorldtask.getWorldtask(uid)
|
||||
if err != nil {
|
||||
return 0
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.String(),
|
||||
Message: "no found task data",
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if gwt, err := this.configure.getWorldtaskCfg(); err == nil {
|
||||
for _, v := range gwt.GetDataList() {
|
||||
if v.Group == groupId && v.Des == 5 {
|
||||
if _, ok := utils.Findx(mytask.TaskList, v.Key); !ok {
|
||||
taskId = v.Key
|
||||
task = &pb.Worldtask{
|
||||
TaskId: v.Key,
|
||||
TaskType: v.Des,
|
||||
NpcStatus: 1,
|
||||
}
|
||||
curTaskConf = v
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if taskId == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// 当前任务配置
|
||||
curTaskConf, err := this.configure.getWorldtaskById(taskId)
|
||||
if err != nil || curTaskConf == nil {
|
||||
if task == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.String(),
|
||||
Message: fmt.Sprintf("no fond groupId:%d", groupId),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -570,27 +454,44 @@ func (this *Worldtask) GetWorldTaskBy(session comm.IUserSession, groupId int32)
|
||||
}
|
||||
|
||||
if v, ok1 := mytask.CurrentTasks[curTaskConf.Group]; ok1 {
|
||||
v.TaskMap[taskId] = &pb.Worldtask{
|
||||
TaskId: taskId,
|
||||
v.TaskMap[task.TaskId] = &pb.Worldtask{
|
||||
TaskId: task.TaskId,
|
||||
TaskType: curTaskConf.Des,
|
||||
NpcStatus: 1,
|
||||
}
|
||||
}
|
||||
|
||||
if task.Conds, err = this.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...); err != nil {
|
||||
log.Errorf("调用接口错误:%s", err.Error())
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ExternalModule,
|
||||
Title: pb.ErrorCode_ExternalModule.String(),
|
||||
Message: fmt.Sprintf("ModuleBuried.CheckCondition err:%s", err.Error()),
|
||||
}
|
||||
return
|
||||
}
|
||||
isfinsh = true
|
||||
for _, v := range task.Conds {
|
||||
if v.State != pb.BuriedItemFinishState_buried_finish {
|
||||
isfinsh = false
|
||||
}
|
||||
}
|
||||
if isfinsh && curTaskConf.DeliverNpc != 0 {
|
||||
isfinsh = false
|
||||
}
|
||||
//判断是否要结束任务
|
||||
if ((len(curTaskConf.Completetask) >= 1 && curTaskConf.Completetask[0] == 0) ||
|
||||
len(curTaskConf.Completetask) == 0) && curTaskConf.DeliverNpc == 0 {
|
||||
isfinsh = true
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"currentTasks": mytask.CurrentTasks,
|
||||
}
|
||||
|
||||
if err := this.modelWorldtask.Change(uid, update); err != nil {
|
||||
|
||||
}
|
||||
|
||||
//判断是否要结束任务
|
||||
if ((len(curTaskConf.Completetask) >= 1 && curTaskConf.Completetask[0] == 0) ||
|
||||
len(curTaskConf.Completetask) == 0) &&
|
||||
curTaskConf.DeliverNpc == 0 {
|
||||
//结束任务
|
||||
this.modelWorldtask.taskFinish(session, taskId, mytask, curTaskConf)
|
||||
if isfinsh { //结束任务
|
||||
this.modelWorldtask.taskFinish(session, task.TaskId, mytask, curTaskConf)
|
||||
this.modelWorldtask.taskFinishPush(session, mytask, curTaskConf)
|
||||
}
|
||||
|
||||
|
@ -329,7 +329,7 @@ type DBActivityData struct {
|
||||
|
||||
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"`
|
||||
Hid int32 `protobuf:"varint,3,opt,name=hid,proto3" json:"hid"`
|
||||
Hdid int32 `protobuf:"varint,3,opt,name=hdid,proto3" json:"hdid"`
|
||||
Gotarr []int32 `protobuf:"varint,4,rep,packed,name=gotarr,proto3" json:"gotarr"`
|
||||
Lasttime int64 `protobuf:"varint,5,opt,name=lasttime,proto3" json:"lasttime"`
|
||||
Val int32 `protobuf:"varint,6,opt,name=val,proto3" json:"val"`
|
||||
@ -381,9 +381,9 @@ func (x *DBActivityData) GetUid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBActivityData) GetHid() int32 {
|
||||
func (x *DBActivityData) GetHdid() int32 {
|
||||
if x != nil {
|
||||
return x.Hid
|
||||
return x.Hdid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -450,16 +450,16 @@ var file_activity_activity_db_proto_rawDesc = []byte{
|
||||
0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74,
|
||||
0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
||||
0x8a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61,
|
||||
0x8c, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61,
|
||||
0x74, 0x61, 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, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61,
|
||||
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x68, 0x64, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61,
|
||||
0x72, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -65,7 +65,8 @@ type CaravanGetListResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBCaravan `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Data *DBCaravan `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
TaskTimeOut bool `protobuf:"varint,2,opt,name=taskTimeOut,proto3" json:"taskTimeOut"` // 任务是否超时
|
||||
}
|
||||
|
||||
func (x *CaravanGetListResp) Reset() {
|
||||
@ -107,6 +108,13 @@ func (x *CaravanGetListResp) GetData() *DBCaravan {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CaravanGetListResp) GetTaskTimeOut() bool {
|
||||
if x != nil {
|
||||
return x.TaskTimeOut
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type CaravanBuyOrSellReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -391,6 +399,7 @@ type CaravanGetStoryResp struct {
|
||||
|
||||
Data *DBCaravan `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
BSuccess bool `protobuf:"varint,2,opt,name=bSuccess,proto3" json:"bSuccess"` // 是否成功接取到任务
|
||||
Task *Worldtask `protobuf:"bytes,3,opt,name=task,proto3" json:"task"` // 任务进度
|
||||
}
|
||||
|
||||
func (x *CaravanGetStoryResp) Reset() {
|
||||
@ -439,6 +448,13 @@ func (x *CaravanGetStoryResp) GetBSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *CaravanGetStoryResp) GetTask() *Worldtask {
|
||||
if x != nil {
|
||||
return x.Task
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 任务完成推送
|
||||
type CaravanTaskCompletePush struct {
|
||||
state protoimpl.MessageState
|
||||
@ -712,12 +728,16 @@ var file_caravan_caravan_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61,
|
||||
0x6e, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x63, 0x61, 0x72,
|
||||
0x61, 0x76, 0x61, 0x6e, 0x2f, 0x63, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x5f, 0x64, 0x62, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61,
|
||||
0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43,
|
||||
0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb0, 0x01, 0x0a,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x2f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0x13, 0x0a, 0x11, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x71, 0x22, 0x56, 0x0a, 0x12, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47,
|
||||
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72,
|
||||
0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x0b, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x22, 0xb0, 0x01, 0x0a,
|
||||
0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x42, 0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c,
|
||||
0x6c, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d,
|
||||
@ -746,12 +766,14 @@ var file_caravan_caravan_msg_proto_rawDesc = []byte{
|
||||
0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63,
|
||||
0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x69, 0x74, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x79,
|
||||
0x22, 0x51, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74,
|
||||
0x22, 0x71, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x74,
|
||||
0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61,
|
||||
0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x62, 0x53, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x22, 0x7a, 0x0a, 0x17, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x54, 0x61,
|
||||
0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74,
|
||||
0x61, 0x73, 0x6b, 0x22, 0x7a, 0x0a, 0x17, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44,
|
||||
0x42, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a,
|
||||
@ -831,10 +853,11 @@ var file_caravan_caravan_msg_proto_goTypes = []interface{}{
|
||||
nil, // 15: CaravanRefreshCityResp.CityEntry
|
||||
nil, // 16: CaravanRefreshCityResp.OldpriceEntry
|
||||
(*DBCaravan)(nil), // 17: DBCaravan
|
||||
(*UserAssets)(nil), // 18: UserAssets
|
||||
(*CaravanRankInfo)(nil), // 19: CaravanRankInfo
|
||||
(*Goods)(nil), // 20: Goods
|
||||
(*CityInfo)(nil), // 21: CityInfo
|
||||
(*Worldtask)(nil), // 18: Worldtask
|
||||
(*UserAssets)(nil), // 19: UserAssets
|
||||
(*CaravanRankInfo)(nil), // 20: CaravanRankInfo
|
||||
(*Goods)(nil), // 21: Goods
|
||||
(*CityInfo)(nil), // 22: CityInfo
|
||||
}
|
||||
var file_caravan_caravan_msg_proto_depIdxs = []int32{
|
||||
17, // 0: CaravanGetListResp.data:type_name -> DBCaravan
|
||||
@ -842,20 +865,21 @@ var file_caravan_caravan_msg_proto_depIdxs = []int32{
|
||||
17, // 2: CaravanBuyOrSellResp.data:type_name -> DBCaravan
|
||||
17, // 3: CaravanGotoCityResp.data:type_name -> DBCaravan
|
||||
17, // 4: CaravanGetStoryResp.data:type_name -> DBCaravan
|
||||
17, // 5: CaravanTaskCompletePush.data:type_name -> DBCaravan
|
||||
18, // 6: CaravanTaskCompletePush.reward:type_name -> UserAssets
|
||||
19, // 7: CaravanRankListResp.list:type_name -> CaravanRankInfo
|
||||
19, // 8: CaravanRankListResp.userinfo:type_name -> CaravanRankInfo
|
||||
14, // 9: CaravanRefreshCityResp.goods:type_name -> CaravanRefreshCityResp.GoodsEntry
|
||||
15, // 10: CaravanRefreshCityResp.city:type_name -> CaravanRefreshCityResp.CityEntry
|
||||
16, // 11: CaravanRefreshCityResp.Oldprice:type_name -> CaravanRefreshCityResp.OldpriceEntry
|
||||
20, // 12: CaravanRefreshCityResp.GoodsEntry.value:type_name -> Goods
|
||||
21, // 13: CaravanRefreshCityResp.CityEntry.value:type_name -> CityInfo
|
||||
14, // [14:14] is the sub-list for method output_type
|
||||
14, // [14:14] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
18, // 5: CaravanGetStoryResp.task:type_name -> Worldtask
|
||||
17, // 6: CaravanTaskCompletePush.data:type_name -> DBCaravan
|
||||
19, // 7: CaravanTaskCompletePush.reward:type_name -> UserAssets
|
||||
20, // 8: CaravanRankListResp.list:type_name -> CaravanRankInfo
|
||||
20, // 9: CaravanRankListResp.userinfo:type_name -> CaravanRankInfo
|
||||
14, // 10: CaravanRefreshCityResp.goods:type_name -> CaravanRefreshCityResp.GoodsEntry
|
||||
15, // 11: CaravanRefreshCityResp.city:type_name -> CaravanRefreshCityResp.CityEntry
|
||||
16, // 12: CaravanRefreshCityResp.Oldprice:type_name -> CaravanRefreshCityResp.OldpriceEntry
|
||||
21, // 13: CaravanRefreshCityResp.GoodsEntry.value:type_name -> Goods
|
||||
22, // 14: CaravanRefreshCityResp.CityEntry.value:type_name -> CityInfo
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_caravan_caravan_msg_proto_init() }
|
||||
@ -864,6 +888,7 @@ func file_caravan_caravan_msg_proto_init() {
|
||||
return
|
||||
}
|
||||
file_caravan_caravan_db_proto_init()
|
||||
file_worldtask_worldtask_db_proto_init()
|
||||
file_comm_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_caravan_caravan_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
|
Loading…
Reference in New Issue
Block a user