This commit is contained in:
Liza 2024-12-06 17:18:22 +01:00
parent a40ad24b53
commit a46b394652
Signed by: liza
GPG Key ID: 8DD6D21C03BB0848
5 changed files with 22 additions and 20 deletions

2
LLib

@ -1 +1 @@
Subproject commit e206782c1106e1a5292a06af61783faef1ac0c42 Subproject commit 2d214b133847130d3382c0baaff26b32332a8f2d

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using Lumina.Excel.GeneratedSheets; using Lumina.Excel.Sheets;
namespace Squadronista.Solver; namespace Squadronista.Solver;
@ -29,13 +29,13 @@ internal sealed class SquadronMember : IEquatable<SquadronMember>
public SquadronMember InitializeFrom(IDataManager dataManager) public SquadronMember InitializeFrom(IDataManager dataManager)
{ {
List<(byte, byte, byte)> growthAsList = new(); List<(byte, byte, byte)> growthAsList = new();
var growth = dataManager.GetExcelSheet<GcArmyMemberGrow>()!.Single(x => x.ClassJob.Row == ClassJob); var growth = dataManager.GetExcelSheet<GcArmyMemberGrow>().Single(x => x.ClassJob.RowId == ClassJob);
for (int i = 0; i <= 59; ++i) 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; GrowthParams = growthAsList;
return this; return this;
} }

View File

@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/9.0.2"> <Project Sdk="Dalamud.NET.Sdk/11.0.0">
<PropertyGroup> <PropertyGroup>
<Version>4.0</Version> <Version>5.0</Version>
<OutputPath>dist</OutputPath> <OutputPath>dist</OutputPath>
</PropertyGroup> </PropertyGroup>

View File

@ -9,7 +9,7 @@ using Dalamud.Plugin;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets; using Lumina.Excel.Sheets;
using Squadronista.Solver; using Squadronista.Solver;
using Squadronista.Windows; using Squadronista.Windows;
using Race = Squadronista.Solver.Race; using Race = Squadronista.Solver.Race;
@ -39,7 +39,7 @@ public sealed class SquadronistaPlugin : IDalamudPlugin
_dataManager = dataManager; _dataManager = dataManager;
_addonLifecycle = addonLifecycle; _addonLifecycle = addonLifecycle;
_allMissions = dataManager.GetExcelSheet<GcArmyExpedition>()! _allMissions = dataManager.GetExcelSheet<GcArmyExpedition>()
.Where(x => x.RowId > 0) .Where(x => x.RowId > 0)
.Select(x => new SquadronMission .Select(x => new SquadronMission
{ {
@ -49,12 +49,12 @@ public sealed class SquadronistaPlugin : IDalamudPlugin
// 13 and 14 seems to be a duplicate // 13 and 14 seems to be a duplicate
IsFlaggedMission = x.RowId is 7 or 14 or 15 or 34, 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 .Select(i => new Attributes
{ {
PhysicalAbility = x.RequiredPhysical[i], PhysicalAbility = x.ExpeditionParams[i].RequiredPhysical,
MentalAbility = x.RequiredMental[i], MentalAbility = x.ExpeditionParams[i].RequiredMental,
TacticalAbility = x.RequiredTactical[i], TacticalAbility = x.ExpeditionParams[i].RequiredTactical,
}) })
.ToList() .ToList()
.AsReadOnly(), .AsReadOnly(),
@ -62,7 +62,7 @@ public sealed class SquadronistaPlugin : IDalamudPlugin
.ToList() .ToList()
.AsReadOnly(); .AsReadOnly();
Trainings = dataManager.GetExcelSheet<GcArmyTraining>()! Trainings = dataManager.GetExcelSheet<GcArmyTraining>()
.Where(x => x.RowId > 0 && x.RowId != 7) .Where(x => x.RowId > 0 && x.RowId != 7)
.Select(x => new Training .Select(x => new Training
{ {
@ -123,7 +123,7 @@ public sealed class SquadronistaPlugin : IDalamudPlugin
return new SquadronMember return new SquadronMember
{ {
Name = _dataManager.GetExcelSheet<ENpcResident>()!.GetRow(member->ENpcResidentId)! Name = _dataManager.GetExcelSheet<ENpcResident>().GetRow(member->ENpcResidentId)
.Singular.ToString(), .Singular.ToString(),
Level = member->Level, Level = member->Level,
ClassJob = member->ClassJob, ClassJob = member->ClassJob,
@ -196,6 +196,8 @@ public sealed class SquadronistaPlugin : IDalamudPlugin
SquadronState = null; SquadronState = null;
} }
private void ResetCharacterSpecificData(int type, int code) => ResetCharacterSpecificData();
public void Dispose() public void Dispose()
{ {
_mainWindow.Dispose(); _mainWindow.Dispose();

View File

@ -4,9 +4,9 @@
"net8.0-windows7.0": { "net8.0-windows7.0": {
"DalamudPackager": { "DalamudPackager": {
"type": "Direct", "type": "Direct",
"requested": "[2.1.13, )", "requested": "[11.0.0, )",
"resolved": "2.1.13", "resolved": "11.0.0",
"contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" "contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA=="
}, },
"DotNet.ReproducibleBuilds": { "DotNet.ReproducibleBuilds": {
"type": "Direct", "type": "Direct",
@ -79,7 +79,7 @@
"llib": { "llib": {
"type": "Project", "type": "Project",
"dependencies": { "dependencies": {
"DalamudPackager": "[2.1.13, )" "DalamudPackager": "[11.0.0, )"
} }
} }
} }