tienlen房卡场不能中途离开

This commit is contained in:
sk 2024-11-14 15:07:51 +08:00
parent 10ce982a14
commit f989492019
2 changed files with 8 additions and 2 deletions

View File

@ -591,8 +591,10 @@ func (this *SceneBaseStateTienLen) CanChangeTo(s base.SceneState) bool {
// 当前状态能否换桌
func (this *SceneBaseStateTienLen) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
if s.IsCustom() && s.GetNumOfGames() > 0 {
return false
if s.IsCustom() {
if s.NumOfGames > 0 && s.NumOfGames < int(s.TotalOfGames) {
return false
}
}
return !p.IsGameing() || s.GetDestroyed() || !s.GetGaming()
}

View File

@ -41,6 +41,10 @@ func AddMail(param *AddMailParam) {
return
}
if param.SrcName == "" {
param.SrcName = "{\"zh\":\"系统\",\"vi\":\"GM\",\"en\":\"GM\",\"kh\":\"GM\"}"
}
opener := int32(1)
if param.SrcId <= 0 {
opener = 0