From a46b394652635c2f48ac5cec6243ec8a6c9631b3 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 6 Dec 2024 17:18:22 +0100 Subject: [PATCH] API 11 --- LLib | 2 +- Squadronista/Solver/SquadronMember.cs | 10 +++++----- Squadronista/Squadronista.csproj | 4 ++-- Squadronista/SquadronistaPlugin.cs | 18 ++++++++++-------- Squadronista/packages.lock.json | 8 ++++---- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/LLib b/LLib index e206782..2d214b1 160000 --- a/LLib +++ b/LLib @@ -1 +1 @@ -Subproject commit e206782c1106e1a5292a06af61783faef1ac0c42 +Subproject commit 2d214b133847130d3382c0baaff26b32332a8f2d diff --git a/Squadronista/Solver/SquadronMember.cs b/Squadronista/Solver/SquadronMember.cs index 96891cf..ee15063 100644 --- a/Squadronista/Solver/SquadronMember.cs +++ b/Squadronista/Solver/SquadronMember.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using Dalamud.Plugin.Services; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; namespace Squadronista.Solver; @@ -29,13 +29,13 @@ internal sealed class SquadronMember : IEquatable public SquadronMember InitializeFrom(IDataManager dataManager) { List<(byte, byte, byte)> growthAsList = new(); - var growth = dataManager.GetExcelSheet()!.Single(x => x.ClassJob.Row == ClassJob); - for (int i = 0; i <= 59; ++i) + var growth = dataManager.GetExcelSheet().Single(x => x.ClassJob.RowId == ClassJob); + foreach (GcArmyMemberGrow.MemberParamsStruct memberParams in growth.MemberParams) { - growthAsList.Add((growth.Physical[i], growth.Mental[i], growth.Tactical[i])); + growthAsList.Add((memberParams.Physical, memberParams.Mental, memberParams.Tactical)); } - growthAsList.Add((growth.Unknown123, growth.Unknown184, growth.Unknown245)); + growthAsList.Add((growth.Unknown1, growth.Unknown2, growth.Unknown3)); GrowthParams = growthAsList; return this; } diff --git a/Squadronista/Squadronista.csproj b/Squadronista/Squadronista.csproj index 55f5b55..e9510fd 100644 --- a/Squadronista/Squadronista.csproj +++ b/Squadronista/Squadronista.csproj @@ -1,6 +1,6 @@ - + - 4.0 + 5.0 dist diff --git a/Squadronista/SquadronistaPlugin.cs b/Squadronista/SquadronistaPlugin.cs index f3fb760..1f48973 100644 --- a/Squadronista/SquadronistaPlugin.cs +++ b/Squadronista/SquadronistaPlugin.cs @@ -9,7 +9,7 @@ using Dalamud.Plugin; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.UI; -using Lumina.Excel.GeneratedSheets; +using Lumina.Excel.Sheets; using Squadronista.Solver; using Squadronista.Windows; using Race = Squadronista.Solver.Race; @@ -39,7 +39,7 @@ public sealed class SquadronistaPlugin : IDalamudPlugin _dataManager = dataManager; _addonLifecycle = addonLifecycle; - _allMissions = dataManager.GetExcelSheet()! + _allMissions = dataManager.GetExcelSheet() .Where(x => x.RowId > 0) .Select(x => new SquadronMission { @@ -49,12 +49,12 @@ public sealed class SquadronistaPlugin : IDalamudPlugin // 13 and 14 seems to be a duplicate IsFlaggedMission = x.RowId is 7 or 14 or 15 or 34, - PossibleAttributes = Enumerable.Range(0, x.RequiredPhysical.Length) + PossibleAttributes = Enumerable.Range(0, x.ExpeditionParams.Count) .Select(i => new Attributes { - PhysicalAbility = x.RequiredPhysical[i], - MentalAbility = x.RequiredMental[i], - TacticalAbility = x.RequiredTactical[i], + PhysicalAbility = x.ExpeditionParams[i].RequiredPhysical, + MentalAbility = x.ExpeditionParams[i].RequiredMental, + TacticalAbility = x.ExpeditionParams[i].RequiredTactical, }) .ToList() .AsReadOnly(), @@ -62,7 +62,7 @@ public sealed class SquadronistaPlugin : IDalamudPlugin .ToList() .AsReadOnly(); - Trainings = dataManager.GetExcelSheet()! + Trainings = dataManager.GetExcelSheet() .Where(x => x.RowId > 0 && x.RowId != 7) .Select(x => new Training { @@ -123,7 +123,7 @@ public sealed class SquadronistaPlugin : IDalamudPlugin return new SquadronMember { - Name = _dataManager.GetExcelSheet()!.GetRow(member->ENpcResidentId)! + Name = _dataManager.GetExcelSheet().GetRow(member->ENpcResidentId) .Singular.ToString(), Level = member->Level, ClassJob = member->ClassJob, @@ -196,6 +196,8 @@ public sealed class SquadronistaPlugin : IDalamudPlugin SquadronState = null; } + private void ResetCharacterSpecificData(int type, int code) => ResetCharacterSpecificData(); + public void Dispose() { _mainWindow.Dispose(); diff --git a/Squadronista/packages.lock.json b/Squadronista/packages.lock.json index f5ad582..f6a8acd 100644 --- a/Squadronista/packages.lock.json +++ b/Squadronista/packages.lock.json @@ -4,9 +4,9 @@ "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.13, )", - "resolved": "2.1.13", - "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" + "requested": "[11.0.0, )", + "resolved": "11.0.0", + "contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA==" }, "DotNet.ReproducibleBuilds": { "type": "Direct", @@ -79,7 +79,7 @@ "llib": { "type": "Project", "dependencies": { - "DalamudPackager": "[2.1.13, )" + "DalamudPackager": "[11.0.0, )" } } }