diff --git a/gamesrv/tienlen/scenepolicy_tienlen.go b/gamesrv/tienlen/scenepolicy_tienlen.go index 46b85f8..1f9bbf1 100644 --- a/gamesrv/tienlen/scenepolicy_tienlen.go +++ b/gamesrv/tienlen/scenepolicy_tienlen.go @@ -733,6 +733,7 @@ func (this *SceneBaseStateTienLen) OnPlayerOp(s *base.Scene, p *base.Player, opc } // 扣房费 // 房主扣费 + afterCoin := p.GetCoin() if (sceneEx.GetCustom().GetCostType() == 2 && playerEx.SnId == sceneEx.GetCreator()) || sceneEx.GetCustom().GetCostType() == 1 { var item []*model.Item @@ -751,9 +752,13 @@ func (this *SceneBaseStateTienLen) OnPlayerOp(s *base.Scene, p *base.Player, opc break } } + + if v.GetId() == 100001 { + afterCoin -= v.GetNum() + } } // 检查余额 - if less { + if less || afterCoin <= 0 { sceneEx.PlayerLeave(p, common.PlayerLeaveReason_Bekickout, true) return true } @@ -2460,6 +2465,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) { playerEx.AddCoinNoLog(int64(-gainScore), 0) } else { playerEx.AddCoin(int64(-gainScore), common.GainWay_CoinSceneLost, 0, "system", s.GetSceneName()) + playerEx.Coin = 5 } if sceneEx.IsRankMatch() { // 排位积分