Exemplo n.º 1
0
    public bool IsPlayableAt(int roomType, Channel.MODE channelMode)
    {
        if (roomType >= Room.modeSelector.Length)
        {
            return(false);
        }
        bool flag = (modeMask & GlobalVars.Instance.getBattleMode(roomType)) != 0;

        if (flag)
        {
            switch (channelMode)
            {
            case Channel.MODE.CLAN:
                flag = clanMatchable;
                break;

            case Channel.MODE.NEWBIE:
                flag = officialMap;
                break;

            case Channel.MODE.MAPEDIT:
                flag = false;
                break;
            }
        }
        return(flag);
    }
Exemplo n.º 2
0
    public RegMap[] ToArray(int roomType, Channel.MODE channelMode)
    {
        List <RegMap> list = new List <RegMap>();

        foreach (KeyValuePair <int, RegMap> item in dicDownloaded)
        {
            if (item.Value.IsPlayableAt(roomType, channelMode))
            {
                list.Add(item.Value);
            }
        }
        return(list.ToArray());
    }