|
@@ -4,7 +4,7 @@ import com.incubator.game.player.Player;
|
|
|
import com.incubator.core.room.GRoomInterface;
|
|
|
import com.incubator.game.util.CardUtils;
|
|
|
import com.incubator.game.util.JDGDUtils;
|
|
|
-import com.incubator.game.util.MsgUtil;
|
|
|
+import com.incubator.game.util.ProtoUtil;
|
|
|
import com.incubator.message.proto.CommonProto;
|
|
|
|
|
|
import java.util.*;
|
|
@@ -133,7 +133,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 推送房间其他3个玩家
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null && !Objects.equals(tmPlayer.getId(), player.getId())) {
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, null);
|
|
|
+ Map<String, Object> data = ProtoUtil.roomToMessage(this, tmPlayer, null);
|
|
|
tmPlayer.receive(CommonProto.Cmd.ReadyStateUpdate_VALUE, data);
|
|
|
}
|
|
|
}
|
|
@@ -153,7 +153,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 广播3秒倒计时
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null) {
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, null);
|
|
|
+ Map<String, Object> data = ProtoUtil.roomToMessage(this, tmPlayer, null);
|
|
|
data.put("state", 1);
|
|
|
data.put("time", 3);
|
|
|
tmPlayer.receive(CommonProto.Cmd.GameStateChange_VALUE, data);
|
|
@@ -226,7 +226,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 广播
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null) {
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
+ Map<String, Object> data = ProtoUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
data.put("state", 2);
|
|
|
data.put("time", 20);
|
|
|
// CardUtils.printCards(tmPlayer.data.remainCards);
|
|
@@ -375,7 +375,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 广播其他3人
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null && !Objects.equals(tmPlayer.getId(), player.getId())) {
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
+ Map<String, Object> data = ProtoUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
tmPlayer.receive(CommonProto.Cmd.OtherPlayCards_VALUE, data);
|
|
|
}
|
|
|
}
|
|
@@ -411,7 +411,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 广播其他3人
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null && !Objects.equals(tmPlayer.getId(), player.getId())) {
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
+ Map<String, Object> data = ProtoUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
data.put("curDiscardList", new int[0]);
|
|
|
tmPlayer.receive(CommonProto.Cmd.OtherPlayCards_VALUE, data);
|
|
|
}
|
|
@@ -482,7 +482,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null) {
|
|
|
// 结算信息
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
+ Map<String, Object> data = ProtoUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
tmPlayer.receive(CommonProto.Cmd.GameStateChange_VALUE, data);
|
|
|
}
|
|
|
}
|