No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

130 líneas
2.7 KiB

  1. local bzpFunctions=PKFramework.PKFrameworkClassImprot("pk_base.luaScript.PKFunctions")
  2. function bzpFunctions.getIsForbidChat()
  3. local roomInfo = app.room.roomInfo;
  4. local jsonInfo = json.decode(roomInfo.strGameInfo)
  5. if jsonInfo then
  6. if jsonInfo.jzdybq == 1 then
  7. return true
  8. else
  9. return false
  10. end
  11. end
  12. return false
  13. end
  14. function bzpFunctions.getIsDaiHuaPai()
  15. local roomInfo = app.room.roomInfo;
  16. local jsonInfo = json.decode(roomInfo.strGameInfo)
  17. if jsonInfo then
  18. if jsonInfo.reNumShow == 1 then
  19. return true
  20. else
  21. return false
  22. end
  23. end
  24. return false
  25. end
  26. function bzpFunctions.isForbidProp ()
  27. if not app.room or not app.room.roomInfo.strGameInfo then
  28. return false
  29. end
  30. local gameInfo = json.decode(app.room.roomInfo.strGameInfo)
  31. local forbidProp = gameInfo.forbidProp or 0
  32. return tonumber(forbidProp) > 0
  33. end
  34. -- todo
  35. function bzpFunctions.isForbidVoice ()
  36. if not app.room or not app.room.roomInfo.strGameInfo then
  37. return false
  38. end
  39. local gameInfo = json.decode(app.room.roomInfo.strGameInfo)
  40. local forbidVoice = gameInfo.forbidVoice or 0
  41. return tonumber(forbidVoice) > 0
  42. end
  43. function bzpFunctions.getIsFristBaoPai()
  44. local roomInfo = app.room.roomInfo;
  45. local jsonInfo = json.decode(roomInfo.strGameInfo)
  46. if jsonInfo then
  47. if jsonInfo.firstBao == 1 then
  48. return true
  49. else
  50. return false
  51. end
  52. end
  53. return false
  54. end
  55. function bzpFunctions.getIsFanBao()
  56. local roomInfo = app.room.roomInfo;
  57. local jsonInfo = json.decode(roomInfo.strGameInfo)
  58. if jsonInfo then
  59. if jsonInfo.fanBao == 1 then
  60. return true
  61. else
  62. return false
  63. end
  64. end
  65. return false
  66. end
  67. function bzpFunctions.getIsMingJiao()
  68. local roomInfo = app.room.roomInfo;
  69. local jsonInfo = json.decode(roomInfo.strGameInfo)
  70. if jsonInfo then
  71. if jsonInfo.jiaoPaiType == 1 then
  72. return true
  73. else
  74. return false
  75. end
  76. end
  77. return false
  78. end
  79. function bzpFunctions.getIsShowLeftCard()
  80. local roomInfo = app.room.roomInfo;
  81. local jsonInfo = json.decode(roomInfo.strGameInfo)
  82. if jsonInfo then
  83. if jsonInfo.reNumShow == 1 then
  84. return true
  85. else
  86. return false
  87. end
  88. end
  89. return false
  90. end
  91. function bzpFunctions.getIsSingleBattle()
  92. local roomInfo = app.room.roomInfo;
  93. local jsonInfo = json.decode(roomInfo.strGameInfo)
  94. if jsonInfo then
  95. if jsonInfo.fightAlone == 1 then
  96. return true
  97. else
  98. return false
  99. end
  100. end
  101. return false
  102. end
  103. ---
  104. -- 检测互动道具是否可以使用
  105. -- 亲友圈配置
  106. -- @return
  107. --
  108. function bzpFunctions:isPropFobided ()
  109. if not app.room then
  110. return
  111. end
  112. local roomInfo = app.room.roomInfo or {}
  113. local strGameInfo = app.room.roomInfo.strGameInfo or ""
  114. local info = json.decode(strGameInfo) or {}
  115. local isFobided = info.forbidProp == 1
  116. return isFobided
  117. end
  118. return bzpFunctions