string buildSetBonusListLong()

        {
            string str1 = formatColor(formatUnderline(formatBold("Set Bonuses:")), ExportConfig.Element.Heading) + LineBreak();

            int[] numArray = new int[DatabaseAPI.NidPowers("set_bonus", "").Length - 1 + 1];
            int   num1     = MidsContext.Character.CurrentBuild.SetBonus.Count - 1;

            for (int index1 = 0; index1 <= num1; ++index1)
            {
                int num2 = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo.Length - 1;
                for (int index2 = 0; index2 <= num2; ++index2)
                {
                    if (MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].Powers.Length <= 0)
                    {
                        continue;
                    }
                    I9SetData.sSetInfo[] setInfo = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo;
                    int    index3 = index2;
                    string str2   = str1 + formatColor(formatUnderline(formatBold(DatabaseAPI.Database.EnhancementSets[setInfo[index3].SetIDX].DisplayName)), ExportConfig.Element.IO);
                    if (MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index1].PowerIndex].NIDPowerset > -1)
                    {
                        str2 = str2 + LineBreak() + formatColor("(" + DatabaseAPI.Database.Powersets[MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index1].PowerIndex].NIDPowerset].Powers[MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index1].PowerIndex].IDXPower].DisplayName + ")", ExportConfig.Element.Power);
                    }
                    string iText = "";
                    int    num3  = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SlottedCount - 2;
                    for (int index4 = 0; index4 <= num3; ++index4)
                    {
                        string str3 = iText + ListItemOn();
                        bool   flag = false;
                        string str4 = "  " + DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX].GetEffectString(index4, false, true);
                        int    num4 = DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX].Bonus[index4].Index.Length - 1;
                        for (int index5 = 0; index5 <= num4; ++index5)
                        {
                            if (DatabaseAPI.Database
                                .EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX].Bonus[index4]
                                .Index[index5] <= -1)
                            {
                                continue;
                            }
                            ++numArray[DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX].Bonus[index4].Index[index5]];
                            if (numArray[DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX].Bonus[index4].Index[index5]] > 5)
                            {
                                flag = true;
                            }
                        }
                        if (flag)
                        {
                            str4 = formatItalic(formatColor(str4 + " (Exceeded 5 Bonus Cap)", ExportConfig.Element.Slots));
                        }
                        iText = str3 + str4 + ListItemOff();
                    }
                    int num5 = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].EnhIndexes.Length - 1;
                    for (int index4 = 0; index4 <= num5; ++index4)
                    {
                        int index5 = DatabaseAPI.IsSpecialEnh(MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].EnhIndexes[index4]);
                        if (index5 > -1)
                        {
                            iText = iText + ListItemOn() + formatColor("  " + DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX].GetEffectString(index5, true, true), ExportConfig.Element.Power) + ListItemOff();
                        }
                    }
                    str1 = str2 + List(iText);
                }
            }
            return(str1);
        }
        void FillEffectView()
        {
            string str1 = "";

            int[] numArray   = new int[DatabaseAPI.NidPowers("set_bonus").Length - 1 + 1];
            bool  hasOvercap = false;
            int   num1       = MidsContext.Character.CurrentBuild.SetBonus.Count - 1;

            for (int index1 = 0; index1 <= num1; ++index1)
            {
                int num2 = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo.Length - 1;
                for (int index2 = 0; index2 <= num2; ++index2)
                {
                    if (MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].Powers.Length <= 0)
                    {
                        continue;
                    }
                    I9SetData.sSetInfo[] setInfo  = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo;
                    int            index3         = index2;
                    EnhancementSet enhancementSet = DatabaseAPI.Database.EnhancementSets[setInfo[index3].SetIDX];
                    string         str2           = str1 + RTF.Color(RTF.ElementID.Invention) + RTF.Underline(RTF.Bold(enhancementSet.DisplayName));
                    if (MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index1].PowerIndex].NIDPowerset >
                        -1)
                    {
                        str2 = str2 + RTF.Crlf() + RTF.Color(RTF.ElementID.Faded) + "(" + DatabaseAPI.Database
                               .Powersets[
                            MidsContext.Character.CurrentBuild
                            .Powers[MidsContext.Character.CurrentBuild.SetBonus[index1].PowerIndex].NIDPowerset]
                               .Powers[
                            MidsContext.Character.CurrentBuild
                            .Powers[MidsContext.Character.CurrentBuild.SetBonus[index1].PowerIndex].IDXPower].DisplayName + ")";
                    }
                    string str3 = str2 + RTF.Crlf() + RTF.Color(RTF.ElementID.Text);
                    string str4 = "";
                    int    num3 = enhancementSet.Bonus.Length - 1;
                    for (int index4 = 0; index4 <= num3; ++index4)
                    {
                        if (!(setInfo[index3].SlottedCount >= enhancementSet.Bonus[index4].Slotted &
                              (enhancementSet.Bonus[index4].PvMode == Enums.ePvX.Any |
                               enhancementSet.Bonus[index4].PvMode == Enums.ePvX.PvE & !MidsContext.Config.Inc.DisablePvE |
                               enhancementSet.Bonus[index4].PvMode == Enums.ePvX.PvP & MidsContext.Config.Inc.DisablePvE)))
                        {
                            continue;
                        }
                        if (str4 != "")
                        {
                            str4 += RTF.Crlf();
                        }
                        bool   localOverCap = false;
                        string str5         = "  " + enhancementSet.GetEffectString(index4, false, true);
                        int    num4         = enhancementSet.Bonus[index4].Index.Length - 1;
                        for (int index5 = 0; index5 <= num4; ++index5)
                        {
                            if (enhancementSet.Bonus[index4].Index[index5] <= -1)
                            {
                                continue;
                            }
                            ++numArray[enhancementSet.Bonus[index4].Index[index5]];
                            if (numArray[enhancementSet.Bonus[index4].Index[index5]] > 5)
                            {
                                localOverCap = true;
                            }
                        }

                        if (localOverCap)
                        {
                            str5 = RTF.Italic(RTF.Color(RTF.ElementID.Warning) + str5 + " >Cap" + RTF.Color(RTF.ElementID.Text));
                        }
                        if (localOverCap)
                        {
                            hasOvercap = true;
                        }
                        str4 += str5;
                    }

                    int num5 = MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].EnhIndexes.Length - 1;
                    for (int index4 = 0; index4 <= num5; ++index4)
                    {
                        int index5 = DatabaseAPI.IsSpecialEnh(MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2]
                                                              .EnhIndexes[index4]);
                        if (index5 <= -1)
                        {
                            continue;
                        }
                        if (str4 != "")
                        {
                            str4 += RTF.Crlf();
                        }
                        string str5         = str4 + RTF.Color(RTF.ElementID.Enhancement);
                        bool   localOverCap = false;
                        string str6         = "  " + DatabaseAPI.Database
                                              .EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX]
                                              .GetEffectString(index5, true, true);
                        int num4 = DatabaseAPI.Database
                                   .EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX]
                                   .SpecialBonus[index5].Index.Length - 1;
                        for (int index6 = 0; index6 <= num4; ++index6)
                        {
                            if (DatabaseAPI.Database
                                .EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX]
                                .SpecialBonus[index5].Index[index6] <= -1)
                            {
                                continue;
                            }
                            ++numArray[
                                DatabaseAPI.Database
                                .EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX]
                                .SpecialBonus[index5].Index[index6]];
                            if (numArray[
                                    DatabaseAPI.Database
                                    .EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index1].SetInfo[index2].SetIDX]
                                    .SpecialBonus[index5].Index[index6]] > 5)
                            {
                                localOverCap = true;
                            }
                        }

                        if (localOverCap)
                        {
                            str6 = RTF.Italic(RTF.Color(RTF.ElementID.Warning) + str6 + " >Cap" + RTF.Color(RTF.ElementID.Text));
                        }
                        if (localOverCap)
                        {
                            hasOvercap = true;
                        }
                        str4 = str5 + str6;
                    }

                    str1 = str3 + str4 + RTF.Crlf() + RTF.Crlf();
                }
            }

            string str7;

            if (hasOvercap)
            {
                str7 = RTF.Color(RTF.ElementID.Invention) + RTF.Underline(RTF.Bold("Information:")) + RTF.Crlf() +
                       RTF.Color(RTF.ElementID.Text) +
                       "One or more set bonuses have exceeded the 5 bonus cap, and will not affect your stats. Scroll down this list to find bonuses marked as '" +
                       RTF.Italic(RTF.Color(RTF.ElementID.Warning) + ">Cap") + RTF.Color(RTF.ElementID.Text) + "'" + RTF.Crlf() + RTF.Crlf();
            }
            else
            {
                str7 = "";
            }
            string str8 = RTF.StartRTF() + str7 + str1 + RTF.EndRTF();

            if (rtxtFX.Rtf != str8)
            {
                rtxtFX.Rtf = str8;
            }
            IEffect[] cumulativeSetBonuses = MidsContext.Character.CurrentBuild.GetCumulativeSetBonuses();
            Array.Sort(cumulativeSetBonuses);
            string iStr = "";
            int    num6 = cumulativeSetBonuses.Length - 1;

            for (int index = 0; index <= num6; ++index)
            {
                if (iStr != "")
                {
                    iStr += RTF.Crlf();
                }
                string str2 = cumulativeSetBonuses[index].BuildEffectString(true);
                if (!str2.StartsWith("+"))
                {
                    str2 = "+" + str2;
                }
                if (str2.IndexOf("Endurance", StringComparison.Ordinal) > -1)
                {
                    str2 = str2.Replace("Endurance", "Max Endurance");
                }
                iStr += str2;
            }

            string str9 = RTF.StartRTF() + RTF.ToRTF(iStr) + RTF.EndRTF();

            if (rtApplied.Rtf == str9)
            {
                return;
            }
            rtApplied.Rtf = str9;
        }
