|
@@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.locks.ReentrantLock;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 掼蛋房间
|
|
@@ -159,12 +160,14 @@ public class GDRoom extends Room {
|
|
|
}
|
|
|
|
|
|
// 广播
|
|
|
- for (Player tmPlayer : this.actors.values()) {
|
|
|
- if (tmPlayer != null) {
|
|
|
- tmPlayer.receive(CommonProto.Cmd.DisbandRoom_VALUE, new HashMap<>());
|
|
|
+ if (this.state == 2) {
|
|
|
+ for (Player tmPlayer : this.actors.values()) {
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ tmPlayer.receive(CommonProto.Cmd.DisbandRoom_VALUE, new HashMap<>());
|
|
|
+ }
|
|
|
}
|
|
|
+ this.destroy();
|
|
|
}
|
|
|
- this.destroy();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -272,9 +275,9 @@ public class GDRoom extends Room {
|
|
|
this.flag = false;
|
|
|
this.time = 0;
|
|
|
} else {
|
|
|
-
|
|
|
+ this.totalSettlement();
|
|
|
try {
|
|
|
- Thread.sleep(1000);
|
|
|
+ Thread.sleep(2000);
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -290,62 +293,43 @@ public class GDRoom extends Room {
|
|
|
case 2:// 按局数
|
|
|
// 小于最大局数,切等待状态
|
|
|
if (this.data.curRound < this.data.maxRound) {
|
|
|
- if (noCircleSettlement()){//不套圈,判断能否判负或判2
|
|
|
+// if (!noCircleSettlement()){//不套圈,判断能否判负或判2
|
|
|
this.resetNextRoom();
|
|
|
this.state = 0;
|
|
|
this.flag = false;
|
|
|
this.time = 0;
|
|
|
- }else {
|
|
|
- try {
|
|
|
- Thread.sleep(1000);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- for (Player tmPlayer : this.actors.values()) {
|
|
|
- if (tmPlayer != null) {
|
|
|
- Map<String, Object> data = this.roomToMessage(tmPlayer, null);
|
|
|
- data.put("state", 3);
|
|
|
- List<Map<String, Object>> otherInfo = new ArrayList<>();
|
|
|
- for (Player p : this.actors.values()) {
|
|
|
- if (p != null && !Objects.equals(tmPlayer.getId(), p.getId())) {
|
|
|
- otherInfo.add(this.playerRoomToMessage(p, true));
|
|
|
- }
|
|
|
- }
|
|
|
- data.put("otherInfo", otherInfo);
|
|
|
- tmPlayer.receive(CommonProto.Cmd.GameStateChange_VALUE, data);
|
|
|
- }
|
|
|
- }
|
|
|
- try {
|
|
|
- Thread.sleep(1000);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- // 广播
|
|
|
- for (Player tmPlayer : this.actors.values()) {
|
|
|
- if (tmPlayer != null) {
|
|
|
- tmPlayer.receive(CommonProto.Cmd.DisbandRoom_VALUE, new HashMap<>());
|
|
|
- }
|
|
|
- }
|
|
|
- this.destroy();
|
|
|
- }
|
|
|
+// }else {
|
|
|
+// try {
|
|
|
+// Thread.sleep(1000);
|
|
|
+// } catch (InterruptedException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// this.totalSettlement();
|
|
|
+// try {
|
|
|
+// Thread.sleep(1000);
|
|
|
+// } catch (InterruptedException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// // 广播
|
|
|
+// for (Player tmPlayer : this.actors.values()) {
|
|
|
+// if (tmPlayer != null) {
|
|
|
+// tmPlayer.receive(CommonProto.Cmd.DisbandRoom_VALUE, new HashMap<>());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// this.destroy();
|
|
|
+// }
|
|
|
} else {
|
|
|
- // 是否套圈
|
|
|
- if ((Integer)this.jsonData.get("upgradeType") == 1){//套圈推送最终结果
|
|
|
- try {
|
|
|
- Thread.sleep(1000);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- //重新结算
|
|
|
- this.circleSettlement();
|
|
|
- }
|
|
|
//判断锁是否存在 //等待消失
|
|
|
+// if ((Integer)this.jsonData.get("ferrule") == 0){
|
|
|
+// this.circleSettlement();
|
|
|
+// }else {
|
|
|
+ this.totalSettlement();
|
|
|
+// }
|
|
|
try {
|
|
|
Thread.sleep(1000);
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
// 广播
|
|
|
for (Player tmPlayer : this.actors.values()) {
|
|
|
if (tmPlayer != null) {
|
|
@@ -409,6 +393,31 @@ public class GDRoom extends Room {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 总结算
|
|
|
+ */
|
|
|
+ public void totalSettlement() {
|
|
|
+ // 广播结算信息
|
|
|
+ for (Player tmPlayer : this.actors.values()) {
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ Map<String, Object> data = this.roomToMessage(tmPlayer, null);
|
|
|
+ // 增加结算玩家信息
|
|
|
+ if (!this.data.result.isEmpty()) {
|
|
|
+ Map<Integer, Object> settlementInfo = new HashMap<>();
|
|
|
+ for (Map.Entry<Integer, Struct.SettlementData> entry : this.data.result.entrySet()) {
|
|
|
+ Map<String, Object> settlementData = new HashMap<>();
|
|
|
+ settlementData.put("playerId", entry.getValue().playerId);
|
|
|
+ settlementData.put("score", entry.getValue().score);
|
|
|
+ settlementData.put("levelPoint", this.actors.getOrDefault(entry.getValue().playerId,null).data.levelPointView[0]);
|
|
|
+ settlementInfo.put(entry.getKey(), settlementData);
|
|
|
+ }
|
|
|
+ data.put("settlementInfo", settlementInfo);
|
|
|
+ }
|
|
|
+ tmPlayer.receive(CommonProto.Cmd.SummaryCalculation_VALUE, data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 检测是否可以开始 3秒倒计时开始
|
|
|
*
|
|
@@ -483,10 +492,10 @@ public class GDRoom extends Room {
|
|
|
this.data.cardList.remove(0);
|
|
|
}
|
|
|
// todo 测试代码
|
|
|
-// if (this.data.wildCard != 0) {
|
|
|
-// player.data.remainCards = CardUtils.add(player.data.remainCards, this.data.wildCard);
|
|
|
-// player.data.remainCards = CardUtils.add(player.data.remainCards, this.data.wildCard);
|
|
|
-// }
|
|
|
+ if (this.data.wildCard != 0) {
|
|
|
+ player.data.remainCards = CardUtils.add(player.data.remainCards, this.data.wildCard);
|
|
|
+ player.data.remainCards = CardUtils.add(player.data.remainCards, this.data.wildCard);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1313,6 +1322,23 @@ public class GDRoom extends Room {
|
|
|
.append(" 4游, 升1级");
|
|
|
break;
|
|
|
}
|
|
|
+ //判断当前玩家的最高分值的局数是否存在
|
|
|
+ if (winPlayer.data.bestScore==null||winPlayer.data.bestScore.isEmpty()){
|
|
|
+ //设置最大值
|
|
|
+ winPlayer.data.bestScore.put(this.data.curRound,upLevel);//当前局次,分值
|
|
|
+ teammateData.player.data.bestScore.put(this.data.curRound,upLevel);
|
|
|
+ }else {
|
|
|
+ for (Map.Entry<Integer, Integer> entry : winPlayer.data.bestScore.entrySet()) {
|
|
|
+ if (upLevel>entry.getValue()){
|
|
|
+ winPlayer.data.bestScore.remove(entry.getKey());
|
|
|
+ winPlayer.data.bestScore.put(this.data.curRound,upLevel);
|
|
|
+ teammateData.player.data.bestScore.remove(entry.getKey());
|
|
|
+ teammateData.player.data.bestScore.put(this.data.curRound,upLevel);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 根据类型判断结束走向
|
|
|
if (this.data.mode == 1) {
|
|
|
if (winPlayer.data.levelPointView[0] >= this.data.modev) {
|
|
@@ -1369,23 +1395,23 @@ public class GDRoom extends Room {
|
|
|
if (scoreLv>14){
|
|
|
scoreLv = scoreLv-13;
|
|
|
// 是否套圈
|
|
|
- if ((Integer)this.jsonData.get("upgradeType") == 1){//头游搭档不为4游套圈次数加1
|
|
|
- Integer flippingType = (Integer) this.jsonData.get("flippingType");
|
|
|
- switch (flippingType) {
|
|
|
- case 1://头游三游过..
|
|
|
- if (teammateData.getRank()!=4) {
|
|
|
- winPlayer.data.circleNum++;
|
|
|
- teammateData.player.data.circleNum++;
|
|
|
- }else {
|
|
|
- scoreLv = 14;//如果队友是4游,则牌级为14,不升级
|
|
|
- }
|
|
|
- break;
|
|
|
- case 2://头游过..
|
|
|
- winPlayer.data.circleNum++;
|
|
|
- teammateData.player.data.circleNum++;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+// if ((Integer)this.jsonData.get("ferrule") == 0){//头游搭档不为4游套圈次数加1
|
|
|
+// Integer flippingType = (Integer) this.jsonData.get("flippingType");
|
|
|
+// switch (flippingType) {
|
|
|
+// case 1://头游三游过..
|
|
|
+// if (teammateData.getRank()!=4) {
|
|
|
+// winPlayer.data.circleNum++;
|
|
|
+// teammateData.player.data.circleNum++;
|
|
|
+// }else {
|
|
|
+// scoreLv = 14;//如果队友是4游,则牌级为14,不升级
|
|
|
+// }
|
|
|
+// break;
|
|
|
+// case 2://头游过..
|
|
|
+// winPlayer.data.circleNum++;
|
|
|
+// teammateData.player.data.circleNum++;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
// 设置分数等级
|
|
|
for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
@@ -1485,22 +1511,29 @@ public class GDRoom extends Room {
|
|
|
break;
|
|
|
case 3://3局不过A判负结束
|
|
|
//判断打A的次数
|
|
|
- if (this.data.maxLvNum>=3){//超过三局直接结束
|
|
|
+ if (this.data.maxLvNum>=3&&!winPlayer.getId().equals(this.data.lvPlayerId)&&!teammateData.player.getId().equals(this.data.lvPlayerId)){//超过三局直接结束,并且头游或搭档不是第一次打到该牌级 则结束游戏
|
|
|
isAllOver = true;
|
|
|
this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
+ break;
|
|
|
}
|
|
|
if (this.data.lvPlayerId!=null){
|
|
|
if(winPlayer.getId().equals(this.data.lvPlayerId)||teammateData.player.getId().equals(this.data.lvPlayerId)){
|
|
|
+ if (this.data.maxLvNum>=3){//超过3局判负
|
|
|
+ isAllOver = true;
|
|
|
+ List<Player> collect = this.actors.values().stream()
|
|
|
+ .filter(player -> !winPlayer.getId().equals(player.getId()) || !teammateData.player.getId().equals(player.getId()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ this.setWinPlayer(collect.get(0),collect.get(1));
|
|
|
+ break;
|
|
|
+ }
|
|
|
//判断当前头游或搭档是否第一次打到该牌级,如果是则判断搭档是否为4游,不为4游直接结束
|
|
|
if (winPlayer.data.levelPointView[0] >= this.data.modev&& this.data.isOver&&teammateData.getRank()!=4) {
|
|
|
isAllOver = true;
|
|
|
this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
+ break;
|
|
|
}else {//否则打A次数加1
|
|
|
this.data.maxLvNum++;//否则打A次数加1
|
|
|
}
|
|
|
- }else {
|
|
|
- //如果当前头游或搭档不是第一次打到该牌级,则打A次数加1
|
|
|
- this.data.maxLvNum++;//否则打A次数加1
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -1509,23 +1542,35 @@ public class GDRoom extends Room {
|
|
|
this.data.isOver&&teammateData.getRank()!=4) { //当前头游是否打该牌级 并且搭档不为4游 则结束游戏
|
|
|
isAllOver = true;
|
|
|
this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
- }else if (!this.data.isOver&& this.data.maxLvNum>=3){//当前牌级点数 等于模式牌级点数 并且最大牌级达到3次 头游不是最大牌级 则打2
|
|
|
- //重新设置牌级为2,清空牌级次数
|
|
|
- for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
|
- if (settlementData != null) {
|
|
|
- Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
- if (tmPlayer != null) {
|
|
|
- if (settlementData.playerId.equals(winPlayer.getId()) || settlementData.playerId.equals(teammateData.player.getId())) {
|
|
|
- tmPlayer.data.levelPointView[1] = 2;
|
|
|
- } else {
|
|
|
- tmPlayer.data.levelPointView[0] = 2;
|
|
|
+ }
|
|
|
+ //不能结束的情况,当前头游不是第一次打到该牌级并且没有满足isOver条件,则打A次数加1
|
|
|
+ if (this.data.lvPlayerId!=null&&!this.data.isOver){//到达当前牌级点的玩家不为null
|
|
|
+ if(!winPlayer.getId().equals(this.data.lvPlayerId)&&!teammateData.player.getId().equals(this.data.lvPlayerId)) {
|
|
|
+ this.data.maxLvNum++;
|
|
|
+ }
|
|
|
+ if (this.data.maxLvNum>3){
|
|
|
+ //重新设置牌级为2,清空牌级次数
|
|
|
+ // 第一次打到级牌的玩家和搭档数据
|
|
|
+ Player player = this.actors.getOrDefault(this.data.lvPlayerId, null);
|
|
|
+ Struct.TeammateData teammate = this.getTeammate(winPlayer.data.teammateId);
|
|
|
+ for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
|
+ if (settlementData != null) {
|
|
|
+ Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ if (settlementData.playerId.equals(player.getId()) || settlementData.playerId.equals(teammate.player.getId())) {
|
|
|
+ tmPlayer.data.levelPointView[0] = 2;
|
|
|
+ } else {
|
|
|
+ tmPlayer.data.levelPointView[1] = 2;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.data.maxLvNum = 0;
|
|
|
+ this.data.lvPlayerId = null;
|
|
|
+ if (winPlayer.data.levelPointView[0]>=this.data.modev){
|
|
|
+ this.data.lvPlayerId = winPlayer.getId();
|
|
|
+ }
|
|
|
}
|
|
|
- this.data.maxLvNum = 0;
|
|
|
- }else if (!this.data.isOver){
|
|
|
- this.data.maxLvNum++;
|
|
|
}
|
|
|
}
|
|
|
return isAllOver;
|
|
@@ -1665,20 +1710,7 @@ public class GDRoom extends Room {
|
|
|
setSettlementData(winners, winPlayer, teammateData);
|
|
|
|
|
|
// 广播结算信息
|
|
|
- for (Player tmPlayer : this.actors.values()) {
|
|
|
- if (tmPlayer != null) {
|
|
|
- Map<String, Object> data = this.roomToMessage(tmPlayer, null);
|
|
|
- data.put("state", 3);
|
|
|
- List<Map<String, Object>> otherInfo = new ArrayList<>();
|
|
|
- for (Player p : this.actors.values()) {
|
|
|
- if (p != null && !Objects.equals(tmPlayer.getId(), p.getId())) {
|
|
|
- otherInfo.add(this.playerRoomToMessage(p, true));
|
|
|
- }
|
|
|
- }
|
|
|
- data.put("otherInfo", otherInfo);
|
|
|
- tmPlayer.receive(CommonProto.Cmd.GameStateChange_VALUE, data);
|
|
|
- }
|
|
|
- }
|
|
|
+ this.totalSettlement();
|
|
|
}
|
|
|
|
|
|
private int[] calculateCircleCounts(String winPlayerId, String teammatePlayerId) {
|
|
@@ -1733,8 +1765,8 @@ public class GDRoom extends Room {
|
|
|
*/
|
|
|
private synchronized boolean noCircleSettlement() {
|
|
|
boolean isAllOver = false;
|
|
|
- if ((Integer)this.jsonData.get("upgradeType") == 1){//不套圈,判断能否判负或判2
|
|
|
- return true;
|
|
|
+ if ((Integer)this.jsonData.get("ferrule") == 0){//套圈,判断能否判负或判2
|
|
|
+ return false;
|
|
|
}
|
|
|
JSONObject jsonData = this.jsonData;
|
|
|
Integer flippingType = (Integer)jsonData.get("flippingType");
|
|
@@ -1749,21 +1781,30 @@ public class GDRoom extends Room {
|
|
|
}
|
|
|
// 头游搭档数据
|
|
|
Struct.TeammateData teammateData = this.getTeammate(winPlayer.data.teammateId);
|
|
|
- int[] levelPointView = winPlayer.data.levelPointView;
|
|
|
- boolean match = Arrays.stream(levelPointView).anyMatch(element -> element == this.data.modev);
|
|
|
switch (flippingType) {
|
|
|
case 3://3局不过A判负结束
|
|
|
//判断打A的次数
|
|
|
- if (this.data.maxLvNum>=3&&!this.data.isOver){//超过三局直接结束
|
|
|
+ if (this.data.maxLvNum>=3&&!winPlayer.getId().equals(this.data.lvPlayerId)&&!teammateData.player.getId().equals(this.data.lvPlayerId)){//超过三局直接结束,并且头游或搭档不是第一次打到该牌级 则结束游戏
|
|
|
isAllOver = true;
|
|
|
this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
}
|
|
|
- if (match){//当前牌级点数 等于模式牌级点数
|
|
|
- //判断当前头游是否打该牌级 并且搭档不为4游
|
|
|
- if (winPlayer.data.levelPointView[0] >= this.data.modev&& this.data.isOver&&teammateData.getRank()!=4) {
|
|
|
+ if (this.data.lvPlayerId!=null){
|
|
|
+ if(winPlayer.getId().equals(this.data.lvPlayerId)||teammateData.player.getId().equals(this.data.lvPlayerId)){
|
|
|
+ //判断当前头游或搭档是否第一次打到该牌级,如果是则判断搭档是否为4游,不为4游直接结束
|
|
|
+ if (winPlayer.data.levelPointView[0] >= this.data.modev&& this.data.isOver&&teammateData.getRank()!=4) {
|
|
|
+ isAllOver = true;
|
|
|
+ this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
+ }else {//否则打A次数加1
|
|
|
+ this.data.maxLvNum++;//否则打A次数加1
|
|
|
+ }
|
|
|
+ }else if (this.data.maxLvNum>=3){//超过3局判负
|
|
|
isAllOver = true;
|
|
|
- this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
- }else {//否则打A次数加1
|
|
|
+ List<Player> collect = this.actors.values().stream()
|
|
|
+ .filter(player -> !winPlayer.getId().equals(player.getId()) || !teammateData.player.getId().equals(player.getId()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ this.setWinPlayer(collect.get(0),collect.get(1));
|
|
|
+ }else {
|
|
|
+ //如果当前头游或搭档不是第一次打到该牌级,则打A次数加1
|
|
|
this.data.maxLvNum++;//否则打A次数加1
|
|
|
}
|
|
|
}
|
|
@@ -1773,23 +1814,35 @@ public class GDRoom extends Room {
|
|
|
this.data.isOver&&teammateData.getRank()!=4) { //当前头游是否打该牌级 并且搭档不为4游 则结束游戏
|
|
|
isAllOver = true;
|
|
|
this.setWinPlayer(winPlayer,teammateData.player);
|
|
|
- }else if (!this.data.isOver&& match&& this.data.maxLvNum>=3){//当前牌级点数 等于模式牌级点数 并且最大牌级达到3次 头游不是最大牌级 则打2
|
|
|
- //重新设置牌级为2,清空牌级次数
|
|
|
- for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
|
- if (settlementData != null) {
|
|
|
- Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
- if (tmPlayer != null) {
|
|
|
- if (settlementData.playerId.equals(winPlayer.getId()) || settlementData.playerId.equals(teammateData.player.getId())) {
|
|
|
- tmPlayer.data.levelPointView[1] = 2;
|
|
|
- } else {
|
|
|
- tmPlayer.data.levelPointView[0] = 2;
|
|
|
+ }
|
|
|
+ //不能结束的情况,当前头游不是第一次打到该牌级并且没有满足isOver条件,则打A次数加1
|
|
|
+ if (this.data.lvPlayerId!=null&&!this.data.isOver){//到达当前牌级点的玩家不为null
|
|
|
+ if(!winPlayer.getId().equals(this.data.lvPlayerId)&&!teammateData.player.getId().equals(this.data.lvPlayerId)) {
|
|
|
+ this.data.maxLvNum++;
|
|
|
+ }
|
|
|
+ if (this.data.maxLvNum>3){
|
|
|
+ //重新设置牌级为2,清空牌级次数
|
|
|
+ // 第一次打到级牌的玩家和搭档数据
|
|
|
+ Player player = this.actors.getOrDefault(this.data.lvPlayerId, null);
|
|
|
+ Struct.TeammateData teammate = this.getTeammate(winPlayer.data.teammateId);
|
|
|
+ for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
|
+ if (settlementData != null) {
|
|
|
+ Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ if (settlementData.playerId.equals(player.getId()) || settlementData.playerId.equals(teammate.player.getId())) {
|
|
|
+ tmPlayer.data.levelPointView[0] = 2;
|
|
|
+ } else {
|
|
|
+ tmPlayer.data.levelPointView[1] = 2;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.data.maxLvNum = 0;
|
|
|
+ this.data.lvPlayerId = null;
|
|
|
+ if (winPlayer.data.levelPointView[0]>=this.data.modev){
|
|
|
+ this.data.lvPlayerId = winPlayer.getId();
|
|
|
+ }
|
|
|
}
|
|
|
- this.data.maxLvNum = 0;
|
|
|
- }else if (match && !this.data.isOver){
|
|
|
- this.data.maxLvNum++;
|
|
|
}
|
|
|
}
|
|
|
return isAllOver;
|
|
@@ -1954,7 +2007,12 @@ public class GDRoom extends Room {
|
|
|
data.put("levelPointView", player.data.levelPointView);
|
|
|
// 队友Id
|
|
|
data.put("teammateId", player.data.teammateId);
|
|
|
-
|
|
|
+ //最高分值
|
|
|
+ Map<Integer, Integer> bestScore = player.data.bestScore;
|
|
|
+ if (bestScore.isEmpty()||bestScore==null||bestScore.size()<=0) {
|
|
|
+ bestScore.put(0, 0);
|
|
|
+ }
|
|
|
+ data.put("bestScore", bestScore);
|
|
|
// 玩家牌数据
|
|
|
Map<String, Object> cardInfo = new HashMap<>();
|
|
|
cardInfo.put("remainCards", flag? player.data.remainCards : "");
|