local doushisiFunctions=ZPFramework.ZPFrameworkClassImprot("zp_base.luaScript.ZPFunctions") local ZPDef = ZPFramework.ZPImport("zp_base.luaScript.ZPDef") --获取小家是否可以看牌 function doushisiFunctions.getLittleIsCanLookCard() local roomInfo = app.room.roomInfo; local jsonInfo = json.decode(roomInfo.strGameInfo) if jsonInfo then if getNumBand(jsonInfo.specialRule,0x0020) > 0 then return true end end return false end --获取操作显示类型 function doushisiFunctions.getZPOperationType(mType,isHaveGuo,isChongZhao) local mResult = {} --判断是否有吃 local retChi = bit32.band(mType,ZPDef.OpCode.OP_CHI) if retChi > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_CHI) end --判断是否有碰 local retPeng = bit32.band(mType,ZPDef.OpCode.OP_PENG) if retPeng > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_PENG) end local retPeng1 = bit32.band(mType,ZPDef.OpCode.OP_PENG_LAIZI) if retPeng1 > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_LAI_PENG) end --判断是否有巴 local retBa1 = bit32.band(mType,ZPDef.OpCode.OP_BA_QI_SHOU) if retBa1 > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_BA) end local retBa2 = bit32.band(mType,ZPDef.OpCode.OP_BA_ZHUA) if retBa2 > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_BA) end local retBa3 = bit32.band(mType,ZPDef.OpCode.OP_BA_FAN) if retBa3 > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_FANPAI_BA) end --判断是否有偷 local retTou1 = bit32.band(mType,ZPDef.OpCode.OP_TOU_QI_SHOU) if retTou1 > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_TOU) end local retTou2 = bit32.band(mType,ZPDef.OpCode.OP_TOU_ZHUA) if retTou2 > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_TOU) end --判断是否有胡 local retHu = bit32.band(mType,ZPDef.OpCode.OP_HU) if retHu > 0 then table.insert(mResult,ZPDef.OpType.OP_TYPE_HU) end local retHu1 = bit32.band(mType,ZPDef.OpCode.OP_TIAN_HU) if retHu1 > 0 then --天胡没有过 table.insert(mResult,ZPDef.OpType.OP_TYPE_HU) isHaveGuo = false end --默认有过操作 if isHaveGuo then table.insert(mResult,ZPDef.OpType.OP_TYPE_CANCEL) end print("getchangpaiPaiOperationType : "..table.tostring(mResult)) return mResult end return doushisiFunctions