worldtask

This commit is contained in:
wh_zcy 2023-03-23 17:27:16 +08:00
parent bf98281c0a
commit 64a50c4f57
11 changed files with 1339 additions and 144 deletions

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,8 @@
},
"npc": 1,
"completetask": [
20001
20001,
20002
],
"deliver_npc": 1,
"auto_accept": 1,
@ -50,12 +51,12 @@
"key": "story_80",
"text": "新手引导"
},
"npc": 1,
"npc": 2,
"completetask": [
0
],
"deliver_npc": 1,
"auto_accept": 1,
"deliver_npc": 2,
"auto_accept": 0,
"reword": [],
"module": [
"practice"
@ -81,7 +82,7 @@
"key": "story_80",
"text": "新手引导"
},
"npc": 1,
"npc": 3,
"completetask": [
0
],
@ -352,7 +353,7 @@
},
"npc": 12,
"completetask": [
301
198
],
"deliver_npc": 12,
"auto_accept": 1,
@ -474,7 +475,7 @@
},
"npc": 16,
"completetask": [
161
0
],
"deliver_npc": 16,
"auto_accept": 1,
@ -654,7 +655,7 @@
},
"npc": 22,
"completetask": [
0
301
],
"deliver_npc": 22,
"auto_accept": 1,
@ -747,5 +748,34 @@
"auto_accept": 1,
"reword": [],
"module": []
},
{
"key": 30001,
"lock": 1,
"ontxe": 20010,
"id_after": 30002,
"group": 3,
"des": 2,
"icon": "",
"task_Tname": {
"key": "story_80",
"text": "初来乍到"
},
"task_name": {
"key": "story_80",
"text": "新手引导"
},
"task_display": {
"key": "story_80",
"text": "新手引导"
},
"npc": 27,
"completetask": [
301
],
"deliver_npc": 28,
"auto_accept": 0,
"reword": [],
"module": []
}
]

View File

