コード例 #1
0
    bool checkMyFate(FateData faDa, MonsterTeamInfo mTeam, int capacity)
    {
        bool check = true;

        if (faDa != null && mTeam != null)
        {
            int count = faDa.CountOfCondition;
            for (int i = 0; i < count; ++i)
            {
                int[] condition = faDa.MyFate(i);
                if (condition != null)
                {
                    ConfigDataType conData = (ConfigDataType)condition[FateData.Type_Pos];
                    int            ID      = condition[FateData.Item_ID_Pos];
                    int            amount  = condition[FateData.Item_Count_Pos];

                    switch (conData)
                    {
                    case ConfigDataType.HugeBeast:
                        check = false;
                        break;

                    case ConfigDataType.Gender:
                        check = false;
                        break;

                    case ConfigDataType.Monster:
                        check = checkMonster(ID, amount, mTeam, capacity) && check;
                        break;

                    case ConfigDataType.Star:
                        check = false;
                        break;

                    case ConfigDataType.Equip:
                        check = checkEquip(ID, amount, capacity) && check;
                        break;
                    }
                }
            }
        }

        return(check);
    }
コード例 #2
0
    /// <summary>
    /// Checks my fate. 只有在队伍里面的才有缘分的价值,同时还有奥义数据
    /// </summary>
    /// <returns><c>true</c>, if my fate was checked, <c>false</c> otherwise.</returns>
    /// <param name="faDa">Fa da.</param>
    /// <param name="team">Team.</param>
    public bool checkMyFate(FateData faDa, MonsterTeam mTeam, List <AoYi> usedTeam)
    {
        bool check = true;

        if (faDa != null && mTeam != null && usedTeam != null)
        {
            int count = faDa.CountOfCondition;
            for (int i = 0; i < count; ++i)
            {
                int[] condition = faDa.MyFate(i);
                if (condition != null)
                {
                    ConfigDataType conData = (ConfigDataType)condition[FateData.Type_Pos];
                    int            ID      = condition[FateData.Item_ID_Pos];
                    int            amount  = condition[FateData.Item_Count_Pos];

                    switch (conData)
                    {
                    case ConfigDataType.HugeBeast:
                        check = checkAoYi(ID, amount, usedTeam) && check;
                        break;

                    case ConfigDataType.Gender:
                        check = checkGender((short)ID, amount, mTeam) && check;
                        break;

                    case ConfigDataType.Monster:
                        check = checkMonster(ID, amount, mTeam) && check;
                        break;

                    case ConfigDataType.Star:
                        check = checkStar(ID, amount, mTeam) && check;
                        break;

                    case ConfigDataType.Equip:
                        check = checkEquip(ID, amount, mTeam) && check;
                        break;
                    }
                }
            }
        }

        return(check);
    }