From b871576fe9ac235d4bb588de728f25340d1ec2da Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Tue, 24 Sep 2024 13:47:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BAlog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine/machinedoll/machinemgr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine/machinedoll/machinemgr.go b/machine/machinedoll/machinemgr.go index 5b10bc3..e059a5b 100644 --- a/machine/machinedoll/machinemgr.go +++ b/machine/machinedoll/machinemgr.go @@ -71,7 +71,7 @@ func (this *MachineManager) Init() { Addr: addr, } SetBaseParam(conn) - logger.Logger.Trace("设置每台娃娃机基础配置!") + fmt.Println("与娃娃机连接成功!设置每台娃娃机基础配置!Id = ", i+1, "addr = ", addr) } /* fmt.Println("Connected to server:\n", this.ConnMap[1].RemoteAddr()) From b04d422d8bd22e7f02bdbbc2cf9ca60fb8efea2b Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Tue, 24 Sep 2024 16:36:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA=E7=A6=BB?= =?UTF-8?q?=E7=BA=BF=20=E8=B8=A2=E5=87=BA=E6=88=BF=E9=97=B4=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/scene_clawdoll.go | 3 +-- gamesrv/clawdoll/scenepolicy_clawdoll.go | 3 +-- protocol/clawdoll/clawdoll.proto | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gamesrv/clawdoll/scene_clawdoll.go b/gamesrv/clawdoll/scene_clawdoll.go index 7b063fb..56e9e5d 100644 --- a/gamesrv/clawdoll/scene_clawdoll.go +++ b/gamesrv/clawdoll/scene_clawdoll.go @@ -74,7 +74,7 @@ type SceneEx struct { // 游戏是否能开始 func (this *SceneEx) CanStart() bool { //人数>=1自动开始 - if len(this.players) >= 1 && (this.GetRealPlayerNum() >= 1 || this.IsPreCreateScene() || this.IsHasPlaying()) { + if len(this.players) >= 1 && (this.GetRealPlayerNum() >= 1 || this.IsPreCreateScene() || this.IsHasPlaying()) && this.machineStatus == 1 { return true } return false @@ -191,7 +191,6 @@ func (this *SceneEx) ClawdollCreateRoomInfoPacket(s *base.Scene, p *base.Player) RoundId: proto.Int(this.RoundId), ParamsEx: nil, GameFreeId: 0, - BaseScore: proto.Int32(this.GetBaseScore()), } // 玩家信息 diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go index 13b1d9b..9eaf13c 100644 --- a/gamesrv/clawdoll/scenepolicy_clawdoll.go +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -77,7 +77,7 @@ func (this *PolicyClawdoll) OnTick(s *base.Scene) { if machineStatus == 0 { //链接状态不可用 踢出所有玩家 for _, p := range sceneEx.players { - sceneEx.delPlayer(p.Player) + sceneEx.PlayerLeave(p.Player, common.PlayerLeaveReason_RoomClose, false) } sceneEx.machineStatus = 0 logger.Logger.Trace("娃娃机离线,当前场景暂停服务!") @@ -97,7 +97,6 @@ func (this *PolicyClawdoll) OnPlayerEnter(s *base.Scene, p *base.Player) { if s == nil || p == nil { return } - logger.Logger.Trace("(this *PolicyClawdoll) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.SnId) if sceneEx, ok := s.ExtraData.(*SceneEx); ok { playerEx := &PlayerEx{Player: p} diff --git a/protocol/clawdoll/clawdoll.proto b/protocol/clawdoll/clawdoll.proto index 3c57c6d..59b7f12 100644 --- a/protocol/clawdoll/clawdoll.proto +++ b/protocol/clawdoll/clawdoll.proto @@ -52,9 +52,8 @@ message SCCLAWDOLLRoomInfo { int32 TimeOut = 6; //该状态已经历时间 单位:秒 repeated CLAWDOLLPlayerData Players = 7; //房间内的玩家信息 int32 TotalPlayer = 8; //房间总人数 - int32 RoundId = 9; //当前局数ID - repeated int32 ParamsEx = 10; //其他参数 - + int32 RoundId = 9; //当前局数ID + repeated int32 ParamsEx = 10; //其他参数 int32 GameFreeId = 15; int32 BaseScore = 16; //基础分 } From 5fd2c7c195988cb6f3f5bc75be4823a92cd78713 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Tue, 24 Sep 2024 17:03:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A8=83=E5=A8=83=E5=85=91=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/shopmgr.go | 1 + 1 file changed, 1 insertion(+) diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index ec6424f..735dbd1 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -1126,6 +1126,7 @@ func (this *ShopMgr) ExchangeList(p *Player) (ret bool) { JPrice: info.JPrice, Id: info.Id, Cash: info.Cash, + DPrice: info.DPrice, }) } var telData []*shop.TelChargeData