From d285bad3a92b0f82e19a9ee0b516c3e7b034eda3 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 11 Apr 2023 13:54:50 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AD=A6=E9=A6=86?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/practice/api_loot.go | 11 +++++++++++ modules/practice/api_receive.go | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/modules/practice/api_loot.go b/modules/practice/api_loot.go index 8b021ba19..2b1eb86fe 100644 --- a/modules/practice/api_loot.go +++ b/modules/practice/api_loot.go @@ -88,6 +88,17 @@ func (this *apiComp) Loot(session comm.IUserSession, req *pb.PracticeLootReq) (c this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{ "knapsack": room.Knapsack, }) + + if _session, ok := this.module.GetUserSession(req.Friend); ok { + _session.SendMsg(string(this.module.GetType()), "rommchange", &pb.PracticeRommChangePush{Info: froom}) + if err = _session.Push(); err != nil { + this.module.Errorln(err) + } + this.module.PutUserSession(_session) + } else { + this.module.PutUserSession(_session) + } + session.SendMsg(string(this.module.GetType()), "loot", &pb.PracticeLootResp{Friend: req.Friend, Pillar: froom.Pillarf}) return } diff --git a/modules/practice/api_receive.go b/modules/practice/api_receive.go index d4ebe2e3f..16f85b941 100644 --- a/modules/practice/api_receive.go +++ b/modules/practice/api_receive.go @@ -236,6 +236,17 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR this.module.modelPandata.Change(req.Friend, map[string]interface{}{ filed: pillar, }) + + if _session, ok := this.module.GetUserSession(req.Friend); ok { + _session.SendMsg(string(this.module.GetType()), "rommchange", &pb.PracticeRommChangePush{Info: froom}) + + if err = _session.Push(); err != nil { + this.module.Errorln(err) + } + this.module.PutUserSession(_session) + } else { + this.module.PutUserSession(_session) + } } go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype135, minutes)) session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack}) From 3175f6a184f2ccdfef10cc4e9800b39ddb8199cd Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 11 Apr 2023 14:22:46 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/viking/api_challengeover.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 8615f3482..d81b9fd8d 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -9,7 +9,7 @@ import ( "google.golang.org/protobuf/proto" ) -//参数校验 +// 参数校验 func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.VikingChallengeOverReq) (code pb.ErrorCode) { if req.BossId <= 0 && req.Difficulty > 0 { code = pb.ErrorCode_ReqParameterError @@ -18,7 +18,7 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Vikin return } -///挑战完成 +// /挑战完成 func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChallengeOverReq) (code pb.ErrorCode, data proto.Message) { var ( mapData map[string]interface{} @@ -142,9 +142,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal } // 随机任务统计 var szTask []*comm.TaskParam - szTask = append(szTask, comm.GettaskParam(comm.Rtype73, 1, req.Difficulty, req.BossId)) - szTask = append(szTask, comm.GettaskParam(comm.Rtype74, req.Difficulty, req.BossId)) - szTask = append(szTask, comm.GettaskParam(comm.Rtype78, req.Difficulty, req.BossId, req.Report.Costtime)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype73, 1, req.BossId, req.Difficulty)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype74, req.BossId, req.Difficulty)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype78, req.BossId, req.Difficulty, req.Report.Costtime)) if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { for _, v := range req.Report.Info.Redflist[0].Team { From f67ff3de1ec80bed289de79b80a2c180dbfc263d Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 11 Apr 2023 15:23:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=AD=94=E8=8D=AF?= =?UTF-8?q?=E6=B6=88=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/items/api_potionsynthesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/items/api_potionsynthesis.go b/modules/items/api_potionsynthesis.go index 027d482ba..e88df9f51 100644 --- a/modules/items/api_potionsynthesis.go +++ b/modules/items/api_potionsynthesis.go @@ -34,7 +34,7 @@ func (this *apiComp) PotionSynthesis(session comm.IUserSession, req *pb.ItemsPot N: v.N * req.Num, } } - if code = this.module.ConsumeRes(session, configure.Material, true); code != pb.ErrorCode_Success { + if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success { return } give = make([]*cfg.Gameatn, 0) From b3f3147475c89fbf7c39ce58ebd2dda7a5868b5d Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 11 Apr 2023 15:23:42 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/rtask/module.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 406c94666..3eed78efa 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -181,9 +181,9 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (condis []*rtaskCondi) { case comm.Rtype7, comm.Rtype12, comm.Rtype13, comm.Rtype14, comm.Rtype15, comm.Rtype19, comm.Rtype21, comm.Rtype24, comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, - comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53, + comm.Rtype39, comm.Rtype51, comm.Rtype53, comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60, - comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype73, comm.Rtype88, comm.Rtype104, + comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype88, comm.Rtype104, comm.Rtype96, comm.Rtype105, comm.Rtype128, comm.Rtype130, comm.Rtype131, comm.Rtype141, comm.Rtype142, comm.Rtype143, comm.Rtype144, comm.Rtype145, comm.Rtype146, comm.Rtype147, comm.Rtype149, comm.Rtype153, comm.Rtype154, comm.Rtype155, comm.Rtype156: @@ -195,6 +195,15 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (condis []*rtaskCondi) { } condis = append(condis, condi) this.registerVerifyHandle(v.Id, condi) + case comm.Rtype50, comm.Rtype73: + condi := &rtaskCondi{ + condId: v.Id, + find: this.modelRtaskRecord.lessEqualFirstParam, + verify: this.modelRtaskRecord.verifyFromDb, + update: this.modelRtaskRecord.addUpdate, + } + condis = append(condis, condi) + this.registerVerifyHandle(v.Id, condi) case comm.Rtype20: condi := &rtaskCondi{ condId: v.Id, From 5e26c30c53b4d874ffb9260bbcefc382f3cead94 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 11 Apr 2023 15:28:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_rdtaskcondi.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/json/game_rdtaskcondi.json b/bin/json/game_rdtaskcondi.json index 5ff8cd481..1ca51326d 100644 --- a/bin/json/game_rdtaskcondi.json +++ b/bin/json/game_rdtaskcondi.json @@ -1690,7 +1690,7 @@ "valid": 0, "NPC": 10071, "data1": 1, - "data2": 1001, + "data2": 1, "data3": 1, "data4": 0, "data5": 0 @@ -1754,7 +1754,7 @@ "valid": 0, "NPC": 70022, "data1": 1, - "data2": 1001, + "data2": 1, "data3": 1, "data4": 0, "data5": 0 @@ -1770,7 +1770,7 @@ "valid": 0, "NPC": 70032, "data1": 1, - "data2": 1001, + "data2": 1, "data3": 1, "data4": 0, "data5": 0