From 1b67a44d6375a8c87e3e005f4cce797a1d618cde Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Sat, 7 Sep 2024 10:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E6=8A=80=E9=A6=86=E7=89=8C=E5=B1=80?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/action/action_game.go | 7 +++++++ gamesrv/tienlen/scenedata_tienlen.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gamesrv/action/action_game.go b/gamesrv/action/action_game.go index 8148257..761309f 100644 --- a/gamesrv/action/action_game.go +++ b/gamesrv/action/action_game.go @@ -291,6 +291,13 @@ func CSDestroyRoom(s *netlib.Session, packetid int, data interface{}, sid int64) send() return nil } + if scene.ExtraData != nil { + gs, ok := scene.ExtraData.(base.GameScene) + if ok { + gs.SceneDestroy(true) + return nil + } + } scene.Destroy(true) return nil } diff --git a/gamesrv/tienlen/scenedata_tienlen.go b/gamesrv/tienlen/scenedata_tienlen.go index 62c1ee3..0269621 100644 --- a/gamesrv/tienlen/scenedata_tienlen.go +++ b/gamesrv/tienlen/scenedata_tienlen.go @@ -2105,7 +2105,7 @@ func (this *TienLenSceneData) SendFirstGiveTimeItem(p *base.Player) { // SaveCustomLog 保存竞技馆对局记录 func (this *TienLenSceneData) SaveCustomLog() { - if this.CustomLogSave || !this.IsCustom() { + if this.CustomLogSave || !this.IsCustom() || this.NumOfGames == 0 { return } this.CustomLogSave = true