Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/nuget/EVTCInspector/Newtonsoft.…
Browse files Browse the repository at this point in the history
…Json-13.0.2
  • Loading branch information
Sejsel authored Jul 25, 2023
2 parents 8974b67 + a207cc9 commit 1f58079
Show file tree
Hide file tree
Showing 39 changed files with 545 additions and 236 deletions.
4 changes: 2 additions & 2 deletions ArcdpsLogManager/ArcdpsLogManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
Each new log data update causes a revision increase.
See LogDataUpdater for the updates.
-->
<Version>1.7.1.2</Version>
<Version>1.9.0.1</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Eto.Forms" Version="2.6.1" />
<PackageReference Include="Gw2Sharp" Version="0.6.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="RestSharp" Version="106.12.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
Expand Down
15 changes: 14 additions & 1 deletion ArcdpsLogManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@

This is the full changelog of the arcdps Log Manager.

## Log Manager v1.7.1
## Log Manager v1.9 (unreleased)
#### New features
s Added support for Silent Surf CM
- Added fractal scale as a column to the log list; right-click to hide/show (in logs since 2023-07-16)
- Added fractal scale to the log detail panel (in logs since 2023-07-16)
- *EVTC Inspector*: Added rudimentary support for the reworked effect events (since 2023-07-16).
#### Changes
- The game data collecting tab (requires Show -> Debug data to be enabled) now scans multiple files at once. This
provides a nice performance benefit on SSDs, but may result in slowdowns with HDDs (not tested on a HDD).
#### Fixes
- Fixed API error caused by adding a workaround for a GW2 API internal error when searching for unknown guilds.

## Log Manager v1.8
#### New features
- Added support for Old Lion's Court CM
- Added rudimentary support for map (full instance) logs – they are correctly identified, have proper map names, and a filtering category.
- *EVTC Inspector*: Added skill and buff info from logs to Processed skills tab (no skill timings and buff formulas yet)

## Log Manager v1.7

Expand Down
2 changes: 1 addition & 1 deletion ArcdpsLogManager/Configuration/StoredSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public class StoredSettings
public string DpsReportDomain { get; set; } = DpsReportUploader.DefaultDomain.Domain;
public bool DpsReportUploadDetailedWvw { get; set; } = false;
public int? MinimumLogDurationSeconds { get; set; } = null;
public List<string> HiddenLogListColumns { get; set; } = new List<string>() {"Character", "Map ID", "Game Version", "arcdps Version", "Instabilities"};
public List<string> HiddenLogListColumns { get; set; } = new List<string>() {"Character", "Map ID", "Game Version", "arcdps Version", "Instabilities", "Scale"};
public List<string> IgnoredUpdateVersions { get; set; } = new List<string>();
}
10 changes: 10 additions & 0 deletions ArcdpsLogManager/Controls/LogDetailPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ public LogData LogData
EncounterMode.Emboldened5 => "Emboldened 5",
_ => throw new ArgumentOutOfRangeException()
};

if (logData.LogExtras.FractalExtras?.FractalScale != null)
{
if (modeLabel.Text != "")
{
modeLabel.Text += ", ";
}
modeLabel.Text += $"Scale {logData.LogExtras.FractalExtras.FractalScale}";
}

modeLabel.Visible = !String.IsNullOrWhiteSpace(modeLabel.Text);

string result;
Expand Down
1 change: 1 addition & 0 deletions ArcdpsLogManager/Controls/LogEncounterFilterTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ private Image GetCategoryIcon(EncounterCategory category)
EncounterCategory.RaidWing5 => imageProvider.GetRaidWingIcon(),
EncounterCategory.RaidWing6 => imageProvider.GetRaidWingIcon(),
EncounterCategory.RaidWing7 => imageProvider.GetRaidWingIcon(),
EncounterCategory.Map => imageProvider.GetTinyInstanceIcon(),
_ => null
};
}
Expand Down
2 changes: 2 additions & 0 deletions ArcdpsLogManager/ImageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class ImageProvider
private Lazy<Image> TinyIconFestival { get; } = new Lazy<Image>(Resources.GetTinyIconFestival);
private Lazy<Image> TinyIconIcebroodSaga { get; } = new Lazy<Image>(Resources.GetTinyIconIcebroodSaga);
private Lazy<Image> TinyIconEndOfDragons { get; } = new Lazy<Image>(Resources.GetTinyIconEndOfDragons);
private Lazy<Image> TinyIconInstance { get; } = new Lazy<Image>(Resources.GetTinyIconInstance);