@ -369,7 +369,9 @@ type (
// 世界任务
IWorldtask interface {
// 任务条件达成通知
// Deprecated
TaskcondNotify(session IUserSession, condId int32) error
TaskCondFinishNotify(session IUserSession, condId int32) error
// bingo所有任务
BingoAllTask(session IUserSession) error
// bingo任务

View File

@ -78,6 +78,18 @@ func (this *ModelRtask) checkCondi(uid string, condiId int32) (err error, ok boo
if condiId <= 0 {
return nil, true
}
conf, err := this.moduleRtask.configure.getRtaskTypeById(condiId)
if err != nil {
errors.Errorf("conf not found condiID: %v", condiId)
return
}
if conf.Valid == 1 {
ok = true
return
}
//验证限定条件
var condi *rtaskCondi
cond, ok := this.moduleRtask.handleMap.Load(condiId)
@ -95,14 +107,11 @@ func (this *ModelRtask) checkCondi(uid string, condiId int32) (err error, ok boo
errors.Errorf("condiID: %v", condiId)
return
}
conf, err := this.moduleRtask.configure.getRtaskTypeById(condiId)
if err != nil {
errors.Errorf("conf not found condiID: %v", condiId)
return
}
if ok, err = condi.verify(uid, conf); !ok {
err = errors.WithMessagef(err, "uid: %v do rtask [condiId:%v] condition not reach", uid, condiId)
return
}
return
}

View File

@ -441,7 +441,7 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com
module, err := this.service.GetModule(comm.ModuleWorldtask)
if err == nil {
if worldtask, ok := module.(comm.IWorldtask); ok {
if err := worldtask.TaskcondNotify(session, conf.Id); err != nil {
if err := worldtask.TaskCondFinishNotify(session, conf.Id); err != nil {
log.Error("任务条件达成通知",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "condId", Value: conf.Id},

View File

@ -28,18 +28,13 @@ func (this *apiComp) CompleteCondi(session comm.IUserSession, req *pb.WorldtaskC
return
}
if req.CondiId == 2000120003 {
myWorldtask.CondiIds = append(myWorldtask.CondiIds, 20001)
} else {
if m, err := this.module.service.GetModule(comm.ModuleWorldtask); err == nil {
iwt, ok := m.(comm.IRtask)
if ok {
if code = iwt.CheckCondi(uid, req.CondiId); code == pb.ErrorCode_Success {
myWorldtask.CondiIds = append(myWorldtask.CondiIds, req.CondiId)
} else {
return
}
if m, err := this.module.service.GetModule(comm.ModuleRtask); err == nil {
iwt, ok := m.(comm.IRtask)
if ok {
if code = iwt.CheckCondi(uid, req.CondiId); code != pb.ErrorCode_Success {
return
}
myWorldtask.CondiIds = append(myWorldtask.CondiIds, req.CondiId)
}
}

View File

@ -87,38 +87,53 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
}
if curTaskConf.IdAfter != 0 {
nextTaskId = curTaskConf.IdAfter
// 任务完成推送
if err := session.SendMsg(string(this.module.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{
NextTaskId: nextTaskId,
}); err != nil {
code = pb.ErrorCode_SystemError
//检查下个任务的完成条件
nextTaskConf, err := this.module.configure.getWorldtaskById(nextTaskId)
if err != nil || curTaskConf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
for _, condiId := range nextTaskConf.Completetask {
if m, err := this.module.service.GetModule(comm.ModuleRtask); err == nil {
iwt, ok := m.(comm.IRtask)
if ok {
if code = iwt.CheckCondi(uid, condiId); code != pb.ErrorCode_Success {
return
}
userTask.CondiIds = append(userTask.CondiIds, condiId)
}
}
}
//设置当前进行的任务
userTask.CurrentTaskIds[curTaskConf.Group] = &pb.Worldtask{
TaskId: nextTaskId,
TaskType: 2,
}
update := map[string]interface{}{
"condiIds": userTask.CondiIds,
"currentTaskIds": userTask.CurrentTaskIds,
}
if err := this.module.modelWorldtask.Change(uid, update); err != nil {
code = pb.ErrorCode_DBError
return
}
// 任务完成推送
if err := session.SendMsg(string(this.module.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{
NextTaskId: nextTaskId,
CondIds: userTask.CondiIds,
}); err != nil {
code = pb.ErrorCode_SystemError
return
}
}
}
finishCall := func() {
defer func() {
this.module.Debug("世界任务完成",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "params", Value: req},
log.Field{Key: "nextTaskId", Value: nextTaskId},
)
}()
for _, v := range curTaskConf.Reword {
if v.A == comm.HeroType {
@ -157,12 +172,12 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
this.module.Errorln(err)
continue
}
if ic, ok := i.(comm.ITaskComplete); ok {
ic.TaskComplete(session, req.TaskId)
}
}
}
}
//判断任务是否已完成
@ -177,23 +192,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
}
}
// if len(curTaskConf.Completetask) != 0 {
// for _, v := range curTaskConf.Completetask {
// if c := this.module.ModuleRtask.CheckCondi(uid, v); c == pb.ErrorCode_Success {
// finishCall()
// } else {
// this.module.Debug("任务完成条件未通过",
// log.Field{Key: "uid", Value: uid},
// log.Field{Key: "condiId", Value: curTaskConf.Completetask},
// )
// code = pb.ErrorCode_TaskNoFinished
// return
// }
// }
// } else {
finishCall()
// }
finishRsp()

View File

@ -38,7 +38,7 @@ func (this *ModelWorldtask) getWorldtask(uid string) (*pb.DBWorldtask, error) {
return d, nil
}
//判断前置任务是否完成
// 判断前置任务是否完成
// true 已完成 false未完成
func (this *ModelWorldtask) IsPreFinished(userTask *pb.DBWorldtask, curTaskConf *cfg.GameWorldTaskData) bool {
var (
@ -96,6 +96,7 @@ func (this *ModelWorldtask) finishTask(groupId, taskId int32, task *pb.DBWorldta
update["taskList"] = task.TaskList
update["lastTaskIds"] = task.LastTaskIds
update["deliverNpc"] = 1
update["condiIds"] = []int32{}
if err := this.Change(task.Uid, update); err != nil {
return err
}

View File

@ -55,6 +55,50 @@ func (this *Worldtask) Start() (err error) {
}
// 任务条件达成通知
func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId int32) error {
uid := session.GetUserId()
// 玩家世界任务
userTask, err := this.modelWorldtask.getWorldtask(uid)
if err != nil {
this.Error("获取玩家世界任务", log.Field{Key: "uid", Value: uid}, log.Field{Key: "condId", Value: condId})
return err
}
// 检索condId是否是世界任务的完成条件
finishedTaskIds := make(map[int32]int32) //达成的任务条件
for _, c := range this.worldtaskConf.GetDataList() {
for _, v := range c.Completetask {
if v == condId {
finishedTaskIds[c.Group] = c.Key
}
}
}
if len(finishedTaskIds) == 0 {
return nil
}
userTask.CondiIds = append(userTask.CondiIds, condId)
update := map[string]interface{}{
"condiIds": userTask.CondiIds,
}
this.modelWorldtask.Change(uid, update)
for k, v := range userTask.CurrentTaskIds {
session.SendMsg(string(this.GetType()), "completecondis", &pb.WorldtaskCompletecondisPush{
GroupId: k,
TaskId: v.TaskId,
CondiIds: userTask.CondiIds,
})
this.Debug("推送完成条件",log.Field{Key: "condiIds",Value: v.TaskId})
}
return nil
}
// 任务条件达成通知
// Deprecated
func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) error {
uid := session.GetUserId()

View File

@ -218,16 +218,18 @@ func (x *WorldtaskAcceptResp) GetTaskId() int32 {
}
//任务完成条件推送
type WorldtaskCompletetaskPush struct {
type WorldtaskCompletecondisPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CondiIds []int32 `protobuf:"varint,1,rep,packed,name=condiIds,proto3" json:"condiIds"`
GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"`
TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"`
CondiIds []int32 `protobuf:"varint,3,rep,packed,name=condiIds,proto3" json:"condiIds"`
}
func (x *WorldtaskCompletetaskPush) Reset() {
*x = WorldtaskCompletetaskPush{}
func (x *WorldtaskCompletecondisPush) Reset() {
*x = WorldtaskCompletecondisPush{}
if protoimpl.UnsafeEnabled {
mi := &file_worldtask_worldtask_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -235,13 +237,13 @@ func (x *WorldtaskCompletetaskPush) Reset() {
}
}
func (x *WorldtaskCompletetaskPush) String() string {
func (x *WorldtaskCompletecondisPush) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorldtaskCompletetaskPush) ProtoMessage() {}
func (*WorldtaskCompletecondisPush) ProtoMessage() {}
func (x *WorldtaskCompletetaskPush) ProtoReflect() protoreflect.Message {
func (x *WorldtaskCompletecondisPush) ProtoReflect() protoreflect.Message {
mi := &file_worldtask_worldtask_msg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -253,12 +255,26 @@ func (x *WorldtaskCompletetaskPush) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use WorldtaskCompletetaskPush.ProtoReflect.Descriptor instead.
func (*WorldtaskCompletetaskPush) Descriptor() ([]byte, []int) {
// Deprecated: Use WorldtaskCompletecondisPush.ProtoReflect.Descriptor instead.
func (*WorldtaskCompletecondisPush) Descriptor() ([]byte, []int) {
return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{4}
}
func (x *WorldtaskCompletetaskPush) GetCondiIds() []int32 {
func (x *WorldtaskCompletecondisPush) GetGroupId() int32 {
if x != nil {
return x.GroupId
}
return 0
}
func (x *WorldtaskCompletecondisPush) GetTaskId() int32 {
if x != nil {
return x.TaskId
}
return 0
}
func (x *WorldtaskCompletecondisPush) GetCondiIds() []int32 {
if x != nil {
return x.CondiIds
}
@ -509,7 +525,8 @@ type WorldtaskNexttaskPush struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NextTaskId int32 `protobuf:"varint,1,opt,name=nextTaskId,proto3" json:"nextTaskId"` //下一个任务ID
NextTaskId int32 `protobuf:"varint,1,opt,name=nextTaskId,proto3" json:"nextTaskId"` //下一个任务ID
CondIds []int32 `protobuf:"varint,2,rep,packed,name=condIds,proto3" json:"condIds"` // 条件ID
}
func (x *WorldtaskNexttaskPush) Reset() {
@ -551,6 +568,13 @@ func (x *WorldtaskNexttaskPush) GetNextTaskId() int32 {
return 0
}
func (x *WorldtaskNexttaskPush) GetCondIds() []int32 {
if x != nil {
return x.CondIds
}
return nil
}
// 开始战斗
type WorldtaskBattleStartReq struct {
state protoimpl.MessageState
@ -835,63 +859,68 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{
0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x22, 0x37, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12,
0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x19, 0x57,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75,
0x49, 0x64, 0x22, 0x6b, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x73, 0x50, 0x75, 0x73,
0x68, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x18,
0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x73, 0x22,
0x67, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70,
0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e,
0x64, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64,
0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69,
0x49, 0x64, 0x22, 0x46, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46,
0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x64, 0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x64, 0x69, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x1a, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73,
0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65,
0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x46,
0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73,
0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16,
0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a,
0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22,
0x37, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78, 0x74,
0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74,
0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x65,
0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c,
0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x22, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a,
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7d,
0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 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, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66,
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x33, 0x0a,
0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46,
0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08,
0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a,
0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b,
0x4c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x57, 0x6f,
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73,
0x70, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x22, 0x51, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
0x4e, 0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a,
0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74,
0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65,
0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22,
0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69,
0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7d, 0x0a, 0x18,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46,
0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 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, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x33, 0x0a, 0x19, 0x57,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69,
0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e,
0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, 0x74, 0x61,
0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69,
0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -908,26 +937,26 @@ func file_worldtask_worldtask_msg_proto_rawDescGZIP() []byte {
var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{
(*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq
(*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp
(*WorldtaskAcceptReq)(nil), // 2: WorldtaskAcceptReq
(*WorldtaskAcceptResp)(nil), // 3: WorldtaskAcceptResp
(*WorldtaskCompletetaskPush)(nil), // 4: WorldtaskCompletetaskPush
(*WorldtaskCompleteCondiReq)(nil), // 5: WorldtaskCompleteCondiReq
(*WorldtaskCompleteCondiResp)(nil), // 6: WorldtaskCompleteCondiResp
(*WorldtaskFinishReq)(nil), // 7: WorldtaskFinishReq
(*WorldtaskFinishResp)(nil), // 8: WorldtaskFinishResp
(*WorldtaskNexttaskPush)(nil), // 9: WorldtaskNexttaskPush
(*WorldtaskBattleStartReq)(nil), // 10: WorldtaskBattleStartReq
(*WorldtaskBattleStartResp)(nil), // 11: WorldtaskBattleStartResp
(*WorldtaskBattleFinishReq)(nil), // 12: WorldtaskBattleFinishReq
(*WorldtaskBattleFinishResp)(nil), // 13: WorldtaskBattleFinishResp
(*WorldtaskFinishIdsPush)(nil), // 14: WorldtaskFinishIdsPush
(*DBWorldtask)(nil), // 15: DBWorldtask
(*BattleFormation)(nil), // 16: BattleFormation
(*BattleInfo)(nil), // 17: BattleInfo
(*BattleReport)(nil), // 18: BattleReport
(*Worldtask)(nil), // 19: Worldtask
(*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq
(*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp
(*WorldtaskAcceptReq)(nil), // 2: WorldtaskAcceptReq
(*WorldtaskAcceptResp)(nil), // 3: WorldtaskAcceptResp
(*WorldtaskCompletecondisPush)(nil), // 4: WorldtaskCompletecondisPush
(*WorldtaskCompleteCondiReq)(nil), // 5: WorldtaskCompleteCondiReq
(*WorldtaskCompleteCondiResp)(nil), // 6: WorldtaskCompleteCondiResp
(*WorldtaskFinishReq)(nil), // 7: WorldtaskFinishReq
(*WorldtaskFinishResp)(nil), // 8: WorldtaskFinishResp
(*WorldtaskNexttaskPush)(nil), // 9: WorldtaskNexttaskPush
(*WorldtaskBattleStartReq)(nil), // 10: WorldtaskBattleStartReq
(*WorldtaskBattleStartResp)(nil), // 11: WorldtaskBattleStartResp
(*WorldtaskBattleFinishReq)(nil), // 12: WorldtaskBattleFinishReq
(*WorldtaskBattleFinishResp)(nil), // 13: WorldtaskBattleFinishResp
(*WorldtaskFinishIdsPush)(nil), // 14: WorldtaskFinishIdsPush
(*DBWorldtask)(nil), // 15: DBWorldtask
(*BattleFormation)(nil), // 16: BattleFormation
(*BattleInfo)(nil), // 17: BattleInfo
(*BattleReport)(nil), // 18: BattleReport
(*Worldtask)(nil), // 19: Worldtask
}
var file_worldtask_worldtask_msg_proto_depIdxs = []int32{
15, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask
@ -999,7 +1028,7 @@ func file_worldtask_worldtask_msg_proto_init() {
}
}
file_worldtask_worldtask_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorldtaskCompletetaskPush); i {
switch v := v.(*WorldtaskCompletecondisPush); i {
case 0:
return &v.state
case 1:

View File

@ -12,7 +12,10 @@ import "errors"
type GameRdtaskCondiData struct {
Id int32
TypeSp int32
Tasktxt string
Type int32
Valid int32
Data1 int32
Data2 int32
Data3 int32
@ -28,7 +31,10 @@ func (*GameRdtaskCondiData) GetTypeId() int32 {
func (_v *GameRdtaskCondiData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type_sp"].(float64); !_ok_ { err = errors.New("type_sp error"); return }; _v.TypeSp = int32(_tempNum_) }
{ var _ok_ bool; if _v.Tasktxt, _ok_ = _buf["tasktxt"].(string); !_ok_ { err = errors.New("tasktxt error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["valid"].(float64); !_ok_ { err = errors.New("valid error"); return }; _v.Valid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data1"].(float64); !_ok_ { err = errors.New("data1 error"); return }; _v.Data1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data2"].(float64); !_ok_ { err = errors.New("data2 error"); return }; _v.Data2 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data3"].(float64); !_ok_ { err = errors.New("data3 error"); return }; _v.Data3 = int32(_tempNum_) }