From 0a313e8fa3018021e6a567b70af1ff95b9b50515 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Wed, 3 Jul 2024 10:24:22 +0200 Subject: [PATCH] API 10 --- AutoRetainerAPI | 2 +- ECommons | 2 +- Influx/AllaganTools/AllaganToolsIpc.cs | 2 +- Influx/AllaganTools/SortingResult.cs | 2 +- Influx/Influx.csproj | 55 +------------ Influx/Influx/InfluxStatisticsClient.cs | 4 + Influx/InfluxPlugin.cs | 4 +- Influx/LocalStatistics/FcStatsCalculator.cs | 12 +-- .../LocalStatistics/LocalStatsCalculator.cs | 12 ++- Influx/Windows/ConfigurationWindow.cs | 6 +- Influx/packages.lock.json | 81 +++++++++++++++++-- LLib | 2 +- 12 files changed, 105 insertions(+), 79 deletions(-) diff --git a/AutoRetainerAPI b/AutoRetainerAPI index 6f0aaa5..a63c8e7 160000 --- a/AutoRetainerAPI +++ b/AutoRetainerAPI @@ -1 +1 @@ -Subproject commit 6f0aaa55bce6ec79fd4d72f84f21597b39e5445d +Subproject commit a63c8e7154e272374ffa03d5c801736d4229e38a diff --git a/ECommons b/ECommons index d238d41..11fd2f0 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit d238d4188e8b47b11252d75cb5e4b678b8da2756 +Subproject commit 11fd2f06e1374e846e1aada06071da5fc7ef697a diff --git a/Influx/AllaganTools/AllaganToolsIpc.cs b/Influx/AllaganTools/AllaganToolsIpc.cs index 1cdbc52..3557ed1 100644 --- a/Influx/AllaganTools/AllaganToolsIpc.cs +++ b/Influx/AllaganTools/AllaganToolsIpc.cs @@ -24,7 +24,7 @@ internal sealed class AllaganToolsIpc : IDisposable private IInventoryMonitor _inventories; private IListService _lists; - public AllaganToolsIpc(DalamudPluginInterface pluginInterface, IChatGui chatGui, DalamudReflector dalamudReflector, + public AllaganToolsIpc(IDalamudPluginInterface pluginInterface, IChatGui chatGui, DalamudReflector dalamudReflector, IFramework framework, IPluginLog pluginLog) { _chatGui = chatGui; diff --git a/Influx/AllaganTools/SortingResult.cs b/Influx/AllaganTools/SortingResult.cs index 918082c..83c6910 100644 --- a/Influx/AllaganTools/SortingResult.cs +++ b/Influx/AllaganTools/SortingResult.cs @@ -22,7 +22,7 @@ internal sealed class SortingResult public ItemFlags Flags { get; } public int Quantity { get; } - public bool IsHq => Flags.HasFlag(ItemFlags.HQ); + public bool IsHq => Flags.HasFlag(ItemFlags.HighQuality); public override string ToString() { diff --git a/Influx/Influx.csproj b/Influx/Influx.csproj index 1ca905a..f4d56ef 100644 --- a/Influx/Influx.csproj +++ b/Influx/Influx.csproj @@ -1,67 +1,20 @@ - + - net8.0-windows - 0.18 - 12 - enable - true - false - false + 1.0 dist - true - $(SolutionDir)=X:\ - true - portable - - $(appdata)\XIVLauncher\addon\Hooks\dev\ - - - - $(DALAMUD_HOME)/ - + + - - - - $(DalamudLibPath)Dalamud.dll - false - - - $(DalamudLibPath)ImGui.NET.dll - false - - - $(DalamudLibPath)Lumina.dll - false - - - $(DalamudLibPath)Lumina.Excel.dll - false - - - $(DalamudLibPath)Newtonsoft.Json.dll - false - - - $(DalamudLibPath)FFXIVClientStructs.dll - false - - - - - - - diff --git a/Influx/Influx/InfluxStatisticsClient.cs b/Influx/Influx/InfluxStatisticsClient.cs index eea54cf..af22a01 100644 --- a/Influx/Influx/InfluxStatisticsClient.cs +++ b/Influx/Influx/InfluxStatisticsClient.cs @@ -216,6 +216,10 @@ internal sealed class InfluxStatisticsClient : IDisposable { foreach (var (expIndex, job) in _expToJobs) { + // last update to this char was in 6.x, so we don't have PCT/VPR data + if (localStats.ClassJobLevels.Count <= expIndex) + continue; + var level = localStats.ClassJobLevels[expIndex]; if (level > 0) { diff --git a/Influx/InfluxPlugin.cs b/Influx/InfluxPlugin.cs index ac0f04f..90ab990 100644 --- a/Influx/InfluxPlugin.cs +++ b/Influx/InfluxPlugin.cs @@ -22,7 +22,7 @@ namespace Influx; internal sealed class InfluxPlugin : IDalamudPlugin { private readonly object _lock = new(); - private readonly DalamudPluginInterface _pluginInterface; + private readonly IDalamudPluginInterface _pluginInterface; private readonly Configuration _configuration; private readonly IClientState _clientState; private readonly ICommandManager _commandManager; @@ -38,7 +38,7 @@ internal sealed class InfluxPlugin : IDalamudPlugin private readonly ConfigurationWindow _configurationWindow; private readonly Timer _timer; - public InfluxPlugin(DalamudPluginInterface pluginInterface, IClientState clientState, IPluginLog pluginLog, + public InfluxPlugin(IDalamudPluginInterface pluginInterface, IClientState clientState, IPluginLog pluginLog, ICommandManager commandManager, IChatGui chatGui, IDataManager dataManager, IFramework framework, IAddonLifecycle addonLifecycle, IGameGui gameGui, ICondition condition) { diff --git a/Influx/LocalStatistics/FcStatsCalculator.cs b/Influx/LocalStatistics/FcStatsCalculator.cs index a337733..d74901a 100644 --- a/Influx/LocalStatistics/FcStatsCalculator.cs +++ b/Influx/LocalStatistics/FcStatsCalculator.cs @@ -18,7 +18,7 @@ namespace Influx.LocalStatistics; internal sealed class FcStatsCalculator : IDisposable { - private readonly DalamudPluginInterface _pluginInterface; + private readonly IDalamudPluginInterface _pluginInterface; private readonly IClientState _clientState; private readonly IAddonLifecycle _addonLifecycle; private readonly IGameGui _gameGui; @@ -33,7 +33,7 @@ internal sealed class FcStatsCalculator : IDisposable public FcStatsCalculator( IDalamudPlugin plugin, - DalamudPluginInterface pluginInterface, + IDalamudPluginInterface pluginInterface, IClientState clientState, IAddonLifecycle addonLifecycle, IGameGui gameGui, @@ -86,9 +86,9 @@ internal sealed class FcStatsCalculator : IDisposable if (infoProxy != null) { var fcProxy = (InfoProxyFreeCompany*)infoProxy; - if (fcProxy->ID != 0) + if (fcProxy->Id != 0) { - _pluginLog.Information($"Requesting post-process, FC is {fcProxy->ID}"); + _pluginLog.Information($"Requesting post-process, FC is {fcProxy->Id}"); _autoRetainerApi.RequestCharacterPostprocess(); } else @@ -157,10 +157,10 @@ internal sealed class FcStatsCalculator : IDisposable if (infoProxy != null) { var fcProxy = (InfoProxyFreeCompany*)infoProxy; - ulong localContentId = fcProxy->ID; + ulong localContentId = fcProxy->Id; if (localContentId != 0) { - var atkArrays = Framework.Instance()->GetUiModule()->GetRaptureAtkModule()->AtkModule + var atkArrays = Framework.Instance()->GetUIModule()->GetRaptureAtkModule()->AtkModule .AtkArrayDataHolder; if (atkArrays.NumberArrayCount > 50) { diff --git a/Influx/LocalStatistics/LocalStatsCalculator.cs b/Influx/LocalStatistics/LocalStatsCalculator.cs index e55f717..191596a 100644 --- a/Influx/LocalStatistics/LocalStatsCalculator.cs +++ b/Influx/LocalStatistics/LocalStatsCalculator.cs @@ -27,7 +27,7 @@ internal sealed class LocalStatsCalculator : IDisposable private const uint JointQuest = 65781; - private readonly DalamudPluginInterface _pluginInterface; + private readonly IDalamudPluginInterface _pluginInterface; private readonly IClientState _clientState; private readonly IAddonLifecycle _addonLifecycle; private readonly IPluginLog _pluginLog; @@ -40,7 +40,7 @@ internal sealed class LocalStatsCalculator : IDisposable public LocalStatsCalculator( - DalamudPluginInterface pluginInterface, + IDalamudPluginInterface pluginInterface, IClientState clientState, IAddonLifecycle addonLifecycle, IPluginLog pluginLog, @@ -58,11 +58,9 @@ internal sealed class LocalStatsCalculator : IDisposable Task.Run(() => { List msq = new(); - foreach (var quest in dataManager.GetExcelSheet()!.Where(x => x.JournalGenre.Row is >= 1 and <= 12)) + foreach (var quest in dataManager.GetExcelSheet()!.Where(x => x.JournalGenre.Row is >= 1 and <= 13)) { var previousQuests = quest.PreviousQuest?.Select(x => x.Row).Where(x => x != 0).ToList(); - if (previousQuests != null && quest.Unknown12 != 0) - previousQuests.Add(quest.Unknown12); msq.Add(new QuestInfo { @@ -248,8 +246,8 @@ internal sealed class LocalStatsCalculator : IDisposable private unsafe List ExtractClassJobLevels(PlayerState* playerState) { List levels = new(); - for (int i = 0; i < 30; ++i) - levels.Add(playerState->ClassJobLevelArray[i]); + for (int i = 0; i < 32; ++i) + levels.Add(playerState->ClassJobLevels[i]); return levels; } diff --git a/Influx/Windows/ConfigurationWindow.cs b/Influx/Windows/ConfigurationWindow.cs index fd5b7ca..d98e0a7 100644 --- a/Influx/Windows/ConfigurationWindow.cs +++ b/Influx/Windows/ConfigurationWindow.cs @@ -14,14 +14,14 @@ namespace Influx.Windows; internal sealed class ConfigurationWindow : Window { - private readonly DalamudPluginInterface _pluginInterface; + private readonly IDalamudPluginInterface _pluginInterface; private readonly IClientState _clientState; private readonly Configuration _configuration; private readonly AllaganToolsIpc _allaganToolsIpc; - private string[] _filterNames = Array.Empty(); + private string[] _filterNames = []; private int _filterIndexToAdd; - public ConfigurationWindow(DalamudPluginInterface pluginInterface, IClientState clientState, + public ConfigurationWindow(IDalamudPluginInterface pluginInterface, IClientState clientState, Configuration configuration, AllaganToolsIpc allaganToolsIpc) : base("Configuration###InfluxConfiguration") { diff --git a/Influx/packages.lock.json b/Influx/packages.lock.json index ccc84cd..714dab6 100644 --- a/Influx/packages.lock.json +++ b/Influx/packages.lock.json @@ -4,9 +4,21 @@ "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.12, )", - "resolved": "2.1.12", - "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" + "requested": "[2.1.13, )", + "resolved": "2.1.13", + "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" + }, + "DotNet.ReproducibleBuilds": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==", + "dependencies": { + "Microsoft.SourceLink.AzureRepos.Git": "1.1.1", + "Microsoft.SourceLink.Bitbucket.Git": "1.1.1", + "Microsoft.SourceLink.GitHub": "1.1.1", + "Microsoft.SourceLink.GitLab": "1.1.1" + } }, "InfluxDB.Client": { "type": "Direct", @@ -29,6 +41,16 @@ "resolved": "9.0.0-preview.1.24081.5", "contentHash": "aAR7YW+pUUdvHk3vj7GtAi71dWGDIuY9270lsmQ6lKw23zzY+r8pLP3cGNbJdlnA9VWl+S+gnIVkBCqj2ROlEg==" }, + "Microsoft.SourceLink.Gitea": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "KOBodmDnlWGIqZt2hT47Q69TIoGhIApDVLCyyj9TT5ct8ju16AbHYcB4XeknoHX562wO1pMS/1DfBIZK+V+sxg==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, "CsvHelper": { "type": "Transitive", "resolved": "30.0.1", @@ -54,6 +76,11 @@ "Newtonsoft.Json": "13.0.1" } }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, "Microsoft.Extensions.Primitives": { "type": "Transitive", "resolved": "2.2.0", @@ -72,6 +99,47 @@ "System.Buffers": "4.5.0" } }, + "Microsoft.SourceLink.AzureRepos.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Bitbucket.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + }, + "Microsoft.SourceLink.GitHub": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.GitLab": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, "Microsoft.Win32.SystemEvents": { "type": "Transitive", "resolved": "6.0.0", @@ -195,14 +263,17 @@ "autoretainerapi": { "type": "Project", "dependencies": { - "ECommons": "[2.1.0.7, )" + "ECommons": "[2.2.0.2, )" } }, "ecommons": { "type": "Project" }, "llib": { - "type": "Project" + "type": "Project", + "dependencies": { + "DalamudPackager": "[2.1.13, )" + } } } } diff --git a/LLib b/LLib index 3792244..7027d29 160000 --- a/LLib +++ b/LLib @@ -1 +1 @@ -Subproject commit 3792244261a9f5426a7916f5a6dd1966238ba84a +Subproject commit 7027d291efbbff6a55944dd521d3907210ddecbe