|
@@ -1286,7 +1286,8 @@ public class GDRoom extends Room {
|
|
|
}
|
|
|
}
|
|
|
// 设置全局当前级牌点数
|
|
|
- this.data.curLevelPoint = Math.max(winPlayer.data.levelPointView[0], winPlayer.data.levelPointView[1]);
|
|
|
+ this.data.curLevelPoint = winPlayer.data.levelPointView[0];
|
|
|
+// this.data.curLevelPoint = Math.max(winPlayer.data.levelPointView[0], winPlayer.data.levelPointView[1]);
|
|
|
}
|
|
|
|
|
|
Log.info("升级...{}, 原级牌点数: {}, 当前级牌点数: {}", builder.toString(), oldLevelPoint, this.data.curLevelPoint);
|
|
@@ -1530,11 +1531,11 @@ public class GDRoom extends Room {
|
|
|
data.put("curDiscardSex", this.data.disCardPlayer != null ? this.data.disCardPlayer.data.sex : 0);
|
|
|
data.put("curPassList", this.data.passList);
|
|
|
data.put("roomIp",this.data.roomIp);
|
|
|
- data.put("myInfo", player.playerRoomToMessage(true));
|
|
|
+ data.put("myInfo", this.playerRoomToMessage(player, true));
|
|
|
List<Map<String, Object>> otherInfo = new ArrayList<>();
|
|
|
for (Player tmPlayer : this.actors.values()) {
|
|
|
if (tmPlayer != null && !Objects.equals(tmPlayer.getId(), player.getId())) {
|
|
|
- otherInfo.add(tmPlayer.playerRoomToMessage(false));
|
|
|
+ otherInfo.add(this.playerRoomToMessage(tmPlayer, false));
|
|
|
}
|
|
|
}
|
|
|
data.put("otherInfo", otherInfo);
|
|
@@ -1553,6 +1554,37 @@ public class GDRoom extends Room {
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 玩家信息转消息
|
|
|
+ *
|
|
|
+ * @param flag 是否显示手牌
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Object> playerRoomToMessage(Player player, boolean flag) {
|
|
|
+ Map<String, Object> data = new HashMap<>();
|
|
|
+ data.put("id", player.getId());
|
|
|
+ data.put("name", player.data.name);
|
|
|
+ data.put("avatar", "https://img95.699pic.com/element/40109/0194.png_300.png");
|
|
|
+ data.put("sex", player.data.sex);
|
|
|
+ data.put("pos", player.data.pos);
|
|
|
+ data.put("state", player.data.state);
|
|
|
+ data.put("isAuto", player.data.isAuto);
|
|
|
+ // 级数显示 [我方级数, 对方级数]
|
|
|
+ data.put("levelPointView", player.data.levelPointView);
|
|
|
+ // 队友Id
|
|
|
+ data.put("teammateId", player.data.teammateId);
|
|
|
+
|
|
|
+ // 玩家牌数据
|
|
|
+ Map<String, Object> cardInfo = new HashMap<>();
|
|
|
+ cardInfo.put("remainCards", flag? player.data.remainCards : "");
|
|
|
+ cardInfo.put("remainCardsNum", player.data.remainCards.length);
|
|
|
+ cardInfo.put("discardList", player.data.discardList);
|
|
|
+ cardInfo.put("disCardType", player.data.disCardType);
|
|
|
+ cardInfo.put("tributeGetCard", player.data.tributeGetCard);
|
|
|
+ data.put("cardInfo", cardInfo);
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 房间信息转游戏回放
|
|
|
*
|