public void setBytes(ChannelBuffer buf) { super.setBytes(buf); if (this.getValues() != null && this.getValues().size() > 0) { this.skillId = this.getIntVaule(0); logger.info("ccmd11009 " + this.player.getName() + " sillId:" + skillId); } Room r = this.player.getRoom(); if (r.isInTuoguan(player)) { return; } this.touchedPai = this.player.getTouchedPai(); int hupai = 0; boolean zimo = false; if (this.touchedPai == -1) // 放炮 { if (r.getTimeFlag() != Room.TIME_DEALPAI) { return; } boolean flag = checkInDealArray(this.player); if (!flag) return; this.hu_type = CCMD11009.DIANPAO; this.dianpao = r.getCurPlayer(); // 点炮 // 抢杠 hupai = r.getCurPaiId(); } else // 自摸 { this.hu_type = CCMD11009.ZIMO; zimo = true; hupai = touchedPai; } logger.info("ccmd11009 hu:" + this.player.getName() + " hupaiid:" + hupai); // hupai = 1; List<Integer> arr_sp = player.getShoupai(); arr_sp = MyArrays.sort(arr_sp); hu = new Algorithm_Hu(); hu.hupaiId = hupai; hu.isZimo = zimo; boolean b = hu.testHu(arr_sp); if (b == false) { System.out.println(""); } if (hu_type == 0) b = false; // 错误 if (b) { arr_sp.add(hupai); player.setShoupai(arr_sp); r.waitDeal_back(player, "胡", this); } else { logger.info("hupai fail cmd11009:" + this.player.getAllPaiStr()); CCMD11111 c111 = new CCMD11111(); c111.auto_deal(this.player, "数据出错,本局已托管! 胡 " + hupai); this.player.getRoom().deal_pass(this.player); // 托管的触发: 1. 断线 2前后台数据判断不一致 3.主动托管 this.player.getRoom().addTuoGuanQueue(player); // 让玩家断线 // this.player.closing(); //清理cache中缓存的玩家 // MgsCache.getInstance().removeCache(this.player); } }