public static string MxDBuildSaveString(bool inncludeAltEnh, bool forumMode)
    {
        MidsCharacterFileFormat.CompressionData cData = default(MidsCharacterFileFormat.CompressionData);
        string str = MidsCharacterFileFormat.MxDBuildSaveStringShared(ref cData, inncludeAltEnh, true);
        string str2;

        if (string.IsNullOrEmpty(str))
        {
            str2 = string.Empty;
        }
        else
        {
            string str3 = "\n";
            string str4;
            if (forumMode)
            {
                bool flag  = MidsContext.Config.Export.FormatCode[MidsContext.Config.ExportTarget].Notes.IndexOf("HTML", StringComparison.Ordinal) > -1;
                bool flag2 = MidsContext.Config.Export.FormatCode[MidsContext.Config.ExportTarget].Notes.IndexOf("no <br /> tags", StringComparison.OrdinalIgnoreCase) > -1;
                if (flag && !flag2)
                {
                    str  = str.Replace("\n", "<br />");
                    str3 = "<br />";
                }
                str4 = "| Copy & Paste this data into Mids' Hero Designer to view the build |" + str3;
                if (flag)
                {
                    str4 = str4.Replace(" ", "&nbsp;");
                }
                str4 = str4 + "|-------------------------------------------------------------------|" + str3;
            }
            else
            {
                str4 = "|              Do not modify anything below this line!              |" + str3 + "|-------------------------------------------------------------------|" + str3;
            }
            string str5 = ";HEX";
            object obj  = str4;
            str4 = string.Concat(new object[]
            {
                obj,
                "|MxDz;",
                cData.SzUncompressed,
                ";",
                cData.SzCompressed,
                ";",
                cData.SzEncoded,
                str5,
                ";|",
                str3
            });
            str4 = str4 + str + str3;
            str2 = str4 + "|-------------------------------------------------------------------|";
        }
        return(str2);
    }
    public static string MxDBuildSaveHyperlink(bool useBbCode, bool justLink = false)
    {
        MidsCharacterFileFormat.CompressionData cData = default(MidsCharacterFileFormat.CompressionData);
        string str = MidsCharacterFileFormat.MxDBuildSaveStringShared(ref cData, false, false);
        string str2;

        if (string.IsNullOrEmpty(str))
        {
            str2 = string.Empty;
        }
        else
        {
            string str4 = string.Concat(new object[]
            {
                "?uc=",
                cData.SzUncompressed,
                "&c=",
                cData.SzCompressed,
                "&a=",
                cData.SzEncoded,
                "&f=HEX&dc="
            });
            string str3 = "http://www.cohplanner.com/mids/download.php" + str4 + str;
            if (str3.Length > 2048)
            {
                str2 = "";
            }
            else if (justLink)
            {
                str2 = str3;
            }
            else
            {
                if (useBbCode)
                {
                    str3 = "[url=" + str3 + "]Click this DataLink to open the build![/url]";
                }
                else
                {
                    str3 = "<a href=\"" + str3 + "\">Click this DataLink to open the build!</a>";
                }
                str2 = str3;
            }
        }
        return(str2);
    }