// RAIDS
private Lazy<Image> GenericRaidWing { get; } = new Lazy<Image>(Resources.GetGenericRaidWingIcon);
Expand Down Expand Up @@ -188,6 +189,7 @@ public class ImageProvider
public Image GetTinyFestivalIcon() => TinyIconFestival.Value;
public Image GetTinyIcebroodSagaIcon() => TinyIconIcebroodSaga.Value;
public Image GetTinyEndOfDragonsIcon() => TinyIconEndOfDragons.Value;
public Image GetTinyInstanceIcon() => TinyIconInstance.Value;

public Image GetTinyProfessionIcon(Profession profession)
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions ArcdpsLogManager/Logs/Extras/FractalExtras.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ public class FractalExtras
{
[JsonProperty]
public List<MistlockInstability> MistlockInstabilities { get; set; } = new List<MistlockInstability>();

[JsonProperty]
public int? FractalScale { get; set; } = null;
}
1 change: 1 addition & 0 deletions ArcdpsLogManager/Logs/Filters/Groups/CategoryLogGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class CategoryLogGroup : LogGroup
{EncounterCategory.SpecialForcesTrainingArea, "Special Forces Training Area"},
{EncounterCategory.Other, "Uncategorized (PvE)"},
{EncounterCategory.Festival, "Festivals"},
{EncounterCategory.Map, "Instance logs"},
// All World vs. World names are defined within the WorldVersusWorldLogGroup.
};

Expand Down
7 changes: 5 additions & 2 deletions ArcdpsLogManager/Logs/LogData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,14 @@ public void ProcessLog(LogAnalytics logAnalytics)
}

LogExtras = new LogExtras();
if (Encounter.GetEncounterCategory() == EncounterCategory.Fractal)

var mistlockInstabilities = logAnalytics.FractalInstabilityDetector.GetInstabilities(log).ToList();
if (Encounter.GetEncounterCategory() == EncounterCategory.Fractal || mistlockInstabilities.Count > 0 || log.FractalScale != null)
{
LogExtras.FractalExtras = new FractalExtras
{
MistlockInstabilities = logAnalytics.FractalInstabilityDetector.GetInstabilities(log).ToList()
MistlockInstabilities = mistlockInstabilities,
FractalScale = log.FractalScale,
};
}

