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.

41 regels
1009 B

  1. local DdzFunctions = {}
  2. ---
  3. -- 是否勾选了禁止使用道具和语音选项
  4. -- @return
  5. --
  6. function DdzFunctions.isForbidProp ()
  7. local gameInfo = json.decode(app.room.roomInfo.nGameInfo)
  8. local forbidProp = gameInfo.forbidProp or 0
  9. return tonumber(forbidProp) > 0
  10. end
  11. function DdzFunctions.isForbidVoice ()
  12. local gameInfo = json.decode(app.room.roomInfo.nGameInfo)
  13. local forbidVoice = gameInfo.forbidVoice or 0
  14. return tonumber(forbidVoice) > 0
  15. end
  16. -- 俱乐部邀请规则
  17. function DdzFunctions.getRuleStrByClubInvite(roomListData)
  18. local temp = ""
  19. local jsonInfo = nil
  20. if roomListData then
  21. jsonInfo = roomListData
  22. else
  23. jsonInfo = json.decode(app.room.roomInfo.nGameInfo) or {}
  24. end
  25. local roundCount = app.room.roomInfo.nTotalGameNum
  26. if roundCount then
  27. temp = temp .. roundCount .. "局 "
  28. end
  29. local gamerule = tonumber(jsonInfo.gamerule);
  30. local gameRuleName = getSubGameRuleName(app.gameId, gamerule) or "";
  31. temp = temp .. gameRuleName;
  32. return temp
  33. end
  34. return DdzFunctions