|
@@ -61,10 +61,15 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
}
|
|
|
|
|
|
// 120秒未开始直接解散
|
|
|
-// if (this.data.time >= 120) {
|
|
|
-// logger.debug("解散房间...");
|
|
|
-// this.destroy();
|
|
|
-// }
|
|
|
+ if (this.data.time >= 120) {
|
|
|
+ // 广播
|
|
|
+ for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ tmPlayer.receive(CommonProto.Cmd.DisbandRoom_VALUE, new HashMap<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.destroy();
|
|
|
+ }
|
|
|
break;
|
|
|
case 1:
|
|
|
// 开局
|
|
@@ -119,10 +124,15 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
this.data.time = 0;
|
|
|
} else {
|
|
|
// 120秒未开始直接解散
|
|
|
-// if (this.data.time >= 120) {
|
|
|
-// logger.debug("解散房间...");
|
|
|
-// this.destroy();
|
|
|
-// }
|
|
|
+ if (this.data.time >= 120) {
|
|
|
+ // 广播
|
|
|
+ for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ tmPlayer.receive(CommonProto.Cmd.DisbandRoom_VALUE, new HashMap<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.destroy();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
break;
|