Skip to content

Commit

Permalink
Merge pull request #15 from bear-on-the-job/feature/merge-plenyx-v93
Browse files Browse the repository at this point in the history
Merge from Plenyx v93
  • Loading branch information
bear-on-the-job authored Jul 2, 2024
2 parents b46e11e + a3269ec commit f819bca
Show file tree
Hide file tree
Showing 14 changed files with 360 additions and 163 deletions.
2 changes: 1 addition & 1 deletion AppSettings/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace PlenBotLogUploader.AppSettings
internal sealed class ApplicationSettings
{
#region application version
internal static string Version => "89.Bear.7";
internal static string Version => "93.Bear.8";
#endregion

#region load & save functionality
Expand Down
2 changes: 1 addition & 1 deletion AppSettings/ApplicationSettingsArcUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal sealed class ApplicationSettingsArcUpdate
internal string ArcPathChainLoaded => ChainLoad switch
{
ApplicationSettingsArcUpdateChainLoad.AddonLoader => @"\addons\arcdps\gw2addon_arcdps.dll",
ApplicationSettingsArcUpdateChainLoad.Nexus => @"\d3d11_chainload.dll",
ApplicationSettingsArcUpdateChainLoad.Nexus => @"\addons\arcdps.dll",
_ => @"\d3d11.dll",
};

Expand Down
2 changes: 1 addition & 1 deletion AppSettings/ApplicationSettingsUpload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal sealed class ApplicationSettingsUpload
internal bool DetailedWvw { get; set; } = false;

[JsonProperty("dpsReportServer")]
internal DpsReportServer DpsReportServer { get; set; } = DpsReportServer.Main;
internal DpsReportServer DpsReportServer { get; set; } = DpsReportServer.B;

internal string DPSReportServerLink => DpsReportServer switch
{
Expand Down
3 changes: 3 additions & 0 deletions DpsReport/BossIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ internal enum BossIds
KanaxaiCM = 25577,
Dagda = 25705,
Cerus = 25989,
DemonBrothersDeimos = 26226,
Eparch = 26231,
DemonBrothersCerus = 26257,
TheDragonvoid = 43488,
ConjuredAmalgamate = 43974,
}
Expand Down
4 changes: 4 additions & 0 deletions Forms/FormArcPluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ internal FormArcPluginManager(FormMain mainLink)
{
this.mainLink = mainLink;
var installedComponents = ArcDpsComponent.DeserialiseAll(ApplicationSettings.LocalDir);
if (installedComponents is null)
{
installedComponents = new();
}
InitializeComponent();
Icon = Properties.Resources.AppIcon;
var availableComponents = ArcDpsComponentHelperClass.All;
Expand Down
14 changes: 11 additions & 3 deletions Forms/FormDiscordWebhooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ private void FormDiscordPings_FormClosing(object sender, FormClosingEventArgs e)
}

// Private method to create the Discord fields for each team (both friendly squad and enemies)
DiscordApiJsonContentEmbedField CreateTeamField<T>(DiscordWebhookData webhook, string name, IEnumerable<T> team)
DiscordApiJsonContentEmbedField CreateTeamField<T>(DiscordWebhookData webhook, string name, IEnumerable<T> team, IEnumerable<T> nonSquad = null)
{
var teamCount = team.Count();
var teamDamage = team switch
Expand Down Expand Up @@ -539,7 +539,15 @@ DiscordApiJsonContentEmbedField CreateTeamField<T>(DiscordWebhookData webhook, s
teamSummary.SetColumnWidthRange(1, 15, 15);

teamSummary.AddCell("Count:", tableCellLeftAlign);
teamSummary.AddCell($"{teamCount}", tableCellLeftAlign);

if (nonSquad?.Any() is true)
{
teamSummary.AddCell($"{teamCount} (+{nonSquad.Count()})", tableCellLeftAlign);
}
else
{
teamSummary.AddCell($"{teamCount}", tableCellLeftAlign);
}

teamSummary.AddCell("DMG:", tableCellLeftAlign);
teamSummary.AddCell($"{teamDamage.ParseAsK()}", tableCellLeftAlign);
Expand Down Expand Up @@ -710,7 +718,7 @@ private async Task ExecuteWebhookWvW(DiscordWebhookData webhook, DpsReportJson r

if (reportJSON.ExtraJson is not null)
{
var squadField = CreateTeamField(webhook, "Squad Summary", reportJSON.ExtraJson.Players.Where(x => !x.FriendlyNpc && !x.NotInSquad));
var squadField = CreateTeamField(webhook, "Squad Summary", reportJSON.ExtraJson.Players.Where(x => !x.FriendlyNpc && !x.NotInSquad), reportJSON.ExtraJson.Players.Where(x => !x.FriendlyNpc && x.NotInSquad));

// enemy summary field
var enemyFields = new List<DiscordApiJsonContentEmbedField>();
Expand Down
160 changes: 80 additions & 80 deletions Forms/FormEditGw2Api.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 61 additions & 1 deletion Forms/FormEditGw2Api.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,64 @@
<root>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
Expand Down
Loading

0 comments on commit f819bca

Please sign in to comment.