public static OutPokerType checkOutPokerType(List <TLJCommon.PokerInfo> outPokerList, int mLevelPokerNum, int masterPokerType)
    {
        PlayRuleUtil.SetPokerWeight(outPokerList, mLevelPokerNum, (Consts.PokerType)masterPokerType);

        int count = outPokerList.Count;

        if (count == 0)
        {
            return(OutPokerType.OutPokerType_Error);
        }
        // 单牌
        else if (count == 1)
        {
            return(OutPokerType.OutPokerType_Single);
        }
        // 检查是否是对子
        else if (count == 2)
        {
            if ((outPokerList[0].m_pokerType == outPokerList[1].m_pokerType) && (outPokerList[0].m_num == outPokerList[1].m_num))
            {
                return(OutPokerType.OutPokerType_Double);
            }
        }
        else if (count % 2 == 0 && count >= 4)
        {
            if (PlayRuleUtil.IsTuolaji(outPokerList, mLevelPokerNum, masterPokerType))
            {
                return(OutPokerType.OutPokerType_TuoLaJi);
            }
        }
        return(OutPokerType.OutPokerType_ShuaiPai);
    }
Пример #2
0
    public static OutPokerType checkOutPokerType(List <TLJCommon.PokerInfo> outPokerList, int mLevelPokerNum, int masterPokerType)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("CheckOutPoker_hotfix", "checkOutPokerType"))
        {
            OutPokerType outPokerType = (OutPokerType)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.CheckOutPoker_hotfix", "checkOutPokerType", null, outPokerList, mLevelPokerNum, masterPokerType);
            return(outPokerType);
        }

        PlayRuleUtil.SetPokerWeight(outPokerList, mLevelPokerNum, (Consts.PokerType)masterPokerType);

        int count = outPokerList.Count;

        if (count == 0)
        {
            return(OutPokerType.OutPokerType_Error);
        }
        // 单牌
        else if (count == 1)
        {
            return(OutPokerType.OutPokerType_Single);
        }
        // 检查是否是对子
        else if (count == 2)
        {
            if ((outPokerList[0].m_pokerType == outPokerList[1].m_pokerType) && (outPokerList[0].m_num == outPokerList[1].m_num))
            {
                return(OutPokerType.OutPokerType_Double);
            }
        }
        else if (count % 2 == 0 && count >= 4)
        {
            if (PlayRuleUtil.IsTuolaji(outPokerList, mLevelPokerNum, masterPokerType))
            {
//                TLJ_PlayService.PlayService.log.Info("出的是拖拉机");
                return(OutPokerType.OutPokerType_TuoLaJi);
            }
        }
//        TLJ_PlayService.PlayService.log.Info("有人尝试甩牌");
        return(OutPokerType.OutPokerType_ShuaiPai);
    }