Browse Source

优化掼蛋房间结束状态时间值

johnclot69 5 months ago
parent
commit
f50795890e
1 changed files with 4 additions and 3 deletions
  1. 4 3
      incubator-game/src/main/java/com/incubator/game/room/GDRoom.java

+ 4 - 3
incubator-game/src/main/java/com/incubator/game/room/GDRoom.java

@@ -930,8 +930,6 @@ public class GDRoom extends Room {
         this.playBack.put(Long.toString(System.currentTimeMillis()), data);
 
         if (isGameOver) {
-            // 升级
-            this.upgrade();
             // 结算
             this.settlement();
             // 结束
@@ -1140,6 +1138,9 @@ public class GDRoom extends Room {
      */
     private synchronized void settlement() {
         Log.debug("牌局结算...roomId : {}", this.data.roomId);
+        // 升级
+        this.upgrade();
+
         // 广播结算
         for (Player tmPlayer : this.actors.values()) {
             if (tmPlayer != null) {
@@ -1160,7 +1161,7 @@ public class GDRoom extends Room {
      */
     private synchronized void gameOver() {
         this.state = 3;
-        this.time = 60;
+        this.time = 0;
         this.flag = false;
         Log.debug("牌局结束...roomId : {}", this.data.roomId);
 //        Log.info("回放数据 : ", this.playBack.toString());