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 } ] diff --git a/modules/practice/api_expulsion.go b/modules/practice/api_expulsion.go index 9d383dad5..8f0101dff 100644 --- a/modules/practice/api_expulsion.go +++ b/modules/practice/api_expulsion.go @@ -178,46 +178,49 @@ func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpuls } } defer func() { - this.module.PutUserSession(_session) + if ok { //在线直接推送消息 + 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) + _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 + // } + // 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 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