Skip to content

Commit

Permalink
Merge branch 'master' into sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel authored Jul 8, 2024
2 parents 73d38b4 + 044f567 commit d8ae7e8
Show file tree
Hide file tree
Showing 49 changed files with 973 additions and 715 deletions.
2 changes: 1 addition & 1 deletion ArcdpsLogManager/ArcdpsLogManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Each new log data update causes a revision increase.
See LogDataUpdater for the updates.
-->
<Version>1.11.1.5</Version>
<Version>1.11.1.7</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DebounceThrottle" Version="2.0.0" />
Expand Down
19 changes: 19 additions & 0 deletions ArcdpsLogManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,29 @@ This is the full changelog of the arcdps Log Manager.
- Organized Fractal encounters by scale in category filters (thanks, @Linkaaaaa!)

#### Fixes
- Fixed urls for some logs not being shown after uploading to dps.report (with error `File had invalid agents. Please update arcdps`).
- Fixed commander tag identification for fights where multiple overhead markers are used.
- Fixed upload button not being available for multiple selected logs if logs failed to be processed by dps.report
- Fixed crashes happening at weekly reset and on the midnight of the day for some timezones.
- Fixed Cardinal Sabir logs very rarely being identified as Cardinal Adina and vice versa.
- Fixed a Skorvald false failure triggered when the group dies after he reaches 1% (thanks, @Linkaaaaa!)
- Fixed encounter durations rounding to 1m60s (thanks, @Linkaaaaa!).

#### EVTC Inspector notes
- Added current open file name into the window title
- Processed agents attacker/defender hitbox is now a more general source/target checkbox, which also works for buff events and visual effect events.
- Added profession/elite specialization to AgentEnterCombatEvent (useful for mid-log specialization changes); requires arcdps 2024-06-12 or newer.
- Added SquadGroundMarkerPlace and SquadGroundMarkerRemove events; requires arcdps 2024-03-28 or newer.
- Added AgentGliderOpenEvent and AgentGliderClosedEvent; requires arcdps 2024-06-27 or newer.
- Exact arcdps build is now shown in the Statistics tabs; requires arcdps 2024-06-14 or newer.
- Added old weapon set to AgentWeaponSwapEvent; requires arcdps 2024-06-27 or newer.
- Added CrowdControlEvent (crowd control against non-defiant enemies); requires arcdps 2024-06-27 or newer.
- Added old team ids to TeamChangeEvent; requires arcdps 2024-06-12 or newer.
- Added RateHealthEvent (reports simulation tick rate drops when server cannot keep up/connection lags); requires arcdps 2022-05-20 or newer.
- Added AgentMarkerRemoveAllEvent; common with arcdps 2024-03-28 or newer.
- Events from arcdps extensions (addons, such as healing stats) are now categorized as UnknownExtensionEvents.
- Fixed missing buff column and duplicate buffdmg column in raw combatitem data

## Log Manager v1.11.1