Expand Down
77 changes: 45 additions & 32 deletions ArcdpsLogManager/Logs/Updates/LogDataUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ public class LogDataUpdater
&& string.Compare(log.EvtcVersion, "EVTC20200609", StringComparison.OrdinalIgnoreCase) >= 0,
"Commander tag identification is now available."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 0, 0)
&& log.EncounterResult == EncounterResult.Failure,
&& log.EncounterResult == EncounterResult.Failure,
"Add health percentage for failed logs"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 0, 0)
&& log.Encounter == Encounter.TwinLargos
&& log.EncounterResult == EncounterResult.Unknown,
&& log.Encounter == Encounter.TwinLargos
&& log.EncounterResult == EncounterResult.Unknown,
"Twin Largos logs had Unknown results if Kenut did not appear in the log."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 0, 0),
"Durations are significantly more accurate."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 0, 1)
&& log.Encounter == Encounter.Other,
&& log.Encounter == Encounter.Other,
"Support for Ai, Keeper of the Peak"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 3, 1)
&& log.Encounter == Encounter.KeepConstruct,
&& log.Encounter == Encounter.KeepConstruct,
"Adds Keep Construct CM detection."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 3, 2)
&& log.Encounter == Encounter.Xera
&& log.EncounterResult == EncounterResult.Failure
&& log.HealthPercentage > 0.998,
&& log.Encounter == Encounter.Xera
&& log.EncounterResult == EncounterResult.Failure
&& log.HealthPercentage > 0.998,
"Twisted Castle logs may have been incorrectly identified as Xera."),
#pragma warning disable 618
new LogUpdate(log => log.ParsingVersion < new Version(1, 0, 3, 3)
Expand Down Expand Up @@ -83,53 +83,66 @@ x.Profession is Profession.Thief or Profession.Engineer or Profession.Ranger
&& log.Encounter.GetEncounterCategory() == EncounterCategory.Fractal,
"Adds Mistlock Instabilities for fractal log details, filters, and log list column."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 4, 0, 1)
&& log.Encounter == Encounter.Other,
&& log.Encounter == Encounter.Other,
"Add support for End of Dragons strike missions."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 5, 0, 0)
&& log.Encounter == Encounter.AetherbladeHideout
&& log.GameBuild >= 127931,
&& log.Encounter == Encounter.AetherbladeHideout
&& log.GameBuild >= 127931,
"Add CM detection for Aetherblade Hideout."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 5, 0, 1)
&& log.Encounter == Encounter.XunlaiJadeJunkyard
&& log.GameBuild >= 128773,
&& log.Encounter == Encounter.XunlaiJadeJunkyard
&& log.GameBuild >= 128773,
"Add CM detection for Xunlai Jade Junkyard."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 5, 1, 1)
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.XunlaiJadeJunkyard
&& log.GameBuild >= 129355,
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.XunlaiJadeJunkyard
&& log.GameBuild >= 129355,
"Add CM detection for Kaineng Overlook."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 6, 0, 0)
// Some raid enemies can be manually added and they would be categorized as Other.
&& (log.Encounter.IsRaid() || (log.MapId != null && MapIds.IsRaidMap(log.MapId.Value)))
&& log.GameBuild >= 130910,
// Some raid enemies can be manually added and they would be categorized as Other.
&& (log.Encounter.IsRaid() || (log.MapId != null && MapIds.IsRaidMap(log.MapId.Value)))
&& log.GameBuild >= 130910,
"Add Emboldened (easy) mode detection for raids."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 6, 0, 1)
// Some raid enemies can be manually added and they would be categorized as Other.
&& log.Encounter == Encounter.HarvestTemple
&& log.GameBuild >= 130910,
// Some raid enemies can be manually added and they would be categorized as Other.
&& log.Encounter == Encounter.HarvestTemple
&& log.GameBuild >= 130910,
"Add CM detection for Harvest Temple."),
new LogUpdate(log => log.ParsingVersion < new Version(1, 6, 0, 2)
&& log.Encounter == Encounter.AiKeeperOfThePeakDayAndNight
&& log.ParsingVersion >= new Version(1, 6, 0, 0),
&& log.Encounter == Encounter.AiKeeperOfThePeakDayAndNight
&& log.ParsingVersion >= new Version(1, 6, 0, 0),
"Fixes Ai logs always being categorized as both phases"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 6, 0, 3)
&& log.Encounter == Encounter.HarvestTemple,
&& log.Encounter == Encounter.HarvestTemple,
"Slightly improved health percentage display for Harvest Temple (16.66% per phase)"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 7, 0, 0)
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.OldLionsCourt,
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.OldLionsCourt,
"Add support for Old Lion's Court"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 7, 1, 0)
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.OldLionsCourt,
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.OldLionsCourt,
"Add support for Old Lion's Court CM"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 7, 1, 1)
&& log.Encounter == Encounter.Other,
&& log.Encounter == Encounter.Other,
"Add basic support for map logs"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 7, 1, 2)
&& log.ParsingVersion >= new Version(1, 7, 1, 0)
&& log.Encounter == Encounter.OldLionsCourt,
&& log.ParsingVersion >= new Version(1, 7, 1, 0)
&& log.Encounter == Encounter.OldLionsCourt,
"Fix CM detection for Old Lion's Court"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 8, 1, 0)
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.HarvestTemple,
"Add support for Harvest Temple logs triggered by Void Melters"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 9, 0, 0)
&& log.Encounter == Encounter.Other
&& log.MapId == MapIds.SilentSurf,
"Add support for Silent Surf CM"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 9, 0, 1)
// There may be fractal encounters that are added manually and are not supported, so we also go through other logs.
&& (log.Encounter == Encounter.Other || log.Encounter.GetEncounterCategory() == EncounterCategory.Fractal)
&& string.Compare(log.EvtcVersion, "EVTC20230716", StringComparison.OrdinalIgnoreCase) >= 0,
"Add support for fractal scale."),
// 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
1 change: 1 addition & 0 deletions ArcdpsLogManager/ManagerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ private TabControl ConstructMainTabControl()
// Statistics
var statistics = new StatisticsSection(ImageProvider, LogNameProvider);
FilteredLogsUpdated += (sender, args) => statistics.UpdateDataFromLogs(logsFiltered.ToList());
LogNameProvider.MapNamesUpdated += (_, _) => statistics.UpdateDataFromLogs(logsFiltered.ToList());

// Game data collecting
var gameDataCollecting = new GameDataCollecting(logList, LogCache, ApiData, LogDataProcessor, UploadProcessor, ImageProvider, LogNameProvider);
Expand Down
6 changes: 6 additions & 0 deletions ArcdpsLogManager/Processing/ApiProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ protected override async Task Process(string item, CancellationToken cancellatio
notFound = true;
retry = false;
}
catch (ServerErrorException)
{
// Currently a bug in the gw2 api. It is throwing "unknown error" for not existent guilds
notFound = true;
retry = false;
}
} while (retry);

if (guild != null)
Expand Down
1 change: 1 addition & 0 deletions ArcdpsLogManager/Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static Icon GetProgramIcon()
public static Image GetTinyIconFestival() => GetImage("ArenaNet.festivals_32px.png");
public static Image GetTinyIconIcebroodSaga() => GetImage("ArenaNet.icebrood_saga_32px.png");
public static Image GetTinyIconEndOfDragons() => GetImage("ArenaNet.end_of_dragons_32px.png");
public static Image GetTinyIconInstance() => GetImage("ArenaNet.storyline_32px.png");