Пример #3
0
        string buildSetBonusListLong()
        {
            string str = this.formatColor(this.formatUnderline(this.formatBold("Set Bonuses:")), ExportConfig.Element.Heading) + this.LineBreak();

            int[] numArray = new int[DatabaseAPI.NidPowers("set_bonus", "").Length - 1 + 1];
            int   num      = MidsContext.Character.CurrentBuild.SetBonus.Count - 1;

            for (int index = 0; index <= num; index++)
            {
                int num2 = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo.Length - 1;
                for (int index2 = 0; index2 <= num2; index2++)
                {
                    if (MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].Powers.Length > 0)
                    {
                        I9SetData.sSetInfo[] setInfo = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo;
                        int index3 = index2;
                        str += this.formatColor(this.formatUnderline(this.formatBold(DatabaseAPI.Database.EnhancementSets[setInfo[index3].SetIDX].DisplayName)), ExportConfig.Element.IO);
                        if (MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index].PowerIndex].NIDPowerset > -1)
                        {
                            str = str + this.LineBreak() + this.formatColor("(" + DatabaseAPI.Database.Powersets[MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index].PowerIndex].NIDPowerset].Powers[MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index].PowerIndex].IDXPower].DisplayName + ")", ExportConfig.Element.Power);
                        }
                        string iText = "";
                        int    num3  = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SlottedCount - 2;
                        for (int index4 = 0; index4 <= num3; index4++)
                        {
                            iText += this.ListItemOn();
                            bool   flag = false;
                            string str2 = "  " + DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].GetEffectString(index4, false, true);
                            int    num4 = DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].Bonus[index4].Index.Length - 1;
                            for (int index5 = 0; index5 <= num4; index5++)
                            {
                                if (DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].Bonus[index4].Index[index5] > -1)
                                {
                                    int[] array  = numArray;
                                    int[] index7 = DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].Bonus[index4].Index;
                                    int   num6   = index5;
                                    array[index7[num6]]++;
                                    if (numArray[DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].Bonus[index4].Index[index5]] > 5)
                                    {
                                        flag = true;
                                    }
                                }
                            }
                            if (flag)
                            {
                                str2 = this.formatItalic(this.formatColor(str2 + " (Exceeded 5 Bonus Cap)", ExportConfig.Element.Slots));
                            }
                            iText = iText + str2 + this.ListItemOff();
                        }
                        int num5 = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].EnhIndexes.Length - 1;
                        for (int index4 = 0; index4 <= num5; index4++)
                        {
                            int index6 = DatabaseAPI.IsSpecialEnh(MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].EnhIndexes[index4]);
                            if (index6 > -1)
                            {
                                iText += this.ListItemOn();
                                string str3 = this.formatColor("  " + DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].GetEffectString(index6, true, true), ExportConfig.Element.Power);
                                iText = iText + str3 + this.ListItemOff();
                            }
                        }
                        str += this.List(iText);
                    }
                }
            }
            return(str);
        }
