From 938aa9d1ddea6979a6f7a2f772164ef590cec4bb Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 4 Jul 2024 11:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E5=A5=BD=E5=8F=8B=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_friend.go | 16 ++++++++++++++++ worldsrv/action_game.go | 16 ---------------- worldsrv/action_shop.go | 7 +++++++ 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/worldsrv/action_friend.go b/worldsrv/action_friend.go index 254752d..13dc9e9 100644 --- a/worldsrv/action_friend.go +++ b/worldsrv/action_friend.go @@ -532,6 +532,22 @@ func (this *CSInviteFriendOpHandler) Process(s *netlib.Session, packetid int, da opRetCode = friend.OpResultCode_OPRC_Error //进入房间失败 send(p) return nil + } else { + // 进入成功 + for _, v := range scene.players { + if v == nil || len(v.TaskInviteList) == 0 || v.SnId == p.SnId { + continue + } + if v.TaskInviteList[p.SnId] == scene.sceneId { + delete(v.TaskInviteList, p.SnId) + TaskSubjectSingleton.Touch(common.TaskTypeInvitePlay, &TaskData{ + SnId: v.SnId, + GameID: scene.gameId, + GameFreeID: scene.dbGameFree.GetId(), + Num: 1, + }) + } + } } case Invite_Refuse: logger.Logger.Trace("拒绝邀请") diff --git a/worldsrv/action_game.go b/worldsrv/action_game.go index 96e7e58..b93bdce 100644 --- a/worldsrv/action_game.go +++ b/worldsrv/action_game.go @@ -167,22 +167,6 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in if !scene.PlayerEnter(p, -1, true) { code = gamehall.OpResultCode_Game_OPRC_Error_Game - } else { - // 进入成功 - for _, v := range scene.players { - if v == nil || len(v.TaskInviteList) == 0 || v.SnId == p.SnId { - continue - } - if v.TaskInviteList[p.SnId] == scene.sceneId { - delete(v.TaskInviteList, p.SnId) - TaskSubjectSingleton.Touch(common.TaskTypeInvitePlay, &TaskData{ - SnId: v.SnId, - GameID: scene.gameId, - GameFreeID: scene.dbGameFree.GetId(), - Num: 1, - }) - } - } } failed: diff --git a/worldsrv/action_shop.go b/worldsrv/action_shop.go index 90ce8a8..1d64e6e 100644 --- a/worldsrv/action_shop.go +++ b/worldsrv/action_shop.go @@ -432,6 +432,13 @@ func (this *CSPayInfoHandler) Process(s *netlib.Session, packetid int, data inte return nil }*/ } + if shopInfo.Page == ShopPagePermit { + if p.GetIsPermit() { + logger.Logger.Error("已购买典藏通行证") + SendClient(shop.OpResultCode_OPRC_Error) + return nil + } + } ShopMgrSington.SendAPICreateOrder(p, msg.ConfigPayId, shopInfo, "shop_goods_xj") } else {