// FRACTAL INSTABILITIES
public static Image GetInstabilityImage(string iconName)
Expand Down
42 changes: 15 additions & 27 deletions ArcdpsLogManager/Sections/GameDataGathering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using GW2Scratch.EVTCAnalytics.Model;
using GW2Scratch.EVTCAnalytics.Model.Agents;
using GW2Scratch.EVTCAnalytics.Processing;
using System.Collections.Concurrent;

namespace GW2Scratch.ArcdpsLogManager.Sections
{
Expand Down Expand Up @@ -357,12 +358,12 @@ private void GatherData(LogList logList, ProgressBar progressBar, Label progress
{
return Task.Run(() =>
{
var species = new Dictionary<int, Dictionary<SpeciesData, List<LogData>>>();
var skills = new Dictionary<uint, Dictionary<SkillData, List<LogData>>>();
var species = new ConcurrentDictionary<int, ConcurrentDictionary<SpeciesData, List<LogData>>>();
var skills = new ConcurrentDictionary<uint, ConcurrentDictionary<SkillData, List<LogData>>>();
int done = 0;
int failed = 0;
foreach (var log in logs)
Parallel.ForEach(logs, log =>
{
cancellationToken.ThrowIfCancellationRequested();
Expand All @@ -374,8 +375,8 @@ private void GatherData(LogList logList, ProgressBar progressBar, Label progress
}
catch
{
failed++;
continue;
Interlocked.Increment(ref failed);
return;
}
foreach (var agent in processedLog.Agents.OfType<NPC>())
Expand All @@ -387,17 +388,11 @@ private void GatherData(LogList logList, ProgressBar progressBar, Label progress
if (id == 0) continue;
var speciesData = new SpeciesData(id, name);
if (!species.ContainsKey(id))
{
species[id] = new Dictionary<SpeciesData, List<LogData>>();
}
if (!species[id].ContainsKey(speciesData))
{
species[id][speciesData] = new List<LogData>();
}
var dictForSpecies =
species.GetOrAdd(id, new ConcurrentDictionary<SpeciesData, List<LogData>>());
species[id][speciesData].Add(log);
var listForSpeciesData = dictForSpecies.GetOrAdd(speciesData, new List<LogData>());
listForSpeciesData.Add(log);
}
foreach (var skill in processedLog.Skills)
Expand All @@ -409,22 +404,15 @@ private void GatherData(LogList logList, ProgressBar progressBar, Label progress
if (id == 0) continue;
var skillData = new SkillData(id, name);
if (!skills.ContainsKey(id))
{
skills[id] = new Dictionary<SkillData, List<LogData>>();
}
var dictForSkill = skills.GetOrAdd(id, new ConcurrentDictionary<SkillData, List<LogData>>());
if (!skills[id].ContainsKey(skillData))
{
skills[id][skillData] = new List<LogData>();
}
skills[id][skillData].Add(log);
var listForSkillData = dictForSkill.GetOrAdd(skillData, new List<LogData>());
listForSkillData.Add(log);
}
done++;
Interlocked.Increment(ref done);
progress?.Report((done, logs.Count, failed));
}
});
var speciesEnumerable = (IEnumerable<SpeciesData>) species.Values.SelectMany(x => x).Select(x =>
{
Expand Down
13 changes: 12 additions & 1 deletion ArcdpsLogManager/Sections/LogList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class LogList : Panel
{ "", "Favorite" },
{ "CM", "Challenge Mode or Emboldened" },
{ "Instabilities", "Fractals of the Mists" },
{ "Scale", "Fractals of the Mists" },
};

public bool ReadOnly { get; init; }
Expand Down Expand Up @@ -217,6 +218,16 @@ private GridView<LogData> ConstructLogGridView(LogDetailPanel detailPanel, Multi
};
gridView.Columns.Add(resultColumn);

var fractalScaleColumn = new GridColumn
{
HeaderText = "Scale",
DataCell = new TextBoxCell
{
Binding = new DelegateBinding<LogData, string>(x => x.LogExtras?.FractalExtras?.FractalScale?.ToString() ?? "")
}
};
gridView.Columns.Add(fractalScaleColumn);

var instabilityCell = new DrawableCell();
instabilityCell.Paint += (sender, args) =>
{
Expand Down Expand Up @@ -245,7 +256,7 @@ private GridView<LogData> ConstructLogGridView(LogDetailPanel detailPanel, Multi
Width = 3 * (PlayerIconSize + PlayerIconSpacing)
};
gridView.Columns.Add(instabilityColumn);

var dateColumn = new GridColumn()
{
HeaderText = "Date",
Expand Down
Loading

0 comments on commit 1f58079

Please sign in to comment.