恢复原红中游戏 不加锁代码
parent
79637a3c82
commit
f6da891aca
|
|
@ -42,8 +42,6 @@ public class EXRoom extends Room {
|
||||||
|
|
||||||
public int fengdingScore = 0;
|
public int fengdingScore = 0;
|
||||||
|
|
||||||
private boolean closeWinCallBack = false;
|
|
||||||
|
|
||||||
public EXRoom(String roomid, Map<String, String> redis_room_map) {
|
public EXRoom(String roomid, Map<String, String> redis_room_map) {
|
||||||
super(roomid, redis_room_map);
|
super(roomid, redis_room_map);
|
||||||
card = new RoomCard(this);
|
card = new RoomCard(this);
|
||||||
|
|
@ -594,13 +592,9 @@ public class EXRoom extends Room {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void winCallback(EXPlayer owner, int card) {
|
public void winCallback(EXPlayer owner, int card) {
|
||||||
if (closeWinCallBack)
|
|
||||||
return;
|
|
||||||
|
|
||||||
boolean qiangkong_niao = config.getBoolean(Config.ROOM_CONFIG_QIANGKONG_NIAO);
|
boolean qiangkong_niao = config.getBoolean(Config.ROOM_CONFIG_QIANGKONG_NIAO);
|
||||||
|
|
||||||
if (this.winCount >= this.actionList.size()) {
|
if (this.winCount >= this.actionList.size()) {
|
||||||
closeWinCallBack = true;
|
|
||||||
if (actionList.size() > 1) {
|
if (actionList.size() > 1) {
|
||||||
this.bankerSeat = this.activeSeat;
|
this.bankerSeat = this.activeSeat;
|
||||||
if (owner.winType == 1 && qiangkong_niao)
|
if (owner.winType == 1 && qiangkong_niao)
|
||||||
|
|
@ -616,7 +610,6 @@ public class EXRoom extends Room {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.endGame();
|
this.endGame();
|
||||||
closeWinCallBack = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -665,7 +658,7 @@ public class EXRoom extends Room {
|
||||||
// saveMilitaryRound(playBackData.getData());
|
// saveMilitaryRound(playBackData.getData());
|
||||||
// boolean total = this.round >= this.maxRound;
|
// boolean total = this.round >= this.maxRound;
|
||||||
// if(this.entrusResultType ==EXRoom.ENTRUST_CURREN_RESULT) {
|
// if(this.entrusResultType ==EXRoom.ENTRUST_CURREN_RESULT) {
|
||||||
// for (Entry<Integer, Player> entry : this.playerMapById.entrySet()) {
|
// for (Entry<Integer, Player> entry : this.playerMapById.entrySet()) {
|
||||||
// if(entry.getValue().isEntrust()) {
|
// if(entry.getValue().isEntrust()) {
|
||||||
// total = true;
|
// total = true;
|
||||||
// break;
|
// break;
|
||||||
|
|
@ -679,8 +672,8 @@ public class EXRoom extends Room {
|
||||||
// }
|
// }
|
||||||
// this.stateMachine.changeState(Global.getState(EXRoomRoundSettleState.class));
|
// this.stateMachine.changeState(Global.getState(EXRoomRoundSettleState.class));
|
||||||
// this.winCount = 0;
|
// this.winCount = 0;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// if (total) {
|
// if (total) {
|
||||||
// this.stateMachine.changeState(Global.getState(RoomDestoryGameState.class));
|
// this.stateMachine.changeState(Global.getState(RoomDestoryGameState.class));
|
||||||
// return;
|
// return;
|
||||||
|
|
@ -701,11 +694,9 @@ public class EXRoom extends Room {
|
||||||
public void clear() {
|
public void clear() {
|
||||||
super.clear();
|
super.clear();
|
||||||
this.liuju = false;
|
this.liuju = false;
|
||||||
this.closeWinCallBack = false;
|
|
||||||
this.activeSeat = this.lastDiscardSeat = this.currenDiscardSeat = 0;
|
this.activeSeat = this.lastDiscardSeat = this.currenDiscardSeat = 0;
|
||||||
this.winCount = this.piaoNiaoCount = 0;
|
this.winCount = this.piaoNiaoCount = 0;
|
||||||
this.niao.clear();
|
this.niao.clear();
|
||||||
this.actionList.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue