投降次数校验
This commit is contained in:
parent
3cadcaa6b4
commit
020e1304a3
@ -499,7 +499,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
||||
}
|
||||
|
||||
case "surrender":
|
||||
if this.Status != 2 { // 不是游戏中 直接返回
|
||||
if this.Status != 1 { // 不是游戏中 直接返回
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_EntertainNoGamePlayering,
|
||||
Title: pb.ErrorCode_EntertainNoGamePlayering.ToString(),
|
||||
@ -507,7 +507,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
||||
return
|
||||
}
|
||||
if list, err := this.module.model.getEntertainmList(session.GetUserId()); err == nil {
|
||||
if list.Touxiang > 0 {
|
||||
if list.Touxiang <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_EntertainMaxTouxiangCount,
|
||||
Title: pb.ErrorCode_EntertainMaxTouxiangCount.ToString(),
|
||||
|
Loading…
Reference in New Issue
Block a user