From 020e1304a3c98db753062214a72c7788f21c83e9 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 18 Dec 2023 11:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E9=99=8D=E6=AC=A1=E6=95=B0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/room.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index 277fe2114..f63a87f0c 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -499,7 +499,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr } case "surrender": - if this.Status != 2 { // 不是游戏中 直接返回 + if this.Status != 1 { // 不是游戏中 直接返回 errdata = &pb.ErrorData{ Code: pb.ErrorCode_EntertainNoGamePlayering, Title: pb.ErrorCode_EntertainNoGamePlayering.ToString(), @@ -507,7 +507,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr return } if list, err := this.module.model.getEntertainmList(session.GetUserId()); err == nil { - if list.Touxiang > 0 { + if list.Touxiang <= 0 { errdata = &pb.ErrorData{ Code: pb.ErrorCode_EntertainMaxTouxiangCount, Title: pb.ErrorCode_EntertainMaxTouxiangCount.ToString(),