From 32c7289e4fdac2be43d35309567274689fb3f40d Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Fri, 30 Jun 2023 16:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=AC=A1=E6=95=B0=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_dispatch_task.json | 135 ++++++++++++------ modules/dispatch/api_receive.go | 10 ++ modules/dispatch/configure.go | 16 --- modules/dispatch/model_dispatch.go | 47 ++---- pb/dispatch_db.pb.go | 109 ++++++++------ .../structs/Game.Dispatch_TaskData.go | 2 + 6 files changed, 180 insertions(+), 139 deletions(-) diff --git a/bin/json/game_dispatch_task.json b/bin/json/game_dispatch_task.json index 77878d814..988f999ce 100644 --- a/bin/json/game_dispatch_task.json +++ b/bin/json/game_dispatch_task.json @@ -45,7 +45,8 @@ "t": "ps", "n": 10 } - ] + ], + "completecount": 0 }, { "id": 2, @@ -93,7 +94,8 @@ "t": "10000005", "n": 5 } - ] + ], + "completecount": 0 }, { "id": 3, @@ -141,7 +143,8 @@ "t": "15000104", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 4, @@ -189,7 +192,8 @@ "t": "15000102", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 5, @@ -237,7 +241,8 @@ "t": "15000101", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 6, @@ -285,7 +290,8 @@ "t": "15000103", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 7, @@ -333,7 +339,8 @@ "t": "diamond", "n": 5 } - ] + ], + "completecount": 0 }, { "id": 8, @@ -381,7 +388,8 @@ "t": "gold", "n": 80000 } - ] + ], + "completecount": 0 }, { "id": 19, @@ -429,7 +437,8 @@ "t": "ps", "n": 20 } - ] + ], + "completecount": 0 }, { "id": 20, @@ -477,7 +486,8 @@ "t": "10000005", "n": 10 } - ] + ], + "completecount": 0 }, { "id": 21, @@ -525,7 +535,8 @@ "t": "15000104", "n": 12 } - ] + ], + "completecount": 0 }, { "id": 22, @@ -573,7 +584,8 @@ "t": "15000102", "n": 12 } - ] + ], + "completecount": 0 }, { "id": 23, @@ -621,7 +633,8 @@ "t": "15000101", "n": 12 } - ] + ], + "completecount": 0 }, { "id": 24, @@ -669,7 +682,8 @@ "t": "15000103", "n": 12 } - ] + ], + "completecount": 0 }, { "id": 25, @@ -717,7 +731,8 @@ "t": "diamond", "n": 10 } - ] + ], + "completecount": 0 }, { "id": 26, @@ -765,7 +780,8 @@ "t": "gold", "n": 80000 } - ] + ], + "completecount": 0 }, { "id": 34, @@ -813,7 +829,8 @@ "t": "ps", "n": 30 } - ] + ], + "completecount": 0 }, { "id": 35, @@ -861,7 +878,8 @@ "t": "10000006", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 36, @@ -909,7 +927,8 @@ "t": "15000204", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 37, @@ -957,7 +976,8 @@ "t": "15000202", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 38, @@ -1005,7 +1025,8 @@ "t": "15000201", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 39, @@ -1053,7 +1074,8 @@ "t": "15000203", "n": 6 } - ] + ], + "completecount": 0 }, { "id": 40, @@ -1101,7 +1123,8 @@ "t": "diamond", "n": 15 } - ] + ], + "completecount": 0 }, { "id": 41, @@ -1149,7 +1172,8 @@ "t": "10000008", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 42, @@ -1197,7 +1221,8 @@ "t": "10000011", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 43, @@ -1245,7 +1270,8 @@ "t": "gold", "n": 120000 } - ] + ], + "completecount": 0 }, { "id": 60, @@ -1293,7 +1319,8 @@ "t": "10000006", "n": 10 } - ] + ], + "completecount": 0 }, { "id": 61, @@ -1341,7 +1368,8 @@ "t": "15000304", "n": 4 } - ] + ], + "completecount": 0 }, { "id": 62, @@ -1389,7 +1417,8 @@ "t": "15000302", "n": 4 } - ] + ], + "completecount": 0 }, { "id": 63, @@ -1437,7 +1466,8 @@ "t": "15000301", "n": 4 } - ] + ], + "completecount": 0 }, { "id": 64, @@ -1485,7 +1515,8 @@ "t": "15000303", "n": 4 } - ] + ], + "completecount": 0 }, { "id": 65, @@ -1533,7 +1564,8 @@ "t": "diamond", "n": 30 } - ] + ], + "completecount": 0 }, { "id": 66, @@ -1581,7 +1613,8 @@ "t": "10000009", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 67, @@ -1629,7 +1662,8 @@ "t": "10000011", "n": 2 } - ] + ], + "completecount": 0 }, { "id": 68, @@ -1677,7 +1711,8 @@ "t": "diamond", "n": 30 } - ] + ], + "completecount": 0 }, { "id": 69, @@ -1725,7 +1760,8 @@ "t": "20011", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 70, @@ -1773,7 +1809,8 @@ "t": "20012", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 71, @@ -1821,7 +1858,8 @@ "t": "20013", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 72, @@ -1869,7 +1907,8 @@ "t": "20014", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 73, @@ -1917,7 +1956,8 @@ "t": "20015", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 74, @@ -1965,7 +2005,8 @@ "t": "20016", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 75, @@ -2013,7 +2054,8 @@ "t": "20017", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 76, @@ -2061,7 +2103,8 @@ "t": "20018", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 77, @@ -2109,7 +2152,8 @@ "t": "20019", "n": 1 } - ] + ], + "completecount": 0 }, { "id": 78, @@ -2157,6 +2201,7 @@ "t": "20020", "n": 1 } - ] + ], + "completecount": 0 } ] \ No newline at end of file diff --git a/modules/dispatch/api_receive.go b/modules/dispatch/api_receive.go index 4999b7295..67d0dcd6f 100644 --- a/modules/dispatch/api_receive.go +++ b/modules/dispatch/api_receive.go @@ -70,6 +70,16 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq) if oldTask.Exaward { a.module.DispenseRes(session, gd.Rewardex, true) } + + //记录任务使用次数 + if d.Completecount == nil { + d.Completecount = make(map[int32]int32) + } + d.Completecount[req.TaskId] += 1 + update := map[string]interface{}{ + "completecount": d.Completecount, + } + a.module.modelDispatch.Change(session.GetUserId(), update) } rsp := &pb.DispatchReceiveResp{ diff --git a/modules/dispatch/configure.go b/modules/dispatch/configure.go index 80c4ea2d8..4c02b8199 100644 --- a/modules/dispatch/configure.go +++ b/modules/dispatch/configure.go @@ -67,22 +67,6 @@ func (this *configureComp) getDispatchTaskConf(taskId int32) (data *cfg.GameDisp return } -// 任务列表 -func (this *configureComp) getDispatchListConf() (list []*cfg.GameDispatch_TaskData) { - if v, err := this.GetConfigure(gameDispatchTask); err != nil { - return - } else { - d, ok := v.(*cfg.GameDispatch_Task) - if !ok { - err = fmt.Errorf("%T is not *cfg.GameDispatch_Task", v) - return - } - - list = d.GetDataList() - } - return -} - func (this *configureComp) getDispatchTaskConfByType(typeId int32) (list []*cfg.GameDispatch_TaskData, err error) { var v interface{} diff --git a/modules/dispatch/model_dispatch.go b/modules/dispatch/model_dispatch.go index 608e54148..08b664a14 100644 --- a/modules/dispatch/model_dispatch.go +++ b/modules/dispatch/model_dispatch.go @@ -31,35 +31,6 @@ func (this *modelDispatch) Init(service core.IService, module core.IModule, comp return } -// 初始玩家公告 -// Deprecated -func (this *modelDispatch) initDispatch(uid string, dispatch *pb.DBDispatch) *pb.Noticeboard { - tasks, err := this.taskRandom(uid, dispatch) - if err != nil { - return nil - } - if len(tasks) == 0 { - return nil - } - - freeCount := this.module.ModuleTools.GetGlobalConf().DispatchFreecheck - dis := &pb.DBDispatch{ - Uid: uid, - Nb: &pb.Noticeboard{ - Lv: 1, //公告初始升级 - FreeCount: freeCount, - Tasks: tasks, - UpdateTime: configure.Now().Unix(), - }, - } - - if err := this.Add(uid, dis); err != nil { - return nil - } - - return dis.Nb -} - // 获取派遣数据 func (this *modelDispatch) getDBDispatch(uid string) (dis *pb.DBDispatch) { dis = &pb.DBDispatch{} @@ -79,8 +50,8 @@ func (this *modelDispatch) getDBDispatch(uid string) (dis *pb.DBDispatch) { } // 获取随机任务ID -func (this *modelDispatch) getTasksWeight(lv int32) int32 { - conf, err := this.module.configure.getDispatchLvConf(lv) +func (this *modelDispatch) getTasksWeight(dispatch *pb.DBDispatch) int32 { + conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv) if err != nil || conf == nil { this.module.Error("配置不存在", log.Field{Key: "error", Value: err}) return 0 @@ -93,7 +64,17 @@ func (this *modelDispatch) getTasksWeight(lv int32) int32 { var tIds []int32 for _, v := range confList { - tIds = append(tIds, v.Id) + if v.Completecount == 0 { + tIds = append(tIds, v.Id) + } else if v.Completecount > 0 { + if cc, ok := dispatch.Completecount[v.Id]; ok { + if cc < v.Completecount { + tIds = append(tIds, v.Id) + } + } else { + tIds = append(tIds, v.Id) + } + } } idex := utils.RandomNumbers(0, len(tIds), 1) if len(idex) == 0 { @@ -143,7 +124,7 @@ func (this *modelDispatch) randomTask(dispatch *pb.DBDispatch, n int) (tasks []* } } for total < n { - rid := this.getTasksWeight(dispatch.Nb.Lv) + rid := this.getTasksWeight(dispatch) if rid == 0 { return nil } diff --git a/pb/dispatch_db.pb.go b/pb/dispatch_db.pb.go index 74422400b..0d8533e6a 100644 --- a/pb/dispatch_db.pb.go +++ b/pb/dispatch_db.pb.go @@ -26,8 +26,9 @@ type DBDispatch struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` // - Nb *Noticeboard `protobuf:"bytes,2,opt,name=nb,proto3" json:"nb" bson:"nb"` //公告栏 + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` // + Nb *Noticeboard `protobuf:"bytes,2,opt,name=nb,proto3" json:"nb" bson:"nb"` //公告栏 + Completecount map[int32]int32 `protobuf:"bytes,3,rep,name=completecount,proto3" json:"completecount" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //任务完成次数 } func (x *DBDispatch) Reset() { @@ -76,6 +77,13 @@ func (x *DBDispatch) GetNb() *Noticeboard { return nil } +func (x *DBDispatch) GetCompletecount() map[int32]int32 { + if x != nil { + return x.Completecount + } + return nil +} + // 公告栏 type Noticeboard struct { state protoimpl.MessageState @@ -280,41 +288,50 @@ var File_dispatch_dispatch_db_proto protoreflect.FileDescriptor var file_dispatch_dispatch_db_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0a, - 0x44, 0x42, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x02, - 0x6e, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x63, - 0x65, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x02, 0x6e, 0x62, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x4e, - 0x6f, 0x74, 0x69, 0x63, 0x65, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, - 0x74, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x69, 0x73, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x65, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x66, 0x72, 0x65, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, - 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x65, 0x65, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x77, 0x65, 0x65, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, - 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 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, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, - 0x0a, 0x08, 0x6c, 0x65, 0x66, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x6c, 0x65, 0x66, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, - 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, - 0x6f, 0x49, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x63, 0x68, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, + 0x0a, 0x44, 0x42, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, + 0x02, 0x6e, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4e, 0x6f, 0x74, 0x69, + 0x63, 0x65, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x02, 0x6e, 0x62, 0x12, 0x44, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x44, 0x42, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x1a, 0x40, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 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, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x6c, 0x76, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x65, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, 0x72, 0x65, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x65, + 0x65, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x77, + 0x65, 0x65, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x65, + 0x65, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x44, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 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, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x66, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x65, 0x66, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x78, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x78, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -329,20 +346,22 @@ func file_dispatch_dispatch_db_proto_rawDescGZIP() []byte { return file_dispatch_dispatch_db_proto_rawDescData } -var file_dispatch_dispatch_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_dispatch_dispatch_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_dispatch_dispatch_db_proto_goTypes = []interface{}{ (*DBDispatch)(nil), // 0: DBDispatch (*Noticeboard)(nil), // 1: Noticeboard (*DispatchTask)(nil), // 2: DispatchTask + nil, // 3: DBDispatch.CompletecountEntry } var file_dispatch_dispatch_db_proto_depIdxs = []int32{ 1, // 0: DBDispatch.nb:type_name -> Noticeboard - 2, // 1: Noticeboard.tasks:type_name -> DispatchTask - 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 + 3, // 1: DBDispatch.completecount:type_name -> DBDispatch.CompletecountEntry + 2, // 2: Noticeboard.tasks:type_name -> DispatchTask + 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 } func init() { file_dispatch_dispatch_db_proto_init() } @@ -394,7 +413,7 @@ func file_dispatch_dispatch_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dispatch_dispatch_db_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.Dispatch_TaskData.go b/sys/configure/structs/Game.Dispatch_TaskData.go index 567f568e8..c82fee976 100644 --- a/sys/configure/structs/Game.Dispatch_TaskData.go +++ b/sys/configure/structs/Game.Dispatch_TaskData.go @@ -25,6 +25,7 @@ type GameDispatch_TaskData struct { Reqextxt []string Reward []*Gameatn Rewardex []*Gameatn + Completecount int32 } const TypeId_GameDispatch_TaskData = -350189032 @@ -126,6 +127,7 @@ func (_v *GameDispatch_TaskData)Deserialize(_buf map[string]interface{}) (err er } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["completecount"].(float64); !_ok_ { err = errors.New("completecount error"); return }; _v.Completecount = int32(_tempNum_) } return }