|
@@ -44,33 +44,39 @@ public class CreatRoomHandler extends NetHandler {
|
|
|
}
|
|
|
|
|
|
// 玩法类型 1掼蛋 2转蛋 3复式掼蛋
|
|
|
- int type = request.getDataValue("ty", Integer.class, 1);
|
|
|
+ int type = request.getDataValue("ty", Integer.class, 0);
|
|
|
|
|
|
// 玩法 mode 1连续打 2按局数 3按时间
|
|
|
- int mode = request.getDataValue("mode", Integer.class, 1);
|
|
|
+ int mode = request.getDataValue("mode", Integer.class, 0);
|
|
|
// 玩法具体 modev 14A必打
|
|
|
- int modev = request.getDataValue("modev", Integer.class, 14);
|
|
|
+ int modev = request.getDataValue("modev", Integer.class, 0);
|
|
|
|
|
|
|
|
|
// 胜利规则 vic 1有头游无末游过A结束 2游头游过A结束 33局不过A判负结束 43局不过A用2开始
|
|
|
- int vic = request.getDataValue("vic", Integer.class, 1);
|
|
|
+ int vic = request.getDataValue("vic", Integer.class, 0);
|
|
|
// 进贡 jing 0进贡 1不进贡
|
|
|
- int jing = request.getDataValue("jing", Integer.class, 0);
|
|
|
+ int jing = request.getDataValue("jing", Integer.class, -1);
|
|
|
// 升级 lv 1-123级 2-124级 3-135级 4-246级
|
|
|
int lv = request.getDataValue("lv", Integer.class, 0);
|
|
|
// 套圈 lp 0套圈 1不套圈
|
|
|
- int lp = request.getDataValue("lp", Integer.class, 0);
|
|
|
+ int lp = request.getDataValue("lp", Integer.class, -1);
|
|
|
|
|
|
// 队友 team 0固定队友 1随机搭档 2均匀分配
|
|
|
- int team = request.getDataValue("team", Integer.class, 0);
|
|
|
+ int team = request.getDataValue("team", Integer.class, -1);
|
|
|
+ // 级牌 tc 0随机打几 1固定打2
|
|
|
+ int tc = request.getDataValue("tc", Integer.class, -1);
|
|
|
+ // 翻倍 dv 0不翻倍 1加倍 2翻倍
|
|
|
+ int dv = request.getDataValue("dv", Integer.class, -1);
|
|
|
+ // 积分 pv 0:123 1:124
|
|
|
+ int pv = request.getDataValue("pv", Integer.class, -1);
|
|
|
|
|
|
|
|
|
// 记牌器 count 0允许 1禁用
|
|
|
- int count = request.getDataValue("count", Integer.class, 0);
|
|
|
+ int count = request.getDataValue("count", Integer.class, -1);
|
|
|
// 超时 ot 1过 2等待 3托管
|
|
|
int ot = request.getDataValue("ot", Integer.class, 0);
|
|
|
// 语音 vc 0允许 1禁用
|
|
|
- int vc = request.getDataValue("vc", Integer.class, 0);
|
|
|
+ int vc = request.getDataValue("vc", Integer.class, -1);
|
|
|
// 旁观 pgr 1第一视角 2上帝视角 3上帝&第一视角 4旁观视角
|
|
|
int pgr = request.getDataValue("pgr", Integer.class, 0);
|
|
|
|
|
@@ -84,11 +90,23 @@ public class CreatRoomHandler extends NetHandler {
|
|
|
break;
|
|
|
case 2:
|
|
|
// 转蛋
|
|
|
- jsonData = RoomUtil.zdRoomRule(type, mode, modev, lv, team);
|
|
|
+ if (mode == 1) {
|
|
|
+ Log.info("转蛋参数错误,转蛋没有连续打");
|
|
|
+ response.setCode(CommonProto.Code.PARAMETER_ERR_VALUE);
|
|
|
+ response.setMessage("转蛋参数错误...");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ jsonData = RoomUtil.zdRoomRule(type, mode, modev, lv, team, tc, dv, pv);
|
|
|
break;
|
|
|
case 3:
|
|
|
// 复式掼蛋
|
|
|
- jsonData = RoomUtil.fsgdRoomRule(type, mode, modev, lv, vic, lp);
|
|
|
+ if (mode == 1 || mode == 3) {
|
|
|
+ Log.info("复式掼蛋参数错误,复式掼蛋没有连续打和按时间");
|
|
|
+ response.setCode(CommonProto.Code.PARAMETER_ERR_VALUE);
|
|
|
+ response.setMessage("复式掼蛋参数错误...");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ jsonData = RoomUtil.fsgdRoomRule(type, mode, modev, lv, vic, lp, tc);
|
|
|
// 房间最大局数
|
|
|
jsonData.put("maxRound", 8);
|
|
|
break;
|