#### New features
Expand Down
7 changes: 7 additions & 0 deletions ArcdpsLogManager/Controls/Filters/AdvancedFilterPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ private Control ConstructUploadStatus()
layout.Add(queuedCheckBox);
layout.Add(uploadFailedCheckBox);
layout.Add(processingFailedCheckBox);
// TODO: Overhaul filtering to account for this state:
layout.Add(new Label
{
Width = 400,
Text = "Note: Currently, some logs in the processing failed state may have URLs when dps.report reports an error, but also provides an URL to the uploaded report.",
Wrap = WrapMode.Word,
});
layout.Add(null);
}
layout.EndVertical();
Expand Down
2 changes: 1 addition & 1 deletion ArcdpsLogManager/Controls/LogDetailPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public LogDetailPanel(LogCache logCache, ApiData apiData, LogDataProcessor logPr

var dbusArgs = "--session --dest=org.freedesktop.FileManager1 " +
"--type=method_call /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems " +
$"array:string:\"{logData.FileName}\" string:\"\"";
$"array:string:\"file://{logData.FileName}\" string:\"\"";
var dbusProcessInfo = new ProcessStartInfo()
{
FileName = "dbus-send",
Expand Down
7 changes: 4 additions & 3 deletions ArcdpsLogManager/Controls/MultipleLogPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ private void UpdateDpsReportUploadStatus()

int finished = uploaded + uploadsFailed + processingFailed;
int totalRequested = queued + uploading + uploaded + uploadsFailed + processingFailed;
int missingUploads = notUploaded + uploadsFailed + processingFailed;
dpsReportUploadProgressBar.MaxValue = totalRequested > 0 ? totalRequested : 1;
dpsReportUploadProgressBar.Value = finished;
dpsReportUploadButton.Enabled = notUploaded + uploadsFailed > 0;
dpsReportUploadButton.Enabled = missingUploads > 0;
dpsReportCancelButton.Enabled = queued > 0;
dpsReportUploadButton.Text = $"Upload missing logs ({notUploaded + uploadsFailed})";
dpsReportUploadButton.Text = $"Upload missing logs ({missingUploads})";
dpsReportNotUploadedLabel.Text = notUploaded.ToString();
dpsReportUploadingLabel.Text = (uploading + queued).ToString();
dpsReportUploadedLabel.Text = uploaded.ToString();
Expand Down Expand Up @@ -154,7 +155,7 @@ public MultipleLogPanel(LogCache logCache, ApiData apiData, LogDataProcessor log
foreach (var log in logData)
{
var state = log.DpsReportEIUpload.UploadState;
if (state == UploadState.NotUploaded || state == UploadState.UploadError)
if (state is UploadState.NotUploaded or UploadState.UploadError or UploadState.ProcessingError)
{
uploadProcessor.ScheduleDpsReportEIUpload(log);
}
Expand Down
1 change: 1 addition & 0 deletions ArcdpsLogManager/Dialogs/ProcessingUpdateDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public ProcessingUpdateDialog(LogDataProcessor logProcessor, IReadOnlyList<LogUp
{
layout.AddRow(new Label
{
Width = 600,
Text = "This new version of the log manager brings improvements for processing some of the logs. " +
"They have to be processed again to correctly update the data. " +
"Affected logs are listed below. Do you wish to do so now?",
Expand Down
4 changes: 2 additions & 2 deletions ArcdpsLogManager/ImageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class ImageProvider
private Lazy<Image> DhuumIcon { get; } = new Lazy<Image>(Resources.GetDhuumIcon);

// WING 6
private Lazy<Image> ConjuredAmalgamatedIcon { get; } = new Lazy<Image>(Resources.GetConjuredAmalgamatedIcon);
private Lazy<Image> ConjuredAmalgamateIcon { get; } = new Lazy<Image>(Resources.GetConjuredAmalgamateIcon);
private Lazy<Image> TwinLargosIcon { get; } = new Lazy<Image>(Resources.GetTwinLargosIcon);
private Lazy<Image> QadimIcon { get; } = new Lazy<Image>(Resources.GetQadimIcon);

Expand Down Expand Up @@ -331,7 +331,7 @@ public Image GetTinyEncounterIcon(Encounter encounter)
Encounter.Eyes => EyesIcon.Value,
Encounter.Dhuum => DhuumIcon.Value,
// W6
Encounter.ConjuredAmalgamate => ConjuredAmalgamatedIcon.Value,
Encounter.ConjuredAmalgamate => ConjuredAmalgamateIcon.Value,
Encounter.TwinLargos => TwinLargosIcon.Value,
Encounter.Qadim => QadimIcon.Value,
// W7
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions ArcdpsLogManager/Logs/LogData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,13 @@ public void ProcessLog(LogAnalytics logAnalytics)
HealthPercentage = 0;
}

var tagEvents = log.Events.OfType<AgentTagEvent>().Where(x => x.Marker.Id != 0 && x.Agent is Player).ToList();
var tagEvents = log.Events.OfType<AgentMarkerEvent>().Where(x => x.Agent is Player).ToList();
Players = analyzer.GetPlayers().Where(x => x.Identified).Select(p =>
new LogPlayer(p.Name, p.AccountName, p.Subgroup, p.Profession, p.EliteSpecialization,
GetGuildGuid(p.GuildGuid)) { Tag = tagEvents.Any(e => e.Agent == p) ? PlayerTag.Commander : PlayerTag.None }
GetGuildGuid(p.GuildGuid))
{
Tag = tagEvents.Any(e => e.Agent == p && e.IsCommander.GetValueOrDefault(true)) ? PlayerTag.Commander : PlayerTag.None
}
).ToArray();

if (log.StartTime != null)
Expand Down
34 changes: 21 additions & 13 deletions ArcdpsLogManager/Logs/Updates/LogDataUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace GW2Scratch.ArcdpsLogManager.Logs.Updates
{
public class LogDataUpdater
{
public static readonly IReadOnlyList<LogUpdate> Updates = new List<LogUpdate>()
private static readonly IReadOnlyList<LogUpdate> Updates = new List<LogUpdate>()
{
new LogUpdate(log => log.ParsingVersion < new Version(0, 7, 1)
&& log.Encounter == Encounter.TwinLargos
Expand Down Expand Up @@ -190,24 +190,32 @@ x.Profession is Profession.Thief or Profession.Engineer or Profession.Ranger
"Fix success detection for Cosmic Observatory"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 0, 2)
&& log.Encounter == Encounter.TempleOfFebe,
"Add support for Temple of Febe Legendary CM"),
"Add support for Temple of Febe Legendary CM."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 0)
&& log.Encounter == Encounter.TempleOfFebe
&& log.GameBuild >= GameBuilds.TempleOfFebeHealthFix,
"Fixed NM detection for Temple of Febe"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 1)
&& log.Encounter == Encounter.Skorvald,
"Fix success detection for Skorvald when all players are dead while the boss is invulnerable at 1%"),
"Fix NM detection for Temple of Febe".),

Check failure on line 197 in ArcdpsLogManager/Logs/Updates/LogDataUpdater.cs

View workflow job for this annotation

GitHub Actions / build

Identifier expected

Check failure on line 197 in ArcdpsLogManager/Logs/Updates/LogDataUpdater.cs

View workflow job for this annotation

GitHub Actions / build

Identifier expected
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 3)
&& log.Encounter == Encounter.Skorvald,
"Fix success detection for Skorvald when all players are dead while the boss is invulnerable at 1%"),
&& log.Encounter == Encounter.Skorvald,
"Fix success detection for Skorvald when all players are dead while the boss is invulnerable at 1%."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 4)
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.LonelyTower,
"Added support for Eparch in the Lonely Tower fractal"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 5)
&& log.Encounter == Encounter.SoullessHorror,
"Fix detection for Soulless Horror in case the encounter resets before all players are dead.")
&& log.MapId == MapIds.LonelyTower,
"Add support for Eparch in the Lonely Tower fractal."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 7)
&& log.Encounter == Encounter.SoullessHorror,
"Fix detection for Soulless Horror in case the encounter resets before all players are dead."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 7)
&& log.Players.Count(x => x.Tag == PlayerTag.Commander) > 1,
"Fix commander tag detection."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 7)
&& log.EncounterResult == EncounterResult.Success
&& string.Compare(log.EvtcVersion, "EVTC20240612", StringComparison.OrdinalIgnoreCase) >= 0
&& log.Encounter is Encounter.XunlaiJadeJunkyard or Encounter.KainengOverlook,
"Fix success detection for Xunlai Jade Junkyard and Kaineng Overlook with recent arcdps versions."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 7)
&& log.Encounter is Encounter.Adina or Encounter.Sabir,
"Fix Adina and Sabir possibly being identified as the other one in rare scenarios."),
// When adding a new update, you need to increase the revision (last value) of the version in the .csproj file
// unless the version changes more significantly, in that case it can be reset to 0.
};
Expand Down
25 changes: 24 additions & 1 deletion ArcdpsLogManager/Logs/UploadState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@ namespace GW2Scratch.ArcdpsLogManager.Logs
{
public enum UploadState
{
NotUploaded, Queued, Uploading, Uploaded, UploadError, ProcessingError
/// <summary>
/// Not uploaded, not queued for one.
/// </summary>
NotUploaded,
/// <summary>
/// Currently queued for upload.
/// </summary>
Queued,
/// <summary>
/// Currently uploading.
/// </summary>
Uploading,
/// <summary>
/// Uploaded successfully.
/// </summary>
Uploaded,
/// <summary>
/// Upload failed (network issues or host was not reachable).
/// </summary>
UploadError,
/// <summary>
/// Processing of the file failed on the server after a successful upload.
/// </summary>
ProcessingError,
}
}
2 changes: 1 addition & 1 deletion ArcdpsLogManager/ManagerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public sealed class ManagerForm : Form
private LogFinder LogFinder { get; } = new LogFinder();

