public string createHtmlOverview2(Player p_Player) { //Note Modify this when adding new units (13/15) string l_Overview = ""; string l_ActiveBuffs = ""; string l_God = ""; string l_TradeMode = ""; string l_Wood = ""; string l_Stone = ""; string l_Iron = ""; try { l_Overview = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">"; l_Overview += "<html>"; l_Overview += Environment.NewLine + "<head>"; l_Overview += Environment.NewLine + "<title>Grepolis Town Overview</title>"; //l_Overview += Environment.NewLine + "<link href=\"table.css\" rel=stylesheet type=\"text/css\">"; l_Overview += Environment.NewLine + "<link href=\"css/custom.css\" rel=stylesheet type=\"text/css\">"; l_Overview += Environment.NewLine + "<link href=\"css/theme.blue.css\" rel=stylesheet type=\"text/css\">"; l_Overview += Environment.NewLine + "<script type=\"text/javascript\" src=\"js/jquery-1.11.2.js\"></script>"; l_Overview += Environment.NewLine + "<script type=\"text/javascript\" src=\"js/jquery.tablesorter.js\"></script>"; l_Overview += Environment.NewLine + "<script type=\"text/javascript\" src=\"js/jquery.tablesorter.widgets.js\"></script>"; l_Overview += Environment.NewLine + "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">"; l_Overview += Environment.NewLine + "</head>"; // l_Overview += Environment.NewLine + "<script>"; l_Overview += Environment.NewLine + "$(document).ready(function() {"; //l_Overview += Environment.NewLine + "$('#table1').tablesorter({"; l_Overview += Environment.NewLine + "$('#grepolis').tablesorter({"; l_Overview += Environment.NewLine + "theme : 'blue',"; l_Overview += Environment.NewLine + "widthFixed : true,"; l_Overview += Environment.NewLine + "showProcessing: true,"; l_Overview += Environment.NewLine + "headerTemplate : '{content} {icon}', // Add icon for various themes"; l_Overview += Environment.NewLine + "widgets: [ 'zebra', 'stickyHeaders' , \"columns\"],"; l_Overview += Environment.NewLine + "widgetOptions: {"; l_Overview += Environment.NewLine + "// extra class name added to the sticky header row"; l_Overview += Environment.NewLine + "stickyHeaders : '',"; l_Overview += Environment.NewLine + "// number or jquery selector targeting the position:fixed element"; l_Overview += Environment.NewLine + "stickyHeaders_offset : 0,"; l_Overview += Environment.NewLine + "// added to table ID, if it exists"; l_Overview += Environment.NewLine + "stickyHeaders_cloneId : '-sticky',"; l_Overview += Environment.NewLine + "// trigger \"resize\" event on headers"; l_Overview += Environment.NewLine + "stickyHeaders_addResizeEvent : true,"; l_Overview += Environment.NewLine + "// if false and a caption exist, it won't be included in the sticky header"; l_Overview += Environment.NewLine + "stickyHeaders_includeCaption : true,"; l_Overview += Environment.NewLine + "// The zIndex of the stickyHeaders, allows the user to adjust this to their needs"; l_Overview += Environment.NewLine + "stickyHeaders_zIndex : 2,"; l_Overview += Environment.NewLine + "// jQuery selector or object to attach sticky header to"; l_Overview += Environment.NewLine + "stickyHeaders_attachTo : null,"; l_Overview += Environment.NewLine + "// jQuery selector or object to monitor horizontal scroll position (defaults: xScroll > attachTo > window)"; l_Overview += Environment.NewLine + "stickyHeaders_xScroll : null,"; l_Overview += Environment.NewLine + "// jQuery selector or object to monitor vertical scroll position (defaults: yScroll > attachTo > window)"; l_Overview += Environment.NewLine + "stickyHeaders_yScroll : null,"; l_Overview += Environment.NewLine + "// scroll table top into view after filtering"; l_Overview += Environment.NewLine + "stickyHeaders_filteredToTop: true}});});"; l_Overview += Environment.NewLine + "</script>"; // l_Overview += Environment.NewLine + "<body>"; //l_Overview += Environment.NewLine + "<table id=\"table1\" summary=\"Grepolis Town Overview\">"; l_Overview += Environment.NewLine + "<table id=\"grepolis\" class=\"tablesorter\" summary=\"Grepolis Town Overview\">"; l_Overview += Environment.NewLine + "<thead>"; l_Overview += Environment.NewLine + "<tr>"; l_Overview += Environment.NewLine + "<th scope=\"col\"></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"trademode_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"wood_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"stone_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"iron_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"free_pop_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"storage_25x25.png\" /></th>"; //l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"points_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"main_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"barracks_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"docks_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"farmer_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"quest_island_25x25.png\" /></th>"; //l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"free_trade_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"attack_in.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"favor_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"sword_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"slinger_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"archer_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"hoplite_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"rider_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"chariot_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"catapult_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"minotaur_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"manticore_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"centaur_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"pegasus_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"harpy_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"medusa_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"zyklop_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"cerberus_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"fury_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"griffin_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"calydonian_boar_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"godsent_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"big_transporter_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"bireme_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"attack_ship_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"demolition_ship_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"small_transporter_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"trireme_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"colonize_ship_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"sea_monster_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "</tr>"; l_Overview += Environment.NewLine + "</thead>"; l_Overview += Environment.NewLine + "<tfoot>"; l_Overview += Environment.NewLine + "<tr>"; l_Overview += Environment.NewLine + "<th scope=\"col\"></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"trademode_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"wood_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"stone_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"iron_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"free_pop_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"storage_25x25.png\" /></th>"; //l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"points_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"main_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"barracks_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"docks_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"farmer_20x20.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"quest_island_25x25.png\" /></th>"; //l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"free_trade_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"attack_in.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"favor_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"sword_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"slinger_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"archer_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"hoplite_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"rider_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"chariot_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"catapult_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"minotaur_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"manticore_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"centaur_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"pegasus_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"harpy_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"medusa_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"zyklop_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"cerberus_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"fury_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"griffin_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"calydonian_boar_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"godsent_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"big_transporter_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"bireme_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"attack_ship_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"demolition_ship_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"small_transporter_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"trireme_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"colonize_ship_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "<th scope=\"col\"><img src=\"sea_monster_25x25.png\" /></th>"; l_Overview += Environment.NewLine + "</tr>"; l_Overview += Environment.NewLine + "<tr><td colspan=\"100%\"><em>Grepolis Town Overview - " + DateTime.Now + "</em></td></tr>"; l_Overview += Environment.NewLine + "</tfoot>"; l_Overview += Environment.NewLine + "<tbody>"; for (int i = 0; i < p_Player.Towns.Count; i++) { l_Overview += Environment.NewLine + "<tr>"; l_Overview += Environment.NewLine + "<td nowrap scope=\"col\">" + p_Player.Towns[i].Name + "</td>"; l_God = ""; if (p_Player.Towns[i].God.Equals("zeus")) l_God = "<img title=\"" + p_Player.getFavorByTownIndex(i) + "\" src=\"zeus_mini.png\" />"; else if (p_Player.Towns[i].God.Equals("poseidon")) l_God = "<img title=\"" + p_Player.getFavorByTownIndex(i) + "\" src=\"poseidon_mini.png\" />"; else if (p_Player.Towns[i].God.Equals("hera")) l_God = "<img title=\"" + p_Player.getFavorByTownIndex(i) + "\" src=\"hera_mini.png\" />"; else if (p_Player.Towns[i].God.Equals("athena")) l_God = "<img title=\"" + p_Player.getFavorByTownIndex(i) + "\" src=\"athena_mini.png\" />"; else if (p_Player.Towns[i].God.Equals("hades")) l_God = "<img title=\"" + p_Player.getFavorByTownIndex(i) + "\" src=\"hades_mini.png\" />"; else if (p_Player.Towns[i].God.Equals("artemis")) l_God = "<img title=\"" + p_Player.getFavorByTownIndex(i) + "\" src=\"artemis_mini.png\" />"; else l_God = ""; if (p_Player.Towns[i].TradeEnabled) { if (p_Player.Towns[i].TradeMode.Equals("send")) l_TradeMode = "S"; else if (p_Player.Towns[i].TradeMode.Equals("receive")) l_TradeMode = "R"; else l_TradeMode = "Spy"; } else { l_TradeMode = "-"; } l_Overview += Environment.NewLine + "<td scope=\"col\">" + l_God + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + l_TradeMode + "</td>"; if (p_Player.Towns[i].Storage == p_Player.Towns[i].Wood) l_Wood = "<td style=\"color:red;\" scope=\"col\">" + p_Player.Towns[i].Wood + "</td>"; else l_Wood = "<td scope=\"col\">" + p_Player.Towns[i].Wood + "</td>"; l_Overview += Environment.NewLine + l_Wood; if (p_Player.Towns[i].Storage == p_Player.Towns[i].Stone) l_Stone = "<td style=\"color:red;\" scope=\"col\">" + p_Player.Towns[i].Stone + "</td>"; else l_Stone = "<td scope=\"col\">" + p_Player.Towns[i].Stone + "</td>"; l_Overview += Environment.NewLine + l_Stone; if (p_Player.Towns[i].Storage == p_Player.Towns[i].Iron) l_Iron = "<td style=\"color:red;\" scope=\"col\">" + p_Player.Towns[i].Iron + "</td>"; else l_Iron = "<td scope=\"col\">" + p_Player.Towns[i].Iron + "</td>"; l_Overview += Environment.NewLine + l_Iron; l_Overview += Environment.NewLine + "<td nowrap scope=\"col\">" + p_Player.Towns[i].PopulationAvailable + "(" + p_Player.Towns[i].Buildings[3].Level + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].Storage + "</td>"; //l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ResearchPoints + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].getIngameBuildingQueueSize() + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].SizeOfLandUnitQueue.ToString() + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].SizeOfNavyUnitQueue.ToString() + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].getNumberOfFriendlyFarmers().ToString() + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].AvailableQuests.ToString() + "</td>"; //l_Overview += Environment.NewLine + "<td scope=\"col\">" + "-" + "</td>";//Trade capacity l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].getNumberOfIncomingAttacks().ToString() + "</td>"; l_ActiveBuffs = ""; if (p_Player.Towns[i].isPowerActive("call_of_the_ocean")) l_ActiveBuffs += "<img src=\"power_call_of_the_ocean_16x16.png\" />"; if (p_Player.Towns[i].isPowerActive("fertility_improvement")) l_ActiveBuffs += "<img src=\"power_fertility_improvement_16x16.png\" />"; if (p_Player.Towns[i].isPowerActive("happiness")) l_ActiveBuffs += "<img src=\"power_happiness_16x16.png\" />"; if (p_Player.Towns[i].isPowerActive("pest")) l_ActiveBuffs += "<img src=\"power_pest_16x16.png\" />"; if (p_Player.Towns[i].isPowerActive("town_protection")) l_ActiveBuffs += "<img src=\"power_town_protection_16x16.png\" />"; l_Overview += Environment.NewLine + "<td nowrap scope=\"col\">" + l_ActiveBuffs + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("sword")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("sword")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("slinger")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("slinger")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("archer")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("archer")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("hoplite")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("hoplite")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("rider")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("rider")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("chariot")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("chariot")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("catapult")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("catapult")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("minotaur")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("minotaur")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("manticore")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("manticore")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("centaur")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("centaur")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("pegasus")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("pegasus")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("harpy")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("harpy")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("medusa")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("medusa")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("zyklop")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("zyklop")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("cerberus")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("cerberus")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("fury")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("fury")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("griffin")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("griffin")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("calydonian_boar")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("calydonian_boar")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("godsent")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("godsent")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("big_transporter")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("big_transporter")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("bireme")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("bireme")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("attack_ship")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("attack_ship")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("demolition_ship")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("demolition_ship")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("small_transporter")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("small_transporter")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("trireme")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("trireme")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("colonize_ship")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("colonize_ship")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("sea_monster")].CurrentAmount + " (" + p_Player.Towns[i].ArmyUnits[p_Player.Towns[i].getUnitIndex("sea_monster")].TotalAmount + ")" + "</td>"; l_Overview += Environment.NewLine + "</tr>"; } //Total l_Overview += Environment.NewLine + "<tr>"; l_Overview += Environment.NewLine + "<td nowrap scope=\"col\">" + "Total" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td nowrap scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; //l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; //l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td nowrap scope=\"col\">" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("sword") + " (" + p_Player.getTotalUnitsAll("sword") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("slinger") + " (" + p_Player.getTotalUnitsAll("slinger") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("archer") + " (" + p_Player.getTotalUnitsAll("archer") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("hoplite") + " (" + p_Player.getTotalUnitsAll("hoplite") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("rider") + " (" + p_Player.getTotalUnitsAll("rider") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("chariot") + " (" + p_Player.getTotalUnitsAll("chariot") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("catapult") + " (" + p_Player.getTotalUnitsAll("catapult") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("minotaur") + " (" + p_Player.getTotalUnitsAll("minotaur") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("manticore") + " (" + p_Player.getTotalUnitsAll("manticore") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("centaur") + " (" + p_Player.getTotalUnitsAll("centaur") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("pegasus") + " (" + p_Player.getTotalUnitsAll("pegasus") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("harpy") + " (" + p_Player.getTotalUnitsAll("harpy") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("medusa") + " (" + p_Player.getTotalUnitsAll("medusa") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("zyklop") + " (" + p_Player.getTotalUnitsAll("zyklop") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("cerberus") + " (" + p_Player.getTotalUnitsAll("cerberus") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("fury") + " (" + p_Player.getTotalUnitsAll("fury") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("griffin") + " (" + p_Player.getTotalUnitsAll("griffin") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("calydonian_boar") + " (" + p_Player.getTotalUnitsAll("calydonian_boar") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("godsent") + " (" + p_Player.getTotalUnitsAll("godsent") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("big_transporter") + " (" + p_Player.getTotalUnitsAll("big_transporter") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("bireme") + " (" + p_Player.getTotalUnitsAll("bireme") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("attack_ship") + " (" + p_Player.getTotalUnitsAll("attack_ship") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("demolition_ship") + " (" + p_Player.getTotalUnitsAll("demolition_ship") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("small_transporter") + " (" + p_Player.getTotalUnitsAll("small_transporter") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("trireme") + " (" + p_Player.getTotalUnitsAll("trireme") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("colonize_ship") + " (" + p_Player.getTotalUnitsAll("colonize_ship") + ")" + "</td>"; l_Overview += Environment.NewLine + "<td scope=\"col\">" + p_Player.getTotalUnits("sea_monster") + " (" + p_Player.getTotalUnitsAll("sea_monster") + ")" + "</td>"; l_Overview += Environment.NewLine + "</tr>"; l_Overview += Environment.NewLine + "</tbody>"; l_Overview += Environment.NewLine + "</table>"; l_Overview += Environment.NewLine + "</body>"; l_Overview += Environment.NewLine + "</html>"; } catch (Exception) { } return l_Overview; }
public void saveFarmersSettings(Player p_Player) { Settings l_Settings = Settings.Instance; try { XmlTextWriter l_Writer = new XmlTextWriter(l_Settings.AdvFarmersSettingsFile, Encoding.UTF8); l_Writer.Formatting = Formatting.Indented; l_Writer.WriteStartDocument(); l_Writer.WriteComment("Farmers settings."); l_Writer.WriteStartElement("Towns");//Start of Towns for (int i = 0; i < p_Player.Towns.Count; i++) { l_Writer.WriteStartElement("Town");//Start of Town l_Writer.WriteStartAttribute("TownID"); l_Writer.WriteString(p_Player.Towns[i].TownID); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("FarmersSelected"); l_Writer.WriteString(p_Player.Towns[i].getSelectedFarmers()); l_Writer.WriteEndAttribute(); l_Writer.WriteEndElement();//End of Town } l_Writer.WriteEndElement();//End of Towns l_Writer.WriteEndDocument(); l_Writer.Flush(); l_Writer.Close(); } catch (Exception e) { if (l_Settings.AdvDebugMode) debug("Exception in saveFarmersSettings(): " + e.Message); } }
public void saveTownsSettings(Player p_Player) { //Note Modify this when adding new town settings (1/2) Settings l_Settings = Settings.Instance; saveUnitQueueSettings(p_Player); try { XmlTextWriter l_Writer = new XmlTextWriter(l_Settings.AdvTownsSettingsFile, Encoding.UTF8); l_Writer.Formatting = Formatting.Indented; l_Writer.WriteStartDocument(); l_Writer.WriteComment("Towns settings."); l_Writer.WriteStartElement("Towns");//Start of Towns for (int i = 0; i < p_Player.Towns.Count; i++) { l_Writer.WriteStartElement("Town");//Start of Town l_Writer.WriteStartAttribute("TownID"); l_Writer.WriteString(p_Player.Towns[i].TownID); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("Name"); l_Writer.WriteString(p_Player.Towns[i].Name); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("BuildingQueueEnabled"); l_Writer.WriteString(p_Player.Towns[i].BuildingQueueEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("BuildingLevelsTargetEnabled"); l_Writer.WriteString(p_Player.Towns[i].BuildingLevelsTargetEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("BuildingDowngradeEnabled"); l_Writer.WriteString(p_Player.Towns[i].BuildingDowngradeEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("BuildingLevelsTarget"); l_Writer.WriteString(p_Player.Towns[i].getBuildingLevelsTarget()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("BuildingQueue"); l_Writer.WriteString(p_Player.Towns[i].getBuildingQueue()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("UnitQueueEnabled"); l_Writer.WriteString(p_Player.Towns[i].UnitQueueEnabled.ToString()); l_Writer.WriteEndAttribute(); //l_Writer.WriteStartAttribute("UnitQueue"); //l_Writer.WriteString(p_Player.Towns[i].getUnitQueue()); //l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("FarmersLootEnabled"); l_Writer.WriteString(p_Player.Towns[i].FarmersLootEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("FarmersFriendlyDemandsOnly"); l_Writer.WriteString(p_Player.Towns[i].FarmersFriendlyDemandsOnly.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("FarmersMinMood"); l_Writer.WriteString(p_Player.Towns[i].FarmersMinMood.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("FarmersLootInterval"); l_Writer.WriteString(p_Player.Towns[i].FarmersLootInterval); l_Writer.WriteEndAttribute(); //l_Writer.WriteStartAttribute("FarmersSelected"); //l_Writer.WriteString(p_Player.Towns[i].getSelectedFarmers()); //l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("CulturalFestivalsEnabled"); l_Writer.WriteString(p_Player.Towns[i].CulturalFestivalsEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("CulturalPartyEnabled"); l_Writer.WriteString(p_Player.Towns[i].CulturalPartyEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("CulturalGamesEnabled"); l_Writer.WriteString(p_Player.Towns[i].CulturalGamesEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("CulturalTriumphEnabled"); l_Writer.WriteString(p_Player.Towns[i].CulturalTriumphEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("CulturalTheaterEnabled"); l_Writer.WriteString(p_Player.Towns[i].CulturalTheaterEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("MilitiaTrigger"); l_Writer.WriteString(p_Player.Towns[i].MilitiaTrigger.ToString()); l_Writer.WriteEndAttribute(); //Trading l_Writer.WriteStartAttribute("TradeEnabled"); l_Writer.WriteString(p_Player.Towns[i].TradeEnabled.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("TradeMode"); l_Writer.WriteString(p_Player.Towns[i].TradeMode); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("TradeRemainingResources"); l_Writer.WriteString(p_Player.Towns[i].TradeRemainingResources.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("TradeMinSendAmount"); l_Writer.WriteString(p_Player.Towns[i].TradeMinSendAmount.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("TradePercentageWarehouse"); l_Writer.WriteString(p_Player.Towns[i].TradePercentageWarehouse.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("TradeMaxDistance"); l_Writer.WriteString(p_Player.Towns[i].TradeMaxDistance.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("TradeOmitFromChangeAll"); l_Writer.WriteString(p_Player.Towns[i].TradeOmitFromChangeAll.ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteEndElement();//End of Town } l_Writer.WriteEndElement();//End of Towns l_Writer.WriteEndDocument(); l_Writer.Flush(); l_Writer.Close(); } catch (Exception e) { if (l_Settings.AdvDebugMode) debug("Exception in saveTownsSettings(): " + e.Message); } }
public void saveUnitQueueSettings(Player p_Player) { //Note Modify this when adding new units (11/15) Settings l_Settings = Settings.Instance; try { XmlTextWriter l_Writer = new XmlTextWriter(l_Settings.AdvUnitQueueSettingsFile, Encoding.UTF8); l_Writer.Formatting = Formatting.Indented; l_Writer.WriteStartDocument(); l_Writer.WriteComment("Unit queue settings."); l_Writer.WriteStartElement("Towns");//Start of Towns for (int i = 0; i < p_Player.Towns.Count; i++) { l_Writer.WriteStartElement("Town");//Start of Town l_Writer.WriteStartAttribute("TownID"); l_Writer.WriteString(p_Player.Towns[i].TownID); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("sword"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("sword").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("slinger"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("slinger").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("archer"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("archer").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("hoplite"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("hoplite").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("rider"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("rider").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("chariot"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("chariot").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("catapult"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("catapult").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("minotaur"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("minotaur").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("manticore"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("manticore").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("centaur"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("centaur").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("pegasus"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("pegasus").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("harpy"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("harpy").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("medusa"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("medusa").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("zyklop"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("zyklop").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("cerberus"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("cerberus").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("fury"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("fury").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("griffin"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("griffin").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("calydonian_boar"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("calydonian_boar").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("godsent"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("godsent").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("big_transporter"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("big_transporter").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("bireme"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("bireme").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("attack_ship"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("attack_ship").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("demolition_ship"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("demolition_ship").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("small_transporter"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("small_transporter").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("trireme"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("trireme").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("colonize_ship"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("colonize_ship").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteStartAttribute("sea_monster"); l_Writer.WriteString(p_Player.Towns[i].getUnitTargetAmount("sea_monster").ToString()); l_Writer.WriteEndAttribute(); l_Writer.WriteEndElement();//End of Town } l_Writer.WriteEndElement();//End of Towns l_Writer.WriteEndDocument(); l_Writer.Flush(); l_Writer.Close(); } catch (Exception e) { if (l_Settings.AdvDebugMode) debug("Exception in saveUnitQueueSettings(): " + e.Message); } }
public void createHtmlOverview(Player p_Player) { Settings l_Settings = Settings.Instance; Parser l_Parser = Parser.Instance; //string l_Overview = l_Parser.createHtmlOverview(p_Player); string l_Overview = l_Parser.createHtmlOverview2(p_Player); try { TextWriter l_TwResponse = new StreamWriter(l_Settings.AdvOverviewFile, false); l_TwResponse.Write(l_Overview); l_TwResponse.Close(); } catch (Exception e) { if (l_Settings.AdvDebugMode) debug("Exception in createHtmlOverview(): " + e.Message); } }