- local bzpFunctions=PKFramework.PKFrameworkClassImprot("pk_base.luaScript.PKFunctions")
-
- function bzpFunctions.getIsForbidChat()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.jzdybq == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
-
- function bzpFunctions.getIsDaiHuaPai()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.reNumShow == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
-
- function bzpFunctions.isForbidProp ()
- if not app.room or not app.room.roomInfo.strGameInfo then
- return false
- end
- local gameInfo = json.decode(app.room.roomInfo.strGameInfo)
- local forbidProp = gameInfo.forbidProp or 0
- return tonumber(forbidProp) > 0
- end
- -- todo
- function bzpFunctions.isForbidVoice ()
- if not app.room or not app.room.roomInfo.strGameInfo then
- return false
- end
- local gameInfo = json.decode(app.room.roomInfo.strGameInfo)
- local forbidVoice = gameInfo.forbidVoice or 0
- return tonumber(forbidVoice) > 0
- end
-
-
- function bzpFunctions.getIsFristBaoPai()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.firstBao == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
-
- function bzpFunctions.getIsFanBao()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.fanBao == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
-
- function bzpFunctions.getIsMingJiao()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.jiaoPaiType == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
-
- function bzpFunctions.getIsShowLeftCard()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.reNumShow == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
-
- function bzpFunctions.getIsSingleBattle()
- local roomInfo = app.room.roomInfo;
- local jsonInfo = json.decode(roomInfo.strGameInfo)
- if jsonInfo then
- if jsonInfo.fightAlone == 1 then
- return true
- else
- return false
- end
- end
- return false
- end
- ---
- -- 检测互动道具是否可以使用
- -- 亲友圈配置
- -- @return
- --
- function bzpFunctions:isPropFobided ()
- if not app.room then
- return
- end
-
- local roomInfo = app.room.roomInfo or {}
- local strGameInfo = app.room.roomInfo.strGameInfo or ""
- local info = json.decode(strGameInfo) or {}
- local isFobided = info.forbidProp == 1
- return isFobided
- end
-
- return bzpFunctions
|