public static void WritePlayerTabBoonGraph(StreamWriter sw, BoonsGraphModel bgm, PhaseData phase) { long roundedEnd = phase.Start + 1000 * phase.GetDuration("s"); List <BoonsGraphModel.Segment> bChart = bgm.BoonChart.Where(x => x.End >= phase.Start && x.Start <= roundedEnd).ToList(); if (bChart.Count == 0 || (bChart.Count == 1 && bChart.First().Value == 0)) { return; } sw.Write("y: ["); { foreach (BoonsGraphModel.Segment seg in bChart) { sw.Write("'" + seg.Value + "',"); } sw.Write("'" + bChart.Last().Value + "'"); } sw.Write("],"); sw.Write("x: ["); { foreach (BoonsGraphModel.Segment seg in bChart) { double segStart = Math.Round(Math.Max(seg.Start - phase.Start, 0) / 1000.0, 3); sw.Write("'" + segStart + "',"); } sw.Write("'" + Math.Round(Math.Min(bChart.Last().End - phase.Start, roundedEnd - phase.Start) / 1000.0, 3) + "'"); } sw.Write("],"); sw.Write(" yaxis: 'y2'," + " type: 'scatter',"); // "legendgroup: '"+Boon.getEnum(bgm.getBoonName()).getPloltyGroup()+"',"; if (!(bgm.Boon.Name == "Might" || bgm.Boon.Name == "Quickness")) { sw.Write(" visible: 'legendonly',"); } sw.Write(" line: {color:'" + GeneralHelper.GetLink("Color-" + bgm.Boon.Name) + "', shape: 'hv'},"); sw.Write(" fill: 'tozeroy'," + " name: \"" + bgm.Boon.Name + "\""); }
public static void WriteDamageStatsTableHeader(StreamWriter sw) { sw.Write("<tr>"); { sw.Write("<th>Sub</th>"); sw.Write("<th></th>"); sw.Write("<th>Name</th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Crit") + "\" alt=\"Crits\" title=\"Percent time hits critical\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Scholar") + "\" alt=\"Scholar\" title=\"Percent time hits while above 90% health\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("SwS") + "\" alt=\"SwS\" title=\"Percent time hits while moving\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Flank") + "\" alt=\"Flank\" title=\"Percent time hits while flanking\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Glance") + "\" alt=\"Glance\" title=\"Percent time hits while glanceing\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Blinded") + "\" alt=\"Miss\" title=\"Number of hits while blinded\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Interupts") + "\" alt=\"Interupts\" title=\"Number of hits interupted?/hits used to interupt\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Invuln") + "\" alt=\"Ivuln\" title=\"times the enemy was invulnerable to attacks\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Wasted") + "\" alt=\"Wasted\" title=\"Time wasted(in seconds) interupting skill casts\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Saved") + "\" alt=\"Saved\" title=\"Time saved(in seconds) interupting skill casts\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Swap") + "\" alt=\"Swap\" title=\"Times weapon swapped\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Stack") + "\" alt=\"Stack\" title=\"Average Distance from center of group stack\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Downs") + "\" alt=\"Downs\" title=\"Times downed\" height=\"18\" width=\"18\"></th>"); sw.Write("<th><img src=\"" + GeneralHelper.GetLink("Dead") + "\" alt=\"Dead\" title=\"Time died\" height=\"18\" width=\"18\"></th>"); } sw.Write("</tr>"); }
public static void WritePlayerTabDPSGraph(StreamWriter sw, string name, List <Point> playerdpsgraphdata, AbstractPlayer p) { int ptdgCount = 0; bool total = name.Contains("Total"); bool cleave = name.Contains("Cleave"); bool s10 = name.Contains("10s"); bool s30 = name.Contains("30s"); sw.Write("y: ["); { foreach (Point dp in playerdpsgraphdata) { if (ptdgCount == playerdpsgraphdata.Count - 1) { sw.Write("'" + dp.Y + "'"); } else { sw.Write("'" + dp.Y + "',"); } ptdgCount++; } if (playerdpsgraphdata.Count == 0) { sw.Write("'0'"); } } sw.Write("],"); //add time axis sw.Write("x: ["); { ptdgCount = 0; foreach (Point dp in playerdpsgraphdata) { if (ptdgCount == playerdpsgraphdata.Count - 1) { sw.Write("'" + dp.X + "'"); } else { sw.Write("'" + dp.X + "',"); } ptdgCount++; } if (playerdpsgraphdata.Count == 0) { sw.Write("'0'"); } } sw.Write("],"); string color = GeneralHelper.GetLink("Color-" + p.Prof + (total? "-Total" : (cleave? "-NonBoss": ""))); sw.Write(" mode: 'lines'," + "line: {shape: 'spline',color:'" + color + "'}," + "yaxis: 'y3',"); if (s10 || s30) { sw.Write(" visible: 'legendonly',"); } // "legendgroup: 'Damage'," + sw.Write("name: '" + name + "'," + "legendgroup: '" + p.Character + (s10 ? "10s" : (s30 ? "30s" : "")) + "'"); }