You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

562 lines
18 KiB

  1. local CreateRoomItemBase=require("luaScript.Views.CreateRoom.CreateRoomItemBase")
  2. local MJCreateRoomItem=class("linshuiCreateRoomItem",CreateRoomItemBase)
  3. local SELECT_COLOR = cc.c4b(213,46,11,255)
  4. local NON_SELECT_COLOR = cc.c4b(21,99,97,255)
  5. function MJCreateRoomItem:ctor(defaultValues)
  6. MJCreateRoomItem.super.ctor(self, defaultValues, "guangan_room.json")
  7. local ui = loadUI("res/ui/ui_chuangjian/mj_createroom_guangan.ui");
  8. self.ui = ui;
  9. self:addChild(ui);
  10. --房费
  11. self.PayRadioManager = import("luaScript.Tools.RadioManager"):new();
  12. --人数
  13. self.PlayCountRadioManager = import("luaScript.Tools.RadioManager"):new();
  14. -- 局数
  15. self.RoundNumRadioManager = import("luaScript.Tools.RadioManager"):new();
  16. --封顶
  17. self.FengDingRadioManager = import("luaScript.Tools.RadioManager"):new();
  18. -- 飘
  19. self.PiaoRadioManager = import("luaScript.Tools.RadioManager"):new();
  20. -- 底分
  21. self.DiFenRadioManager = import("luaScript.Tools.RadioManager"):new();
  22. --玩法
  23. self.WanFaRadioManager = import("luaScript.Tools.RadioManager"):new();
  24. --可选
  25. self.ExtendsionCheckBoxManager = import("luaScript.Tools.CheckBoxManager"):new();
  26. --点杠
  27. self.DianGangCheckBoxManager = import("luaScript.Tools.RadioManager"):new();
  28. -- 其他选项
  29. self.otherCheckBoxManager = import("luaScript.Tools.CheckBoxManager"):new()
  30. self:onHideCestView() -- 隐藏cest的界面
  31. end
  32. function MJCreateRoomItem:onHideCestView()
  33. if self.ui.Items.Button_pay0_tips then
  34. self.ui.Items.Button_pay0_tips:setVisible(false)
  35. end
  36. if self.ui.Items.Button_pay1_tips then
  37. self.ui.Items.Button_pay1_tips:setVisible(false)
  38. end
  39. if self.ui.Items.ImageView_pay0_tips then
  40. self.ui.Items.ImageView_pay0_tips:setVisible(false)
  41. end
  42. if self.ui.Items.ImageView_pay1_tips then
  43. self.ui.Items.ImageView_pay1_tips:setVisible(false)
  44. end
  45. end
  46. function MJCreateRoomItem:onShowCestView()
  47. if self.ui.Items.Text_pay0 then
  48. self.ui.Items.Text_pay0:setText("免费")
  49. end
  50. if self.ui.Items.Text_pay1 then
  51. self.ui.Items.Text_pay1:setText("自费")
  52. end
  53. if self.ui.Items.Button_pay0_tips then
  54. self.ui.Items.Button_pay0_tips:setVisible(true)
  55. end
  56. if self.ui.Items.Button_pay1_tips then
  57. self.ui.Items.Button_pay1_tips:setVisible(true)
  58. end
  59. if self.ui.Items.ImageView_pay0_tips then
  60. self.ui.Items.ImageView_pay0_tips:setVisible(false)
  61. end
  62. if self.ui.Items.Button_pay0_tips then
  63. self.ui.Items.Button_pay0_tips:registerClick(function()
  64. if self.ui.Items.ImageView_pay0_tips then
  65. local isVisible = not self.ui.Items.ImageView_pay0_tips:isVisible()
  66. self.ui.Items.ImageView_pay0_tips:setVisible(isVisible)
  67. end
  68. end)
  69. end
  70. if self.ui.Items.ImageView_pay1_tips then
  71. self.ui.Items.ImageView_pay1_tips:setVisible(false)
  72. end
  73. if self.ui.Items.Button_pay1_tips then
  74. self.ui.Items.Button_pay1_tips:registerClick(function()
  75. if self.ui.Items.ImageView_pay1_tips then
  76. local isVisible = not self.ui.Items.ImageView_pay1_tips:isVisible()
  77. self.ui.Items.ImageView_pay1_tips:setVisible(isVisible)
  78. end
  79. end)
  80. end
  81. end
  82. --根据局数获取房费
  83. function MJCreateRoomItem:getCreateRoomCost(jushu)
  84. if self.cost then
  85. local costInfo = self.cost[jushu]
  86. if costInfo then
  87. local payMode = self.PayRadioManager:getResult()
  88. if payMode == 0 then
  89. return costInfo.roomCard or 0
  90. elseif payMode == 1 then
  91. return costInfo.roomCardAA or 0
  92. end
  93. end
  94. end
  95. return 0
  96. end
  97. function MJCreateRoomItem:onEnter()
  98. MJCreateRoomItem.super.onEnter(self)
  99. -- 整理不同局数对应的房卡消耗
  100. local payTypes={}
  101. local gameConfig = app.user:getGameConfig(GAME_IDS.GuangAnMJ)
  102. if gameConfig then
  103. local arrGameRound = toNumberArray(",")(gameConfig.gameRound)
  104. local arrRequireCards = toNumberArray(",")(gameConfig.requireCards)
  105. local arrRequireCardsAA = toNumberArray(",")(gameConfig.AArequireCards)
  106. for idx, gameRound in ipairs(arrGameRound) do
  107. payTypes[gameRound] =
  108. {
  109. roomCard = arrRequireCards[idx],
  110. roomCardAA = arrRequireCardsAA[idx],
  111. }
  112. end
  113. end
  114. self.cost = payTypes
  115. self:initPayRadioManager();
  116. self:initExtendsionCheckBoxManager();
  117. self:initPlayCountRadioManager();
  118. --self:initFengDingRadioManager();
  119. --self:initPiaoRadioManager()
  120. --self:initDiFenRadioManager()
  121. --self:initDianGangHuaRadioManager()
  122. --self:initWanFaRadioManager();
  123. self:initLayoutEvent()
  124. self:initOtherCheckBoxManager();
  125. self:initJiFenBeiShu()
  126. end
  127. --[[
  128. -- 初始化房费支付选项
  129. --]]
  130. function MJCreateRoomItem:initPayRadioManager ( )
  131. if self.PayRadioManager then
  132. self.PayRadioManager:addItem(self.ui.Items.CheckBox_FangZhu, 0); -- 房主支付
  133. self.PayRadioManager:addItem(self.ui.Items.CheckBox_AAPay, 1); -- AA支付
  134. local default = self:getDefaultValue("deductRule") or 0
  135. self.PayRadioManager:setDefault(default)
  136. --通知创建界面更新显示
  137. local function dispatchUpdateCost()
  138. app:dispatchEvent({name = "onChangePayMode"})
  139. end
  140. self.PayRadioManager:setCallback(dispatchUpdateCost);
  141. -- self:setDefaultTextColor(self.PayRadioManager,"Text_pay")
  142. end
  143. end
  144. --[[
  145. -- 初始化人数选项
  146. --]]
  147. function MJCreateRoomItem:initPlayCountRadioManager ( )
  148. if self.PlayCountRadioManager then
  149. self.PlayCountRadioManager:addItem(self.ui.Items.CheckBox_playerCount_4, 0); -- 快速开局
  150. self.PlayCountRadioManager:addItem(self.ui.Items.CheckBox_playerCount_3, 4); -- 满4人开
  151. self.PlayCountRadioManager:addItem(self.ui.Items.CheckBox_playerCount_2, 3); -- 满3人开
  152. self.PlayCountRadioManager:addItem(self.ui.Items.CheckBox_playerCount_1, 2); -- 满2人开
  153. self.PlayCountRadioManager:addItem(self.ui.Items.CheckBox_playerCount_5, 5); -- 三人两房
  154. self.PlayCountRadioManager:addItem(self.ui.Items.CheckBox_playerCount_6, 6); -- 两人两房
  155. local defaultValue = self:getDefaultValue("playnum") or 0
  156. local fangDefaultValue = self:getDefaultValue("fangNum") or 0
  157. local isfaststart = self:getDefaultValue("isfaststart") or 1
  158. if isfaststart==1 then
  159. self.PlayCountRadioManager:setDefault(0);
  160. else
  161. self.PlayCountRadioManager:setDefault(defaultValue);
  162. end
  163. if fangDefaultValue == 2 then
  164. self.PlayCountRadioManager:setDefault(6);
  165. elseif fangDefaultValue == 3 then
  166. self.PlayCountRadioManager:setDefault(5);
  167. end
  168. local callback = function ()
  169. local palynum = self.PlayCountRadioManager:getResult()
  170. if palynum == 6 or palynum == 5 then --3人2房和2人2房没有定缺
  171. self.ui.Items.CheckBox_DingQue:setEnabled(false)
  172. self.ui.Items.CheckBox_DingQue:setSelectedState(false)
  173. self.ui.Items.Text_DingQue:setTextColor(NON_SELECT_COLOR)
  174. else
  175. self.ui.Items.CheckBox_DingQue:setEnabled(true)
  176. end
  177. end
  178. self.PlayCountRadioManager:setCallback(callback)
  179. callback()
  180. -- self:setDefaultTextColor(self.PlayCountRadioManager, "Text_player")
  181. -- self:updataTextColor(self.PlayCountRadioManager, "Text_player","radioBox",{0,4,3,2})
  182. end
  183. --快速成局说明
  184. self.ui.Items.ImageView_KSCJ:setVisible(false)
  185. self.ui.Items.Button_KSCJ:registerClick(function()
  186. self.ui.Items.ImageView_KSCJ:setVisible(not self.ui.Items.ImageView_KSCJ:isVisible())
  187. end)
  188. --积分倍数说明
  189. self.ui.Items.ImageView_JFBS:setVisible(false)
  190. self.ui.Items.Button_JFBS:registerClick(function()
  191. self.ui.Items.ImageView_JFBS:setVisible(not self.ui.Items.ImageView_JFBS:isVisible())
  192. end)
  193. end
  194. --[[
  195. -- 初始化封顶选项
  196. --]]
  197. function MJCreateRoomItem:initFengDingRadioManager ()
  198. -- 封顶
  199. if self.FengDingRadioManager then
  200. self.FengDingRadioManager:addItem(self.ui.Items.CheckBox_3fan, 3); -- 封顶3番
  201. self.FengDingRadioManager:addItem(self.ui.Items.CheckBox_4fan, 4); -- 封顶4番
  202. self.FengDingRadioManager:addItem(self.ui.Items.CheckBox_5fan, 5); -- 封顶5番
  203. local default = self:getDefaultValue("limitfan") or 3
  204. self.FengDingRadioManager:setDefault(default)
  205. end
  206. end
  207. --[[/**
  208. * 初始化飘选项
  209. * @return
  210. */--]]
  211. function MJCreateRoomItem:initPiaoRadioManager ()
  212. if not self.PiaoRadioManager then
  213. return
  214. end
  215. self.PiaoRadioManager:addItem(self.ui.Items.CheckBox_Piao_0, 0); -- 不飘
  216. self.PiaoRadioManager:addItem(self.ui.Items.CheckBox_Piao_1, 1); -- 随飘
  217. self.PiaoRadioManager:addItem(self.ui.Items.CheckBox_Piao_2, 2); -- 定飘
  218. local defaultValue = self:getDefaultValue("piaomode") or 0;
  219. self.PiaoRadioManager:setDefault(defaultValue);
  220. end
  221. --[[/**
  222. * 初始化底分选项
  223. * @return
  224. */--]]
  225. function MJCreateRoomItem:initDiFenRadioManager()
  226. --底分1-100
  227. self._txtDiFen = self.ui.Items.Text_difen
  228. local lstMin, lsMax = 1, 100
  229. self.Slider_limitScore = self.ui.Items.Slider_limitScore
  230. self.Slider_limitScore:addEventListener(function ( sender, eventType)
  231. if eventType == 0 then
  232. local per = sender:getPercent()
  233. self.limitScore = math.floor(lstMin + (lsMax-lstMin)/100 * per)
  234. self._txtDiFen:setString(string.format("%d", self.limitScore))
  235. end
  236. end)
  237. -- default
  238. self.limitScore = self:getDefaultValue("difen") or 1
  239. if self.limitScore == 0 then
  240. self.limitScore = 1
  241. end
  242. self._txtDiFen:setString(string.format("%d", tonumber(self.limitScore)))
  243. local lastlsPer = (self.limitScore-lstMin)/(lsMax-lstMin)*100
  244. self.Slider_limitScore:setPercent(lastlsPer)
  245. --local defaultValue = self:getDefaultValue("gamescore") or 1;
  246. --self.DiFenRadioManager:setDefault(defaultValue);
  247. end
  248. --[[/**
  249. * 初始化点杠花选项
  250. * @return
  251. */--]]
  252. function MJCreateRoomItem:initDianGangHuaRadioManager()
  253. if not self.DianGangCheckBoxManager then
  254. return
  255. end
  256. -- 点杠
  257. if self.DianGangCheckBoxManager then
  258. self.DianGangCheckBoxManager:addItem(self.ui.Items.CheckBox_gang_1, 2); -- 自摸
  259. self.DianGangCheckBoxManager:addItem(self.ui.Items.CheckBox_gang_2, 1); -- 点炮
  260. local default = self:getDefaultValue("gshmode") or 2
  261. self.DianGangCheckBoxManager:setDefault(default)
  262. end
  263. end
  264. --[[
  265. -- 初始化可选选项
  266. --]]
  267. function MJCreateRoomItem:initExtendsionCheckBoxManager ( )
  268. if self.ExtendsionCheckBoxManager then
  269. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_DingQue, "dq", 0x0004, 0); -- 定缺
  270. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_MenDaDieJia, "mddj", 0x0008, 0); -- 门大叠加
  271. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_GSJKKH, "gsjkkh", 0x0010, 0); -- 过水加颗可胡
  272. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_ZiFeiJi, "zpfj", 0x0020, 0); --字牌飞机
  273. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_ZiHuoJian, "zphj", 0x0040, 0); --字牌火箭
  274. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_HuanSanZhang, "hsz", 0x0001, 0); -- 换三张
  275. self.ExtendsionCheckBoxManager:addItem(self.ui.Items.CheckBox_BuHuanZhongFaBai, "bhzfb", 0x0002, 0);-- 不换中发白
  276. local specRule = self:getDefaultValue("specRule") or 108
  277. local selecteds = {};
  278. if getNumBand(specRule, 0x0004)>0 then
  279. table.insert(selecteds, "dq")
  280. end
  281. if getNumBand(specRule, 0x0008)>0 then
  282. table.insert(selecteds, "mddj")
  283. end
  284. if getNumBand(specRule, 0x0010)>0 then
  285. table.insert(selecteds, "gsjkkh")
  286. end
  287. if getNumBand(specRule, 0x0020)>0 then
  288. table.insert(selecteds, "zpfj")
  289. end
  290. if getNumBand(specRule, 0x0040)>0 then
  291. table.insert(selecteds, "zphj")
  292. end
  293. if getNumBand(specRule, 0x0001)>0 then
  294. table.insert(selecteds, "hsz")
  295. end
  296. if getNumBand(specRule, 0x0002)>0 then
  297. table.insert(selecteds, "bhzfb")
  298. end
  299. self.ExtendsionCheckBoxManager:setDefault(selecteds)
  300. local rscallback = function ()
  301. local isShowHSZ = self.ui.Items.CheckBox_HuanSanZhang:getSelectedState()
  302. if isShowHSZ then
  303. self.ui.Items.CheckBox_BuHuanZhongFaBai:setVisible(true)
  304. else
  305. self.ui.Items.CheckBox_BuHuanZhongFaBai:setVisible(false)
  306. self.ui.Items.CheckBox_BuHuanZhongFaBai:setSelectedState(false)
  307. self.ui.Items.Text_BuHuanZhongFaBai:setTextColor(NON_SELECT_COLOR)
  308. end
  309. end
  310. self.ExtendsionCheckBoxManager:setCallback(rscallback)
  311. rscallback()
  312. --门大叠加说明
  313. self.ui.Items.ImageView_MDDJ:setVisible(false)
  314. self.ui.Items.Button_MDDJ:registerClick(function()
  315. self.ui.Items.ImageView_MDDJ:setVisible(not self.ui.Items.ImageView_MDDJ:isVisible())
  316. end)
  317. end
  318. end
  319. --[[
  320. -- 初始化玩法选项
  321. --]]
  322. function MJCreateRoomItem:initWanFaRadioManager ( )
  323. if self.WanFaRadioManager then
  324. self.WanFaRadioManager:addItem(self.ui.Items.CheckBox_Baipai, "placecard", 0x0001, 0); -- 摆牌
  325. local selectedValue = {};
  326. local placecard = self:getDefaultValue("placecard") or 1;
  327. if placecard > 0 then
  328. table.insert(selectedValue, "placecard");
  329. end
  330. self.WanFaRadioManager:setDefault(selectedValue)
  331. end
  332. end
  333. -- 面板的点击事件,点击面板后,隐藏所有提示
  334. function MJCreateRoomItem:initLayoutEvent()
  335. self.ui.Items.Layout_1:registerClick(function()
  336. local buttons = {
  337. {buttonName = "Button_KSCJ", tipsName = "ImageView_KSCJ"},
  338. {buttonName = "Button_JFBS", tipsName = "ImageView_JFBS"},
  339. {buttonName = "Button_MDDJ", tipsName = "ImageView_MDDJ"}
  340. };
  341. -- 隐藏其他提示信息
  342. for k, v in ipairs(buttons) do
  343. local tipsNode = self.ui.Items[v.tipsName]
  344. tipsNode:setVisible(false)
  345. end
  346. end)
  347. end
  348. ---
  349. -- 初始化其他选项
  350. -- @return
  351. --
  352. function MJCreateRoomItem:initOtherCheckBoxManager ()
  353. if not self.otherCheckBoxManager then
  354. return
  355. end
  356. self.otherCheckBoxManager:addItem(self.ui.Items.CheckBox_ForbidProp, "forbidProp", 1, 0)--屏蔽快捷语与道具
  357. self.otherCheckBoxManager:addItem(self.ui.Items.CheckBox_ForbidVoice, "forbidVoice", 1, 0)--屏蔽语音
  358. local forbidProp = self:getDefaultValue("forbidProp") or 0
  359. local forbidVoice = self:getDefaultValue("forbidVoice") or 0
  360. local defaults = {}
  361. if forbidProp > 0 then
  362. table.insert(defaults, "forbidProp")
  363. end
  364. if forbidVoice == 1 then
  365. table.insert(defaults, "forbidVoice")
  366. end
  367. self.otherCheckBoxManager:setDefault(defaults)
  368. end
  369. -- 初始化积分倍数
  370. function MJCreateRoomItem:initJiFenBeiShu()
  371. self.ui.Items.Button_jia:registerClick(handler(self, self.onClickAdd))
  372. self.ui.Items.Button_jian:registerClick(handler(self, self.onClickJian))
  373. self.curJFBS = self:getDefaultValue("baseMulti") or 1;
  374. self:updateJiFenBeiShu()
  375. end
  376. --更新积分倍数
  377. function MJCreateRoomItem:updateJiFenBeiShu()
  378. self.curJFBS = self.curJFBS >= 1.0 and math.floor(self.curJFBS) or self.curJFBS;
  379. self.ui.Items.Text_jifen:setText(self.curJFBS)
  380. self.ui.Items.Button_jia:setEnabled(self.curJFBS ~= 100)
  381. self.ui.Items.Button_jian:setEnabled(self.curJFBS ~= 0.1)
  382. end
  383. --按钮加
  384. function MJCreateRoomItem:onClickAdd()
  385. playBtnEffect()
  386. if not self.curJFBS then
  387. return
  388. end
  389. if self.curJFBS >= 1.0 then
  390. self.curJFBS = self.curJFBS + 1.0
  391. else
  392. self.curJFBS = self.curJFBS + 0.1
  393. end
  394. if self.curJFBS >= 100 then
  395. self.curJFBS = 100;
  396. end
  397. self:updateJiFenBeiShu()
  398. end
  399. --按钮减
  400. function MJCreateRoomItem:onClickJian()
  401. playBtnEffect()
  402. if not self.curJFBS then
  403. return
  404. end
  405. if self.curJFBS <= 1.0 then
  406. self.curJFBS = self.curJFBS - 0.1
  407. else
  408. self.curJFBS = self.curJFBS - 1.0
  409. end
  410. if self.curJFBS <= 0.1 then
  411. self.curJFBS = 0.1
  412. end
  413. self:updateJiFenBeiShu()
  414. end
  415. --设置选中值默认颜色
  416. function MJCreateRoomItem:setDefaultTextColor(radio,text)
  417. if radio then
  418. local index = radio:getResult()
  419. local defaultText = string.format(text.."%d",index)
  420. self.ui.Items[defaultText]:setTextColor(SELECT_COLOR)
  421. end
  422. local result = self.WanFaRadioManager:getResult2()
  423. if result.baojiao == 1 then
  424. self.ui.Items.Text_BaoJiao:setTextColor(SELECT_COLOR)
  425. end
  426. if result.xiqian == 1 then
  427. self.ui.Items.Text_XiQian:setTextColor(SELECT_COLOR)
  428. end
  429. end
  430. --点击checkBox时,改变其text的颜色
  431. function MJCreateRoomItem:updataTextColor(radio,text,boxType,valueTab)
  432. local function updataRadioTextColor()
  433. if boxType == "radioBox" then
  434. local index = radio:getResult()
  435. for k,value in pairs(valueTab) do
  436. local item = string.format(text.."%d",value)
  437. self.ui.Items[item]:setTextColor(NON_SELECT_COLOR)
  438. if value == index then
  439. self.ui.Items[item]:setTextColor(SELECT_COLOR)
  440. end
  441. end
  442. elseif boxType == "checkBox" then
  443. local result = self.WanFaRadioManager:getResult2()
  444. if result.baojiao == 1 then
  445. self.ui.Items.Text_BaoJiao:setTextColor(SELECT_COLOR)
  446. else
  447. self.ui.Items.Text_BaoJiao:setTextColor(NON_SELECT_COLOR)
  448. end
  449. if result.xiqian == 1 then
  450. self.ui.Items.Text_XiQian:setTextColor(SELECT_COLOR)
  451. else
  452. self.ui.Items.Text_XiQian:setTextColor(NON_SELECT_COLOR)
  453. end
  454. end
  455. end
  456. radio:setCallback(updataRadioTextColor);
  457. end
  458. function MJCreateRoomItem:getRuleResult()
  459. local payMode = self.PayRadioManager:getResult(); -- 支付模式
  460. local playnum = self.PlayCountRadioManager:getResult(); -- 玩牌人数, 0表示快速开局
  461. local isfaststart = playnum == 0 and 1 or 0; -- 是否快速开局
  462. local fangnum = 0 --2:两人两房 3:三人两房
  463. if playnum == 5 then
  464. fangnum = 3
  465. playnum = 3
  466. elseif playnum == 6 then
  467. fangnum = 2
  468. playnum = 2
  469. end
  470. playnum = playnum == 0 and 4 or playnum;
  471. local roundnum = self.RoundNumRadioManager:getResult(); -- 玩牌局数
  472. --local fengding = self.FengDingRadioManager:getResult(); -- 封顶番数
  473. --local gamescore = self.DiFenRadioManager:getResult(); -- 底分
  474. --local piaomode = self.PiaoRadioManager:getResult(); -- 飘
  475. local wanfa = self.WanFaRadioManager:getResult(); -- 自摸加番
  476. local extData = self.ExtendsionCheckBoxManager:getResult2(); -- 可选玩法
  477. local specRule = 0;
  478. for k, v in pairs(extData) do
  479. specRule = getNumOr(specRule, v);
  480. end
  481. local other = self.otherCheckBoxManager:getResult2()
  482. local forbidProp = other["forbidProp"]
  483. local forbidVoice = other["forbidVoice"]
  484. self.defaultValus = {
  485. deductRule = payMode,
  486. playnum = playnum,
  487. gamerule = 1, -- 玩法
  488. isfaststart = isfaststart,
  489. specRule = specRule,
  490. fangNum = fangnum,
  491. --difen = self.limitScore,
  492. --piaomode = piaomode,
  493. --placecard = extData["placecard"],
  494. baseMulti = self.curJFBS,
  495. forbidProp = forbidProp,
  496. forbidVoice = forbidVoice,
  497. };
  498. -- 保存玩家的选择
  499. self:saveDefaultValues()
  500. local strGameInfo = json.encode(self.defaultValus);
  501. return roundnum, strGameInfo
  502. end
  503. return MJCreateRoomItem