From 3c1e7bfe8f898b0b7559e163d3cc4c8612d09e68 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 20 Feb 2025 13:53:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=AB=9E=E6=8A=80=E9=A6=86=E6=88=BF?= =?UTF-8?q?=E9=97=B4=E5=85=A5=E5=9C=BA=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_game.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worldsrv/action_game.go b/worldsrv/action_game.go index c6ed79c..f129fe7 100644 --- a/worldsrv/action_game.go +++ b/worldsrv/action_game.go @@ -110,7 +110,7 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in limitCoin := int64(0) if len(cfg.GetLimitCoin()) > 0 { - limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), scene.BaseScore)] + limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), scene.BaseScore)-1] if limitCoin > 0 && p.GetCoin() < limitCoin { code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game goto failed @@ -1286,7 +1286,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{ // 最低限额 limitCoin := int64(0) if len(cfg.GetLimitCoin()) > 0 { - limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), msg.GetBaseScore())] + limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), msg.GetBaseScore())-1] if limitCoin > 0 && p.GetCoin() < limitCoin { code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game send() @@ -1526,7 +1526,7 @@ func CSGetPrivateRoomListHandler(s *netlib.Session, packetId int, data interface Cost: costItems, } if cfg != nil && len(cfg.GetLimitCoin()) > 0 { - d.LimitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), v.BaseScore)] + d.LimitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), v.BaseScore)-1] } if v.CustomWinSnId > 0 { p := PlayerMgrSington.GetPlayerBySnId(v.CustomWinSnId)