Пример #4
0
        void FillEffectView()
        {
            string str9 = "";

            int[]  numArray = new int[DatabaseAPI.NidPowers("set_bonus", "").Length - 1 + 1];
            bool   flag     = false;
            int    num      = MidsContext.Character.CurrentBuild.SetBonus.Count - 1;
            string str10;

            for (int index = 0; index <= num; index++)
            {
                int num2 = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo.Length - 1;
                for (int index2 = 0; index2 <= num2; index2++)
                {
                    if (MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].Powers.Length > 0)
                    {
                        I9SetData.sSetInfo[] setInfo  = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo;
                        int            index3         = index2;
                        EnhancementSet enhancementSet = DatabaseAPI.Database.EnhancementSets[setInfo[index3].SetIDX];
                        str9 = str9 + RTF.Color(RTF.ElementID.Invention) + RTF.Underline(RTF.Bold(enhancementSet.DisplayName));
                        if (MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index].PowerIndex].NIDPowerset > -1)
                        {
                            str9 = string.Concat(new string[]
                            {
                                str9,
                                RTF.Crlf(),
                                RTF.Color(RTF.ElementID.Faded),
                                "(",
                                DatabaseAPI.Database.Powersets[MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index].PowerIndex].NIDPowerset].Powers[MidsContext.Character.CurrentBuild.Powers[MidsContext.Character.CurrentBuild.SetBonus[index].PowerIndex].IDXPower].DisplayName,
                                ")"
                            });
                        }
                        str9  = str9 + RTF.Crlf() + RTF.Color(RTF.ElementID.Text);
                        str10 = "";
                        int num3 = enhancementSet.Bonus.Length - 1;
                        for (int index4 = 0; index4 <= num3; index4++)
                        {
                            if (setInfo[index3].SlottedCount >= enhancementSet.Bonus[index4].Slotted & (enhancementSet.Bonus[index4].PvMode == Enums.ePvX.Any | (enhancementSet.Bonus[index4].PvMode == Enums.ePvX.PvE & MidsContext.Config.Inc.PvE) | (enhancementSet.Bonus[index4].PvMode == Enums.ePvX.PvP & !MidsContext.Config.Inc.PvE)))
                            {
                                if (str10 != "")
                                {
                                    str10 += RTF.Crlf();
                                }
                                bool   flag2 = false;
                                string str11 = "  " + enhancementSet.GetEffectString(index4, false, true);
                                int    num4  = enhancementSet.Bonus[index4].Index.Length - 1;
                                for (int index5 = 0; index5 <= num4; index5++)
                                {
                                    if (enhancementSet.Bonus[index4].Index[index5] > -1)
                                    {
                                        int[] array  = numArray;
                                        int[] array2 = enhancementSet.Bonus[index4].Index;
                                        int   num8   = index5;
                                        array[array2[num8]]++;
                                        if (numArray[enhancementSet.Bonus[index4].Index[index5]] > 5)
                                        {
                                            flag2 = true;
                                        }
                                    }
                                }
                                if (flag2)
                                {
                                    str11 = RTF.Italic(RTF.Color(RTF.ElementID.Warning) + str11 + " >Cap" + RTF.Color(RTF.ElementID.Text));
                                }
                                if (flag2)
                                {
                                    flag = true;
                                }
                                str10 += str11;
                            }
                        }
                        int num5 = MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].EnhIndexes.Length - 1;
                        for (int index4 = 0; index4 <= num5; index4++)
                        {
                            int index6 = DatabaseAPI.IsSpecialEnh(MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].EnhIndexes[index4]);
                            if (index6 > -1)
                            {
                                if (str10 != "")
                                {
                                    str10 += RTF.Crlf();
                                }
                                str10 += RTF.Color(RTF.ElementID.Enhancement);
                                bool   flag2 = false;
                                string str12 = "  " + DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].GetEffectString(index6, true, true);
                                int    num6  = DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].SpecialBonus[index6].Index.Length - 1;
                                for (int index5 = 0; index5 <= num6; index5++)
                                {
                                    if (DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].SpecialBonus[index6].Index[index5] > -1)
                                    {
                                        int[] array2 = numArray;
                                        int[] array  = DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].SpecialBonus[index6].Index;
                                        int   num8   = index5;
                                        array2[array[num8]]++;
                                        if (numArray[DatabaseAPI.Database.EnhancementSets[MidsContext.Character.CurrentBuild.SetBonus[index].SetInfo[index2].SetIDX].SpecialBonus[index6].Index[index5]] > 5)
                                        {
                                            flag2 = true;
                                        }
                                    }
                                }
                                if (flag2)
                                {
                                    str12 = RTF.Italic(RTF.Color(RTF.ElementID.Warning) + str12 + " >Cap" + RTF.Color(RTF.ElementID.Text));
                                }
                                if (flag2)
                                {
                                    flag = true;
                                }
                                str10 += str12;
                            }
                        }
                        str9 = str9 + str10 + RTF.Crlf() + RTF.Crlf();
                    }
                }
            }
            if (flag)
            {
                str10 = RTF.Color(RTF.ElementID.Invention) + RTF.Underline(RTF.Bold("Information:")) + RTF.Crlf() + RTF.Color(RTF.ElementID.Text);
                str10 = string.Concat(new string[]
                {
                    str10,
                    "One or more set bonuses have exceeded the 5 bonus cap, and will not affect your stats. Scroll down this list to find bonuses marked as '",
                    RTF.Italic(RTF.Color(RTF.ElementID.Warning) + ">Cap"),
                    RTF.Color(RTF.ElementID.Text),
                    "'",
                    RTF.Crlf(),
                    RTF.Crlf()
                });
            }
            else
            {
                str10 = "";
            }
            str9 = RTF.StartRTF() + str10 + str9 + RTF.EndRTF();
            if (this.rtxtFX.Rtf != str9)
            {
                this.rtxtFX.Rtf = str9;
            }
            IEffect[] cumulativeSetBonuses = MidsContext.Character.CurrentBuild.GetCumulativeSetBonuses();
            Array.Sort <IEffect>(cumulativeSetBonuses);
            str9 = "";
            int num7 = cumulativeSetBonuses.Length - 1;

            for (int index = 0; index <= num7; index++)
            {
                if (str9 != "")
                {
                    str9 += RTF.Crlf();
                }
                string str13 = cumulativeSetBonuses[index].BuildEffectString(true, "", false, false, false);
                if (!str13.StartsWith("+"))
                {
                    str13 = "+" + str13;
                }
                if (str13.IndexOf("Endurance") > -1)
                {
                    str13 = str13.Replace("Endurance", "Max Endurance");
                }
                str9 += str13;
            }
            str9 = RTF.StartRTF() + RTF.ToRTF(str9) + RTF.EndRTF();
            if (this.rtApplied.Rtf != str9)
            {
                this.rtApplied.Rtf = str9;
            }
        }