diff --git a/gamesrv/transact/transact_addcoin.go b/gamesrv/transact/transact_addcoin.go index 99267b5..461a704 100644 --- a/gamesrv/transact/transact_addcoin.go +++ b/gamesrv/transact/transact_addcoin.go @@ -28,7 +28,7 @@ func (this *AddCoinTransactHandler) OnExcute(tNode *transact.TransNode, ud inter s := p.GetScene() if s != nil { sp := s.GetScenePolicy() - if sp != nil && sp.CanAddCoin(s, p, ctx.Coin) { + if sp != nil && sp.CanAddCoin(s, p, ctx.Coin) && !s.IsMatchScene() { p.AddCoinAsync(ctx.Coin, ctx.GainWay, true, ctx.Broadcast, ctx.Oper, ctx.Remark, ctx.WriteLog) //触发下事件 sp.OnPlayerEvent(s, p, base.PlayerEventRecharge, []int64{ctx.Coin}) @@ -57,7 +57,7 @@ func (this *AddCoinTransactHandler) OnRollBack(tNode *transact.TransNode) transa s := p.GetScene() if s != nil { sp := s.GetScenePolicy() - if sp != nil && sp.CanAddCoin(s, p, -ctx.Coin) { + if sp != nil && sp.CanAddCoin(s, p, -ctx.Coin) && !s.IsMatchScene() { p.AddCoinAsync(-ctx.Coin, ctx.GainWay, true, ctx.Broadcast, ctx.Oper, ctx.Remark, ctx.WriteLog) //触发下事件 sp.OnPlayerEvent(s, p, base.PlayerEventRecharge, []int64{0}) diff --git a/worldsrv/player.go b/worldsrv/player.go index afa0794..896cc14 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -1965,7 +1965,7 @@ func (this *Player) AddCoin(num, add int64, gainWay int32, oper, remark string) //this.TotalData(num, gainWay) async := false - if num > 0 && this.scene != nil && !this.scene.IsTestScene() && this.scene.sceneMode != common.SceneMode_Thr { //游戏场中加币,需要同步到gamesrv上 + if num > 0 && this.scene != nil && !this.scene.IsTestScene() && !this.scene.IsMatchScene() && this.scene.sceneMode != common.SceneMode_Thr { //游戏场中加币,需要同步到gamesrv上 if StartAsyncAddCoinTransact(this, num, gainWay, oper, remark, true, 0, true) { async = true }