From ddd84603530e9d0b4481f750d0559484e8d83253 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 31 Mar 2023 18:44:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AD=A6=E9=A6=86?= =?UTF-8?q?=E9=9B=95=E5=83=8F=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/practice/module.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/practice/module.go b/modules/practice/module.go index dad461687..35d74fe2d 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -234,6 +234,8 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) { keep = false for _, v := range buleroom.Statuers { if v.Uid == red { + v.Unionname = redsociaty + v.Figure = reduser.Figure v.End = configure.Now().Add(time.Minute * time.Duration(this.configure.GetGlobalConf().PandamasTiguandiaoxiangCd)).Unix() keep = true break @@ -260,6 +262,8 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) { keep = false for _, v := range redroom.Statuers { if v.Uid == bule { + v.Unionname = bulesociaty + v.Figure = buleuser.Figure v.End = configure.Now().Add(time.Minute * time.Duration(this.configure.GetGlobalConf().PandamasTiguandiaoxiangCd)).Unix() keep = true break From d586df1a858232c214cd2b9509547d794b051680 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 31 Mar 2023 18:53:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_sign.json | 136 ++++++++++++++++++++-------------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/bin/json/game_sign.json b/bin/json/game_sign.json index 0b0f4dee4..dfd11958b 100644 --- a/bin/json/game_sign.json +++ b/bin/json/game_sign.json @@ -101,14 +101,14 @@ "loopgift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ] @@ -215,14 +215,14 @@ "loopgift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ] @@ -329,14 +329,14 @@ "loopgift": [ { "a": "hero", - "t": "43902", + "t": "13002", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43902", + "t": "13002", "n": 1 } ] @@ -443,14 +443,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -462,14 +462,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -481,14 +481,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -500,14 +500,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -519,14 +519,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -538,14 +538,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -557,14 +557,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -576,14 +576,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -690,14 +690,14 @@ "loopgift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ] @@ -804,14 +804,14 @@ "loopgift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ] @@ -918,14 +918,14 @@ "loopgift": [ { "a": "hero", - "t": "43902", + "t": "13002", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43902", + "t": "13002", "n": 1 } ] @@ -1032,14 +1032,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1051,14 +1051,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1070,14 +1070,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1089,14 +1089,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1108,14 +1108,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1127,14 +1127,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1146,14 +1146,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1165,14 +1165,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1279,14 +1279,14 @@ "loopgift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ] @@ -1393,14 +1393,14 @@ "loopgift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43901", + "t": "25001", "n": 1 } ] @@ -1506,16 +1506,16 @@ "group": 3, "loopgift": [ { - "a": "hero", - "t": "43902", - "n": 1 + "a": "attr", + "t": "gold", + "n": 12000 } ], "gamegift": [ { - "a": "hero", - "t": "43902", - "n": 1 + "a": "attr", + "t": "gold", + "n": 12000 } ] }, @@ -1621,14 +1621,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1659,14 +1659,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1678,14 +1678,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1697,14 +1697,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1716,14 +1716,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1735,14 +1735,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] @@ -1754,14 +1754,14 @@ "loopgift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ], "gamegift": [ { "a": "hero", - "t": "43903", + "t": "25001", "n": 1 } ] From f54b48bb145db3c5ced2c780e806610cd81f313f Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 31 Mar 2023 20:13:29 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A5=BD=E5=8F=8B?= =?UTF-8?q?=E9=A9=B1=E9=80=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/practice/api_expulsion.go | 78 +++++++++++++++---------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/modules/practice/api_expulsion.go b/modules/practice/api_expulsion.go index 9d383dad5..22c67610b 100644 --- a/modules/practice/api_expulsion.go +++ b/modules/practice/api_expulsion.go @@ -21,8 +21,8 @@ func (this *apiComp) ExpulsionCheck(session comm.IUserSession, req *pb.PracticeE ///练功请求 驱逐 func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpulsionReq) (code pb.ErrorCode, data proto.Message) { var ( - err error - ok bool + err error + // ok bool room *pb.DBPracticeRoom froom *pb.DBPracticeRoom pillar *pb.DBPracticePillar @@ -180,44 +180,44 @@ func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpuls defer func() { this.module.PutUserSession(_session) }() - if _session, ok = this.module.GetUserSession(pillar.Uid); ok { - if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success { - return - } - if code = this.module.DispenseRes(_session, append(ants1, ants2...), true); code != pb.ErrorCode_Success { - return - } - if code = this.module.ModuleHero.KungFuHero(_session, pillar.Hero, false, ""); code != pb.ErrorCode_Success { - return - } - } else { - if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success { - return - } - if code = this.module.ModuleHero.KungFuHero(_session, pillar.Hero, false, ""); code != pb.ErrorCode_Success { - return - } - res := make([]*pb.UserAssets, 0) - for _, v := range ants1 { - res = append(res, &pb.UserAssets{ - A: v.A, - T: v.T, - N: v.N, - }) - } - for _, v := range ants2 { - res = append(res, &pb.UserAssets{ - A: v.A, - T: v.T, - N: v.N, - }) - } - this.module.mail.SendNewMail(&pb.DBMailData{ - Cid: "Drivethemail", - CreateTime: uint64(configure.Now().Unix()), - Items: res, - }, pillar.Uid) + // if _session, ok = this.module.GetUserSession(pillar.Uid); ok { + // if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success { + // return + // } + // if code = this.module.DispenseRes(_session, append(ants1, ants2...), true); code != pb.ErrorCode_Success { + // return + // } + // if code = this.module.ModuleHero.KungFuHero(_session, pillar.Hero, false, ""); code != pb.ErrorCode_Success { + // return + // } + // } else { + if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success { + return } + if code = this.module.ModuleHero.KungFuHero(_session, pillar.Hero, false, ""); code != pb.ErrorCode_Success { + return + } + res := make([]*pb.UserAssets, 0) + for _, v := range ants1 { + res = append(res, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + for _, v := range ants2 { + res = append(res, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + this.module.mail.SendNewMail(&pb.DBMailData{ + Cid: "Drivethemail", + CreateTime: uint64(configure.Now().Unix()), + Items: res, + }, pillar.Uid) + // } froom.Knapsack[pillar.Teacher] = 0 froom.Knapsack[pillar.Prop] = 0 From 28f532599deedc8191cf45ff9d865ce55b3ab367 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 31 Mar 2023 20:16:54 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AD=A6=E9=A6=86?= =?UTF-8?q?=E9=A9=B1=E9=80=90=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/practice/api_expulsion.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/practice/api_expulsion.go b/modules/practice/api_expulsion.go index 22c67610b..8f0101dff 100644 --- a/modules/practice/api_expulsion.go +++ b/modules/practice/api_expulsion.go @@ -21,8 +21,8 @@ func (this *apiComp) ExpulsionCheck(session comm.IUserSession, req *pb.PracticeE ///练功请求 驱逐 func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpulsionReq) (code pb.ErrorCode, data proto.Message) { var ( - err error - // ok bool + err error + ok bool room *pb.DBPracticeRoom froom *pb.DBPracticeRoom pillar *pb.DBPracticePillar @@ -178,8 +178,11 @@ func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpuls } } defer func() { - this.module.PutUserSession(_session) + if ok { //在线直接推送消息 + this.module.PutUserSession(_session) + } }() + _session, ok = this.module.GetUserSession(pillar.Uid) // if _session, ok = this.module.GetUserSession(pillar.Uid); ok { // if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success { // return