private LogAnalytics LogAnalytics { get; } = new LogAnalytics(
new EVTCParser() { SinglePassFilteringOptions = { PruneForEncounterData = true, ExtraRequiredEventTypes = new [] {typeof(AgentTagEvent) }} },
new EVTCParser() { SinglePassFilteringOptions = { PruneForEncounterData = true, ExtraRequiredEventTypes = new [] {typeof(AgentMarkerEvent) }} },
new LogProcessor(),
new FractalInstabilityDetector(),
log => new LogAnalyzer(log)
Expand Down
14 changes: 13 additions & 1 deletion ArcdpsLogManager/Processing/UploadProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public DpsReportUpload(LogData logData) : base(logData)
public override async Task Upload(UploadProcessor processor, CancellationToken cancellationToken)
{
LogData.DpsReportEIUpload.UploadState = UploadState.Uploading;
LogData.DpsReportEIUpload.Url = null;
LogData.DpsReportEIUpload.ProcessingError = null;
LogData.DpsReportEIUpload.UploadError = null;

try
{
Expand All @@ -53,8 +56,17 @@ public override async Task Upload(UploadProcessor processor, CancellationToken c
}
else
{
LogData.DpsReportEIUpload.UploadState = UploadState.ProcessingError;
LogData.DpsReportEIUpload.ProcessingError = response.Error;
if (response.Permalink != null)
{
// With some errors, the upload may still go through.
LogData.DpsReportEIUpload.Url = response.Permalink;
LogData.DpsReportEIUpload.UploadState = UploadState.Uploaded;
}
else
{
LogData.DpsReportEIUpload.UploadState = UploadState.ProcessingError;
}
}
}
catch (Exception e)
Expand Down
12 changes: 6 additions & 6 deletions ArcdpsLogManager/Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,25 @@ public static Image GetInstabilityImage(string iconName)
// WING 3
public static Image GetEscortIcon() => GetEncounterImage("Mini_McLeod_the_Silent");
public static Image GetKeepConstructIcon() => GetEncounterImage("Mini_Keep_Construct");
public static Image GetTwistedCastleIcon() => GetEncounterImage("Legendary_Insight");
public static Image GetTwistedCastleIcon() => GetEncounterImage("Twisted_Castle");
public static Image GetXeraIcon() => GetEncounterImage("Mini_Xera");

// WING 4
public static Image GetCairnIcon() => GetEncounterImage("Mini_Cairn_the_Indomitable");
public static Image GetMursaatOverseerIcon() => GetEncounterImage("Mini_Mursaat_Overseer");
public static Image GetSamarogIcon() => GetEncounterImage("Mini_Samarog");
public static Image GetDeimosIcon() => GetEncounterImage("Mini_Saul");
public static Image GetDeimosIcon() => GetEncounterImage("Deimos");

// WING 5
public static Image GetDesminaIcon() => GetEncounterImage("Mini_Desmina");
public static Image GetRiverOfSoulsIcon() => GetEncounterImage("Legendary_Divination");
public static Image GetRiverOfSoulsIcon() => GetEncounterImage("River_Of_Souls");
public static Image GetBrokenKingIcon() => GetEncounterImage("Mini_Broken_King");
public static Image GetEaterOfSoulsIcon() => GetEncounterImage("Legendary_Divination");
public static Image GetEyesIcon() => GetEncounterImage("Legendary_Divination");
public static Image GetEaterOfSoulsIcon() => GetEncounterImage("Eater_Of_Souls");
public static Image GetEyesIcon() => GetEncounterImage("Eyes_Of_Fate_And_Judgment");
public static Image GetDhuumIcon() => GetEncounterImage("Mini_Dhuum");

// WING 6
public static Image GetConjuredAmalgamatedIcon() => GetEncounterImage("Legendary_Divination");
public static Image GetConjuredAmalgamateIcon() => GetEncounterImage("Conjured_Amalgamate");
public static Image GetTwinLargosIcon() => GetEncounterImage("Mini_Nikare");
public static Image GetQadimIcon() => GetEncounterImage("Mini_Qadim");

Expand Down
1 change: 1 addition & 0 deletions ArcdpsLogManager/Sections/DebugData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public LogData LogData
layout.AddRow("dps.report upload state", logData.DpsReportEIUpload.UploadState.ToString());
layout.AddRow("dps.report upload time", logData.DpsReportEIUpload.UploadTime?.ToString(CultureInfo.InvariantCulture));
layout.AddRow("dps.report url", logData.DpsReportEIUpload.Url);
layout.AddRow("dps.report processing error", logData.DpsReportEIUpload.ProcessingError);
if (logData.ParsingStatus == ParsingStatus.Failed)
{
layout.EndVertical();
Expand Down
7 changes: 6 additions & 1 deletion ArcdpsLogManager/Sections/LogList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using GW2Scratch.ArcdpsLogManager.Logs;
using GW2Scratch.ArcdpsLogManager.Logs.Naming;
using GW2Scratch.ArcdpsLogManager.Processing;
using GW2Scratch.EVTCAnalytics.GameData.Encounters;
using GW2Scratch.EVTCAnalytics.Model;
using GW2Scratch.EVTCAnalytics.Processing.Encounters.Modes;
using GW2Scratch.EVTCAnalytics.Processing.Encounters.Results;
Expand Down Expand Up @@ -163,10 +164,14 @@ private GridView<LogData> ConstructLogGridView(LogDetailPanel detailPanel, Multi
{
args.Graphics.DrawImage(encounterIcon, rectangle);
}
if (wvwIcon != null)
else if (wvwIcon != null)
{
args.Graphics.DrawImage(wvwIcon, rectangle);
}
else if (log.Encounter == Encounter.Map)
{
args.Graphics.DrawImage(imageProvider.GetTinyInstanceIcon(), rectangle);
}
};

gridView.Columns.Add(new GridColumn()
Expand Down
5 changes: 4 additions & 1 deletion ArcdpsLogManager/Sections/WeeklyClears.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,14 @@ private void RecreateLayout()

public void UpdateDataFromLogs(IEnumerable<LogData> logs)
{
// We cache the logs to be able to select players from them later.
this.logs = logs.ToList();
// We need to store this specific list for the Task as a race condition could change this.logs before it is accessed.
var usedLogs = this.logs;
Task.Run(() =>
{
var logsByAccountNameWeek = new Dictionary<(string accountName, DateOnly resetDate), List<LogData>>();
foreach (var log in logs)
foreach (var log in usedLogs)
{
if (log.ParsingStatus != ParsingStatus.Parsed) continue;

Expand Down
Loading

0 comments on commit d8ae7e8

Please sign in to comment.