diff --git a/bin/json/game_rdtask.json b/bin/json/game_rdtask.json index 25aa99cf1..a65be873e 100644 --- a/bin/json/game_rdtask.json +++ b/bin/json/game_rdtask.json @@ -115,8 +115,8 @@ 170 ], "sidequest": [ - 2033, - 2004 + 2041, + 2042 ] }, { @@ -128,13 +128,41 @@ "condition": [ 101 ], + "sidequest": [ + 2043, + 2044 + ] + }, + { + "id": 100204, + "group": 2, + "subgroup": 100202, + "type": 2, + "preTid": 100202, + "condition": [ + 170 + ], + "sidequest": [ + 2033, + 2004 + ] + }, + { + "id": 100205, + "group": 2, + "subgroup": 100202, + "type": 2, + "preTid": 100203, + "condition": [ + 101 + ], "sidequest": [ 2002, 2003 ] }, { - "id": 100204, + "id": 100206, "group": 2, "subgroup": 0, "type": 2, @@ -147,33 +175,6 @@ 2039 ] }, - { - "id": 100205, - "group": 2, - "subgroup": 0, - "type": 2, - "preTid": 100204, - "condition": [ - 0 - ], - "sidequest": [ - 2006, - 2040 - ] - }, - { - "id": 100206, - "group": 2, - "subgroup": 0, - "type": 2, - "preTid": 100205, - "condition": [ - 0 - ], - "sidequest": [ - 2034 - ] - }, { "id": 100207, "group": 2, @@ -184,8 +185,9 @@ 0 ], "sidequest": [ - 2007, - 2008 + 2045, + 2046, + 2047 ] }, { @@ -198,8 +200,8 @@ 0 ], "sidequest": [ - 2011, - 2012 + 2006, + 2040 ] }, { @@ -212,9 +214,7 @@ 0 ], "sidequest": [ - 2013, - 2014, - 2015 + 2034 ] }, { @@ -227,9 +227,8 @@ 0 ], "sidequest": [ - 2036, - 2037, - 2038 + 2007, + 2008 ] }, { @@ -242,9 +241,8 @@ 0 ], "sidequest": [ - 2016, - 2017, - 2018 + 2011, + 2012 ] }, { @@ -257,7 +255,9 @@ 0 ], "sidequest": [ - 2019 + 2013, + 2014, + 2015 ] }, { @@ -270,7 +270,9 @@ 0 ], "sidequest": [ - 2020 + 2036, + 2037, + 2038 ] }, { @@ -283,9 +285,9 @@ 0 ], "sidequest": [ - 2021, - 2022, - 2023 + 2016, + 2017, + 2018 ] }, { @@ -298,9 +300,7 @@ 0 ], "sidequest": [ - 2024, - 2025, - 2026 + 2019 ] }, { @@ -313,9 +313,7 @@ 0 ], "sidequest": [ - 2027, - 2028, - 2029 + 2020 ] }, { @@ -327,6 +325,51 @@ "condition": [ 0 ], + "sidequest": [ + 2021, + 2022, + 2023 + ] + }, + { + "id": 100218, + "group": 2, + "subgroup": 0, + "type": 2, + "preTid": 100217, + "condition": [ + 0 + ], + "sidequest": [ + 2024, + 2025, + 2026 + ] + }, + { + "id": 100219, + "group": 2, + "subgroup": 0, + "type": 2, + "preTid": 100218, + "condition": [ + 0 + ], + "sidequest": [ + 2027, + 2028, + 2029 + ] + }, + { + "id": 100220, + "group": 2, + "subgroup": 0, + "type": 2, + "preTid": 100219, + "condition": [ + 0 + ], "sidequest": [ 2030, 2031, diff --git a/bin/json/game_rdtaskchoose.json b/bin/json/game_rdtaskchoose.json index 6d7c7a263..17c7c1f8a 100644 --- a/bin/json/game_rdtaskchoose.json +++ b/bin/json/game_rdtaskchoose.json @@ -147,7 +147,7 @@ "needItem": [ 0 ], - "nextTid": 100204 + "nextTid": 100206 }, { "id": 20004, @@ -157,7 +157,7 @@ "needItem": [ 0 ], - "nextTid": 100205 + "nextTid": 100208 }, { "id": 20005, @@ -177,7 +177,7 @@ "needItem": [ 0 ], - "nextTid": 100208 + "nextTid": 100211 }, { "id": 20007, @@ -187,7 +187,7 @@ "needItem": [ 0 ], - "nextTid": 100206 + "nextTid": 100209 }, { "id": 20008, @@ -197,7 +197,7 @@ "needItem": [ 0 ], - "nextTid": 100208 + "nextTid": 100211 }, { "id": 20009, @@ -217,7 +217,7 @@ "needItem": [ 0 ], - "nextTid": 100212 + "nextTid": 100215 }, { "id": 200011, @@ -227,7 +227,7 @@ "needItem": [ 0 ], - "nextTid": 100214 + "nextTid": 100217 }, { "id": 200012, @@ -237,7 +237,7 @@ "needItem": [ 0 ], - "nextTid": 100209 + "nextTid": 100212 }, { "id": 200013, @@ -247,7 +247,7 @@ "needItem": [ 0 ], - "nextTid": 100210 + "nextTid": 100213 }, { "id": 200014, @@ -257,7 +257,7 @@ "needItem": [ 0 ], - "nextTid": 100211 + "nextTid": 100214 }, { "id": 200015, @@ -287,7 +287,7 @@ "needItem": [ 0 ], - "nextTid": 100213 + "nextTid": 100216 }, { "id": 200018, @@ -297,7 +297,7 @@ "needItem": [ 0 ], - "nextTid": 100214 + "nextTid": 100217 }, { "id": 200019, @@ -307,7 +307,7 @@ "needItem": [ 0 ], - "nextTid": 100216 + "nextTid": 100219 }, { "id": 200020, @@ -327,7 +327,7 @@ "needItem": [ 0 ], - "nextTid": 100217 + "nextTid": 100220 }, { "id": 200022, @@ -347,6 +347,26 @@ "needItem": [ 0 ], - "nextTid": 100211 + "nextTid": 100214 + }, + { + "id": 200024, + "num": 1, + "preTid": 0, + "gotoLevel": 0, + "needItem": [ + 0 + ], + "nextTid": 100204 + }, + { + "id": 200025, + "num": 1, + "preTid": 0, + "gotoLevel": 0, + "needItem": [ + 0 + ], + "nextTid": 100205 } ] \ No newline at end of file diff --git a/bin/json/game_rdtaskside.json b/bin/json/game_rdtaskside.json index 75333724e..65699442f 100644 --- a/bin/json/game_rdtaskside.json +++ b/bin/json/game_rdtaskside.json @@ -325,29 +325,8 @@ -1 ], "storyEnd": 0, - "reward": [ - { - "ChooseId": 20001, - "Reward": [ - { - "a": "hero", - "t": "25001", - "n": 1 - } - ] - }, - { - "ChooseId": 20002, - "Reward": [ - { - "a": "hero", - "t": "44006", - "n": 1 - } - ] - } - ], - "nextTid": 100202, + "reward": [], + "nextTid": 100205, "CD": 0 }, { @@ -380,7 +359,7 @@ ], "storyEnd": 0, "reward": [], - "nextTid": 100204, + "nextTid": 100206, "CD": 0 }, { @@ -393,7 +372,7 @@ "EntityChange": [], "EntityStateChange": [], "EntityInteractive": [], - "modelaction": "Enter", + "modelaction": "", "rotation": { "x": 0, "y": -180, @@ -424,7 +403,7 @@ "EntityChange": [], "EntityStateChange": [], "EntityInteractive": [], - "modelaction": "Enter", + "modelaction": "", "rotation": { "x": 0, "y": -180, @@ -467,15 +446,13 @@ "enableAi": false, "boxreplace": "", "timeline": "", - "chooseId": [ - 20004 - ], + "chooseId": [], "endTid": [ -1 ], "storyEnd": 0, "reward": [], - "nextTid": 100205, + "nextTid": 100208, "CD": 0 }, { @@ -520,11 +497,16 @@ "a": "hero", "t": "44005", "n": 1 + }, + { + "a": "hero", + "t": "25004", + "n": 1 } ] } ], - "nextTid": 100206, + "nextTid": 100209, "CD": 0 }, { @@ -595,7 +577,7 @@ ], "storyEnd": 0, "reward": [], - "nextTid": 100208, + "nextTid": 100211, "CD": 0 }, { @@ -626,7 +608,7 @@ ], "storyEnd": 0, "reward": [], - "nextTid": 100208, + "nextTid": 100211, "CD": 0 }, { @@ -712,7 +694,7 @@ ] } ], - "nextTid": 100209, + "nextTid": 100212, "CD": 0 }, { @@ -776,8 +758,34 @@ 104 ], "storyEnd": 317, - "reward": [], - "nextTid": 100211, + "reward": [ + { + "ChooseId": 200013, + "Reward": [ + { + "a": "equip", + "t": "10031", + "n": 1 + }, + { + "a": "equip", + "t": "10032", + "n": 1 + }, + { + "a": "equip", + "t": "10033", + "n": 1 + }, + { + "a": "equip", + "t": "10034", + "n": 1 + } + ] + } + ], + "nextTid": 100214, "CD": 0 }, { @@ -883,7 +891,7 @@ ] } ], - "nextTid": 100212, + "nextTid": 100215, "CD": 0 }, { @@ -978,7 +986,7 @@ ], "storyEnd": 0, "reward": [], - "nextTid": 100213, + "nextTid": 100216, "CD": 0 }, { @@ -1011,7 +1019,7 @@ ], "storyEnd": 322, "reward": [], - "nextTid": 100214, + "nextTid": 100217, "CD": 0 }, { @@ -1059,7 +1067,7 @@ ] } ], - "nextTid": 100215, + "nextTid": 100218, "CD": 0 }, { @@ -1161,7 +1169,7 @@ { "a": "hero", "t": "44911", - "n": 10 + "n": 70 }, { "a": "attr", @@ -1171,7 +1179,7 @@ ] } ], - "nextTid": 100216, + "nextTid": 100219, "CD": 0 }, { @@ -1329,7 +1337,7 @@ ], "storyEnd": 329, "reward": [], - "nextTid": 100217, + "nextTid": 100220, "CD": 0 }, { @@ -1455,7 +1463,7 @@ ], "storyEnd": 0, "reward": [], - "nextTid": 100204, + "nextTid": 100206, "CD": 0 }, { @@ -1486,7 +1494,7 @@ ], "storyEnd": 0, "reward": [], - "nextTid": 100207, + "nextTid": 100210, "CD": 0 }, { @@ -1679,5 +1687,250 @@ "reward": [], "nextTid": -1, "CD": 0 + }, + { + "id": 2041, + "objType": 1, + "location": "middle", + "point": "model_03", + "storyBegin": 343, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "Enter", + "rotation": { + "x": 0, + "y": -180, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [ + 200024 + ], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [ + { + "ChooseId": 200024, + "Reward": [ + { + "a": "hero", + "t": "44006", + "n": 1 + } + ] + } + ], + "nextTid": 100204, + "CD": 0 + }, + { + "id": 2042, + "objType": 1, + "location": "middle", + "point": "model_02", + "storyBegin": 0, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "", + "rotation": { + "x": 0, + "y": -180, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [], + "nextTid": -1, + "CD": 0 + }, + { + "id": 2043, + "objType": 1, + "location": "middle", + "point": "model_03", + "storyBegin": 344, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "Enter", + "rotation": { + "x": 0, + "y": -180, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [ + 200025 + ], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [ + { + "ChooseId": 200025, + "Reward": [ + { + "a": "hero", + "t": "25001", + "n": 1 + } + ] + } + ], + "nextTid": 100205, + "CD": 0 + }, + { + "id": 2044, + "objType": 1, + "location": "middle", + "point": "model_03", + "storyBegin": 0, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "", + "rotation": { + "x": 0, + "y": -180, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [], + "nextTid": -1, + "CD": 0 + }, + { + "id": 2045, + "objType": 1, + "location": "right", + "point": "model_08", + "storyBegin": 345, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "", + "rotation": { + "x": 0, + "y": -90, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [], + "nextTid": -1, + "CD": 0 + }, + { + "id": 2046, + "objType": 1, + "location": "right", + "point": "model_06", + "storyBegin": 346, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "", + "rotation": { + "x": 0, + "y": 90, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [], + "nextTid": -1, + "CD": 0 + }, + { + "id": 2047, + "objType": 1, + "location": "right", + "point": "model_09", + "storyBegin": 347, + "Entity": [], + "EntityChange": [], + "EntityStateChange": [], + "EntityInteractive": [], + "modelaction": "", + "rotation": { + "x": 0, + "y": -180, + "z": 0 + }, + "modelstate": 0, + "popup": "", + "special": "", + "enableAi": false, + "boxreplace": "", + "timeline": "", + "chooseId": [ + 20004 + ], + "endTid": [ + -1 + ], + "storyEnd": 0, + "reward": [], + "nextTid": 100208, + "CD": 0 } ] \ No newline at end of file diff --git a/comm/imodule.go b/comm/imodule.go index fb42146a2..1a376fde8 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -109,8 +109,6 @@ type ( InitTaskByTag(uid string, taskTag TaskTag) //清空任务 ResetTask(uid string, taskTag TaskTag) - //任务通知 - SendToTask(session IUserSession, taskType TaskType, param *pb.TaskParam) (code pb.ErrorCode) // 清理玩家任务数据 CleanData(uid string) // 获取当前任务 diff --git a/modules/hero/api_strengthenUpStar.go b/modules/hero/api_strengthenUpStar.go index 0bfa92fa2..55cc8145d 100644 --- a/modules/hero/api_strengthenUpStar.go +++ b/modules/hero/api_strengthenUpStar.go @@ -142,8 +142,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr "sameCount": 1, "isOverlying": false, } - // 触发星级任务 - this.module.ModuleTask.SendToTask(session, comm.TaskTypeUpHeroStar, &pb.TaskParam{First: _hero.Star}) + // 保存数据 err := this.module.modelHero.ChangeList(session.GetUserId(), _hero.Id, _heroMap) if err != nil { diff --git a/modules/hero/api_strengthenUplv.go b/modules/hero/api_strengthenUplv.go index 3e0dce16a..761c9f57e 100644 --- a/modules/hero/api_strengthenUplv.go +++ b/modules/hero/api_strengthenUplv.go @@ -190,7 +190,6 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: _changeHero}) session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero}) if iLvUp > 0 { // 升级了 统计任务 - this.module.ModuleTask.SendToTask(session, comm.TaskTypeUpHeroLevel, &pb.TaskParam{Second: iLvUp}) this.module.ModuleRtask.SendToRtask(session, comm.Rtype4, utils.ToInt32(_hero.HeroID), _hero.Lv) this.module.ModuleRtask.SendToRtask(session, comm.Rtype23, 1, _hero.Star, _hero.Lv) this.module.ModuleRtask.SendToRtask(session, comm.Rtype24, 1) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 14c5353a2..74f86f2b6 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -107,8 +107,10 @@ func (this *ModuleRtask) initRtaskVerifyHandle() { }) case comm.Rtype7: this.registerVerifyHandle(v.Id, &rtaskCondi{ + find: this.modelRtaskRecord.lessEqualFirstParam, cfg: typeCfg, verify: this.modelRtask.verfiyRtype7, + update: this.modelRtaskRecord.addUpdate, }) case comm.Rtype8: this.registerVerifyHandle(v.Id, &rtaskCondi{ @@ -224,7 +226,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T // v.cfg.Datatype == 2 && this.ModuleSys.IsAccess("task", user.Lv) { condis = append(condis, v) // } - + } } } diff --git a/modules/rtask/updateHandle.go b/modules/rtask/updateHandle.go index dbb0c5782..3763f2b9f 100644 --- a/modules/rtask/updateHandle.go +++ b/modules/rtask/updateHandle.go @@ -67,6 +67,8 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond err = this.Change(uid, update) } } + + this.listenTask(uid, cfg.Id) return } @@ -119,18 +121,20 @@ func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData err = this.Change(uid, update) } } + this.listenTask(uid, cfg.Id) + return +} +func (this *ModelRtaskRecord) listenTask(uid string, cfgId int32) { //日/周/成就任务监听触发 tl := new(task.TaskListen) tl.Uid = uid - tl.TaskType = comm.TaskType(cfg.Id) + tl.TaskType = comm.TaskType(cfgId) if im, err := this.service.GetModule(comm.ModuleTask); err == nil { if mt, ok := im.(*task.ModuleTask); ok { mt.GetEventApp().Dispatch(comm.EventTaskChanged, tl) } - }else{ + } else { this.moduleRtask.Printf("get ModuleTask err: %v", err) } - - return } diff --git a/modules/task/module.go b/modules/task/module.go index 875524372..c1757a366 100644 --- a/modules/task/module.go +++ b/modules/task/module.go @@ -123,22 +123,13 @@ func (this *ModuleTask) ResetTask(uid string, taskTag comm.TaskTag) { } //任务处理 -func (this *ModuleTask) SendToTask(session comm.IUserSession, taskType comm.TaskType, taskPram *pb.TaskParam) (code pb.ErrorCode) { - // if tasks, err := this.modelTask.doTaskHandle(session.GetUserId(), taskType, taskPram); err != nil { - // code = pb.ErrorCode_TaskHandle - // } else { - // for _, t := range tasks { - // if err := session.SendMsg(string(comm.ModuleTask), TaskSubTypeFinishedPush, &pb.TaskFinishedPush{TaskId: t.TaskId}); err != nil { - // this.modelTask.moduleTask.Errorf("SendToTask sendmsg err:%v", err) - // } - // // 每日任务 - // if t.Tag == int32(comm.TASK_DAILY) { - // this.ModuleRtask.SendToRtask(session, comm.Rtype3, t.TaskId) - // } - // } - // } - return -} +// func (this *ModuleTask) SendToTask(session comm.IUserSession, condiId int32, params ...int32) (code pb.ErrorCode) { +// tl := new(TaskListen) +// tl.Uid = session.GetUserId() +// tl.TaskType = comm.TaskType(condiId) +// this.modelTask.EventApp.Dispatch(comm.EventTaskChanged, tl) +// return +// } //创建玩家攻略任务 func (this *ModuleTask) CreateTaskForStrategy(uid string, heroCfgId int32) { diff --git a/modules/user/api_login.go b/modules/user/api_login.go index 5b8f2d7fd..bbccd1355 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -135,11 +135,13 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod rsp.Ex = expand } } + // 日常登录任务 + this.module.ModuleRtask.SendToRtask(session, comm.Rtype7, 1) // if this.module.ModuleSys.IsAccess("", user.Lv) { this.module.ModuleRtask.InitCondiData(user.Uid) // } - + mail := &pb.DBMailData{ ObjId: primitive.NewObjectID().Hex(), Uid: user.Uid,