Exemplo n.º 1
0
        public string GetDataAsHtml(GameVersion version, ItemDat.ItemDat items, ShopData shops, Dictionary <uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<tr id=\"shop" + InGameID + "\">");
            sb.AppendLine("<td class=\"synopsistitle\" colspan=\"3\">");
            sb.AppendLine(inGameIdDict[StringDicID].StringJpnHtml(version));
            sb.AppendLine("</td>");
            sb.AppendLine("<td class=\"synopsistitle\" colspan=\"3\">");
            sb.AppendLine(inGameIdDict[StringDicID].StringEngHtml(version));
            sb.AppendLine("</td>");
            sb.AppendLine("</tr>");
            sb.AppendLine("<tr>");
            for (int i = 2; i < 9; ++i)
            {
                if (i == 4)
                {
                    continue;
                }
                sb.AppendLine("<td>");
                foreach (var item in ShopItems)
                {
                    if (items.itemIdDict[item.ItemID].Data[(int)ItemDat.ItemData.Category] == i)
                    {
                        sb.Append(item.GetDataAsHtml(version, items, inGameIdDict, phpLinks: phpLinks));
                        sb.Append("<br>");
                    }
                }
                sb.AppendLine("</td>");
            }
            sb.AppendLine("</tr>");
            if (OnTrigger > 0)
            {
                sb.Append("<tr>");
                sb.Append("<td class=\"strategychar\" colspan=\"6\">");
                sb.Append("Changes to <a href=\"#shop" + ChangeToShop + "\">");
                sb.Append(inGameIdDict[shops.ShopDictionary[ChangeToShop].StringDicID].StringEngOrJpnHtml(version));
                sb.Append("</a>");
                sb.Append("</td>");
                sb.Append("</tr>");
            }

            return(sb.ToString());
        }
Exemplo n.º 2
0
        public string GetDataAsHtml( GameVersion version, ItemDat.ItemDat items, ShopData shops, Dictionary<uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false )
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine( "<tr id=\"shop" + InGameID + "\">" );
            sb.AppendLine( "<td class=\"synopsistitle\" colspan=\"3\">" );
            sb.AppendLine( inGameIdDict[StringDicID].StringJpnHtml( version ) );
            sb.AppendLine( "</td>" );
            sb.AppendLine( "<td class=\"synopsistitle\" colspan=\"3\">" );
            sb.AppendLine( inGameIdDict[StringDicID].StringEngHtml( version ) );
            sb.AppendLine( "</td>" );
            sb.AppendLine( "</tr>" );
            sb.AppendLine( "<tr>" );
            for ( int i = 2; i < 9; ++i ) {
                if ( i == 4 ) { continue; }
                sb.AppendLine( "<td>" );
                foreach ( var item in ShopItems ) {
                    if ( items.itemIdDict[item.ItemID].Data[(int)ItemDat.ItemData.Category] == i ) {
                        sb.Append( item.GetDataAsHtml( version, items, inGameIdDict, phpLinks: phpLinks ) );
                        sb.Append( "<br>" );
                    }
                }
                sb.AppendLine( "</td>" );
            }
            sb.AppendLine( "</tr>" );
            if ( OnTrigger > 0 ) {
                sb.Append( "<tr>" );
                sb.Append( "<td class=\"strategychar\" colspan=\"6\">" );
                sb.Append( "Changes to <a href=\"#shop" + ChangeToShop + "\">" );
                sb.Append( inGameIdDict[shops.ShopDictionary[ChangeToShop].StringDicID].StringEngOrJpnHtml( version ) );
                sb.Append( "</a>" );
                sb.Append( "</td>" );
                sb.Append( "</tr>" );
            }

            return sb.ToString();
        }
Exemplo n.º 3
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, ItemDat.ItemDat items, ShopData shops, Dictionary <uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false)
        {
            StringBuilder sb = new StringBuilder();

            int colspan = websiteLanguage.WantsBoth() ? 3 : 6;

            sb.Append("<tr id=\"shop" + InGameID + "\">");
            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td class=\"synopsistitle\" colspan=\"" + colspan + "\">");
                sb.Append(inGameIdDict[StringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }
            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td class=\"synopsistitle\" colspan=\"" + colspan + "\">");
                sb.Append(inGameIdDict[StringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }
            sb.Append("</tr>");
            sb.Append("<tr>");
            for (int i = 2; i < 9; ++i)
            {
                if (i == 4)
                {
                    continue;
                }
                sb.Append("<td>");
                foreach (var item in ShopItems)
                {
                    if (items.itemIdDict[item.ItemID].Data[(int)ItemDat.ItemData.Category] == i)
                    {
                        sb.Append(item.GetDataAsHtml(version, versionPostfix, locale, websiteLanguage, items, inGameIdDict, phpLinks: phpLinks));
                        sb.Append("<br>");
                    }
                }
                sb.Append("</td>");
            }
            sb.Append("</tr>");
            if (OnTrigger > 0)
            {
                sb.Append("<tr>");
                sb.Append("<td class=\"strategychar\" colspan=\"6\">");
                sb.Append("Changes to <a href=\"" + Vesperia.Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Shop, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)ChangeToShop) + "\">");
                sb.Append(inGameIdDict[shops.ShopDictionary[ChangeToShop].StringDicID].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage));
                sb.Append("</a>");
                sb.Append("</td>");
                sb.Append("</tr>");
            }

            return(sb.ToString());
        }